File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
doc/how_to_guides/planner_cost_functions Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
Using cost functions in the MoveIt Planning Pipeline
2
2
====================================================
3
3
4
- TODO
4
+ TODO
Original file line number Diff line number Diff line change 8
8
9
9
#include < moveit_visual_tools/moveit_visual_tools.h>
10
10
11
+ // Cost functions
12
+ #include < moveit/cost_functions/cost_functions.hpp>
11
13
// Warehouse
12
14
#include < moveit/warehouse/planning_scene_storage.h>
13
15
#include < moveit/warehouse/planning_scene_storage.h>
@@ -183,6 +185,9 @@ class Demo
183
185
// Set start state as current state
184
186
planning_component_->setStartStateToCurrentState ();
185
187
188
+ // Set cost function
189
+ planning_component_->setStateCostFunction (moveit::cost_functions::getClearanceCostFn ());
190
+
186
191
auto plan_solution = planning_component_->plan ();
187
192
188
193
// Check if PlanningComponents succeeded in finding the plan
You can’t perform that action at this time.
0 commit comments