@@ -40,6 +40,8 @@ int main(int argc, char** argv)
40
40
//
41
41
static const std::string PLANNING_GROUP = " panda_arm" ;
42
42
static const std::string LOGNAME = " moveit_cpp_tutorial" ;
43
+ // ros2_controllers
44
+ static const std::vector<std::string> CONTROLLERS (1 , " panda_arm_controller" );
43
45
44
46
/* Otherwise robot with zeros joint_states */
45
47
rclcpp::sleep_for (std::chrono::seconds (1 ));
@@ -95,7 +97,7 @@ int main(int argc, char** argv)
95
97
96
98
// Now, we call the PlanningComponents to compute the plan and visualize it.
97
99
// Note that we are just planning
98
- auto plan_solution1 = planning_components->plan ();
100
+ const planning_interface::MotionPlanResponse plan_solution1 = planning_components->plan ();
99
101
100
102
// Check if PlanningComponents succeeded in finding the plan
101
103
if (plan_solution1)
@@ -110,7 +112,8 @@ int main(int argc, char** argv)
110
112
visual_tools.trigger ();
111
113
112
114
/* Uncomment if you want to execute the plan */
113
- /* planning_components->execute(); // Execute the plan */
115
+ /* bool blocking = true; */
116
+ /* moveit_controller_manager::ExecutionStatus result = moveit_cpp_ptr->execute(plan_solution1.trajectory_, blocking, CONTROLLERS); */
114
117
}
115
118
116
119
// Plan #1 visualization:
@@ -154,7 +157,8 @@ int main(int argc, char** argv)
154
157
visual_tools.trigger ();
155
158
156
159
/* Uncomment if you want to execute the plan */
157
- /* planning_components->execute(); // Execute the plan */
160
+ /* bool blocking = true; */
161
+ /* moveit_cpp_ptr->execute(plan_solution2.trajectory_, blocking, CONTROLLERS); */
158
162
}
159
163
160
164
// Plan #2 visualization:
@@ -198,7 +202,8 @@ int main(int argc, char** argv)
198
202
visual_tools.trigger ();
199
203
200
204
/* Uncomment if you want to execute the plan */
201
- /* planning_components->execute(); // Execute the plan */
205
+ /* bool blocking = true; */
206
+ /* moveit_cpp_ptr->execute(plan_solution3.trajectory_, blocking, CONTROLLERS); */
202
207
}
203
208
204
209
// Plan #3 visualization:
@@ -240,7 +245,8 @@ int main(int argc, char** argv)
240
245
visual_tools.trigger ();
241
246
242
247
/* Uncomment if you want to execute the plan */
243
- /* planning_components->execute(); // Execute the plan */
248
+ /* bool blocking = true; */
249
+ /* moveit_cpp_ptr->execute(plan_solution4.trajectory_, blocking, CONTROLLERS); */
244
250
}
245
251
246
252
// Plan #4 visualization:
@@ -293,7 +299,8 @@ int main(int argc, char** argv)
293
299
visual_tools.trigger ();
294
300
295
301
/* Uncomment if you want to execute the plan */
296
- /* planning_components->execute(); // Execute the plan */
302
+ /* bool blocking = true; */
303
+ /* moveit_cpp_ptr->execute(plan_solution5.trajectory_, blocking, CONTROLLERS); */
297
304
}
298
305
299
306
// Plan #5 visualization:
0 commit comments