-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Cost function example #679
base: main
Are you sure you want to change the base?
Conversation
bd0c4af
to
298e115
Compare
planning_component_->setStateCostFunction( | ||
[robot_start_state, group_name, planning_scene](const Eigen::VectorXd& state_vector) mutable { | ||
auto clearance_cost_fn = | ||
moveit::cost_functions::getMinJointDisplacementCostFn(*robot_start_state, group_name, planning_scene); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to my comment in moveit/moveit2#2153 (comment), here is where I think you could do:
auto clearance_cost_fn =
std::bind(moveit::cost_functions::computeMinJointDisplacementCostFn(*robot_start_state, group_name, planning_scene, std::placeholders::_1));
The advantage is that cost_functions
wouldn't have to depend on the planning interface StateCostFn, and the whole process is more transparent: you have a function that computes a cost, and you bind it here into a StateCostFn.
This pull request is in conflict. Could you fix it @sjahr? |
1bab6dd
to
299b21b
Compare
299b21b
to
9b726a1
Compare
Description
Test code for moveit2#2153 that will evolve into a tutorial once the feature is ready
Checklist