@@ -76,7 +76,7 @@ int main(int argc, char** argv)
76
76
// MotionSequenceItem configuration
77
77
item1.req .group_name = PLANNING_GROUP;
78
78
item1.req .planner_id = " LIN" ;
79
- item1.req .allowed_planning_time = 5 ;
79
+ item1.req .allowed_planning_time = 5.0 ;
80
80
item1.req .max_velocity_scaling_factor = 0.1 ;
81
81
item1.req .max_acceleration_scaling_factor = 0.1 ;
82
82
@@ -93,9 +93,9 @@ int main(int argc, char** argv)
93
93
msg.pose .position .y = -0.2 ;
94
94
msg.pose .position .z = 0.6 ;
95
95
msg.pose .orientation .x = 1.0 ;
96
- msg.pose .orientation .y = 0 ;
97
- msg.pose .orientation .z = 0 ;
98
- msg.pose .orientation .w = 0 ;
96
+ msg.pose .orientation .y = 0.0 ;
97
+ msg.pose .orientation .z = 0.0 ;
98
+ msg.pose .orientation .w = 0.0 ;
99
99
return msg;
100
100
}();
101
101
item1.req .goal_constraints .push_back (
@@ -107,12 +107,12 @@ int main(int argc, char** argv)
107
107
108
108
// Set pose blend radius
109
109
// For the last pose, it must be 0!
110
- item2.blend_radius = 0 ;
110
+ item2.blend_radius = 0.0 ;
111
111
112
112
// MotionSequenceItem configuration
113
113
item2.req .group_name = PLANNING_GROUP;
114
114
item2.req .planner_id = " LIN" ;
115
- item2.req .allowed_planning_time = 5 ;
115
+ item2.req .allowed_planning_time = 5.0 ;
116
116
item2.req .max_velocity_scaling_factor = 0.1 ;
117
117
item2.req .max_acceleration_scaling_factor = 0.1 ;
118
118
@@ -124,9 +124,9 @@ int main(int argc, char** argv)
124
124
msg.pose .position .y = -0.2 ;
125
125
msg.pose .position .z = 0.8 ;
126
126
msg.pose .orientation .x = 1.0 ;
127
- msg.pose .orientation .y = 0 ;
128
- msg.pose .orientation .z = 0 ;
129
- msg.pose .orientation .w = 0 ;
127
+ msg.pose .orientation .y = 0.0 ;
128
+ msg.pose .orientation .z = 0.0 ;
129
+ msg.pose .orientation .w = 0.0 ;
130
130
return msg;
131
131
}();
132
132
item2.req .goal_constraints .push_back (
@@ -231,7 +231,7 @@ int main(int argc, char** argv)
231
231
// Planning options
232
232
goal_msg.planning_options .planning_scene_diff .is_diff = true ;
233
233
goal_msg.planning_options .planning_scene_diff .robot_state .is_diff = true ;
234
- // goal_msg.planning_options.plan_only = true;
234
+ // goal_msg.planning_options.plan_only = true; // Uncomment to only plan the trajectory
235
235
236
236
// Goal response callback
237
237
auto send_goal_options = rclcpp_action::Client<MoveGroupSequence>::SendGoalOptions ();
@@ -273,13 +273,6 @@ int main(int argc, char** argv)
273
273
RCLCPP_INFO (LOGGER, " Result received" );
274
274
};
275
275
276
- // Feedback callback
277
- // It does not show the state of the sequence, but the state of the robot: PLANNING, MONITOR, IDLE
278
- send_goal_options.feedback_callback = [](GoalHandleMoveGroupSequence::SharedPtr,
279
- const std::shared_ptr<const GoalHandleMoveGroupSequence::Feedback> feedback) {
280
- RCLCPP_INFO (LOGGER, " Feedback: %s" , feedback->state .c_str ());
281
- };
282
-
283
276
// Send the action goal
284
277
auto goal_handle_future = action_client->async_send_goal (goal_msg, send_goal_options);
285
278
0 commit comments