diff --git a/doc/how_to_guides/pilz_industrial_motion_planner/pilz_industrial_motion_planner.rst b/doc/how_to_guides/pilz_industrial_motion_planner/pilz_industrial_motion_planner.rst index c981f1f7fd..beb346a939 100644 --- a/doc/how_to_guides/pilz_industrial_motion_planner/pilz_industrial_motion_planner.rst +++ b/doc/how_to_guides/pilz_industrial_motion_planner/pilz_industrial_motion_planner.rst @@ -486,10 +486,10 @@ Then, the request is created: service_request->request.items.push_back(item1); service_request->request.items.push_back(item2); -Service call and response. The method ``future.wait_for(timeout_duration)`` waits for the -result to become available. The method blocks until specified ``timeout_duration`` has elapsed or the -result becomes available, whichever comes first. The return value identifies the state of -the result. This is perform every 1 seconds until the future is ready. +Once the service call is completed, the method ``future.wait_for(timeout_duration)`` blocks until +a specified ``timeout_duration`` has elapsed or the result becomes available, whichever comes +first. The return value identifies the state of the result. This is performed every second +until the future is ready. :: @@ -589,7 +589,7 @@ Then, the request is created: sequence_request.items.push_back(item1); sequence_request.items.push_back(item2); -Create goal and planning options. A goal response callback and result callback can be included as well. +The goal and planning options are configured. A goal response callback and result callback can be included as well. :: @@ -600,7 +600,7 @@ Create goal and planning options. A goal response callback and result callback c // Planning options goal_msg.planning_options.planning_scene_diff.is_diff = true; goal_msg.planning_options.planning_scene_diff.robot_state.is_diff = true; - // goal_msg.planning_options.plan_only = true; + // goal_msg.planning_options.plan_only = true; // Uncomment to only plan the trajectory Finally, send the goal request and wait for the response: diff --git a/doc/how_to_guides/pilz_industrial_motion_planner/src/pilz_sequence.cpp b/doc/how_to_guides/pilz_industrial_motion_planner/src/pilz_sequence.cpp index 83d4fedfc3..574b929fc5 100644 --- a/doc/how_to_guides/pilz_industrial_motion_planner/src/pilz_sequence.cpp +++ b/doc/how_to_guides/pilz_industrial_motion_planner/src/pilz_sequence.cpp @@ -76,7 +76,7 @@ int main(int argc, char** argv) // MotionSequenceItem configuration item1.req.group_name = PLANNING_GROUP; item1.req.planner_id = "LIN"; - item1.req.allowed_planning_time = 5; + item1.req.allowed_planning_time = 5.0; item1.req.max_velocity_scaling_factor = 0.1; item1.req.max_acceleration_scaling_factor = 0.1; @@ -93,9 +93,9 @@ int main(int argc, char** argv) msg.pose.position.y = -0.2; msg.pose.position.z = 0.6; msg.pose.orientation.x = 1.0; - msg.pose.orientation.y = 0; - msg.pose.orientation.z = 0; - msg.pose.orientation.w = 0; + msg.pose.orientation.y = 0.0; + msg.pose.orientation.z = 0.0; + msg.pose.orientation.w = 0.0; return msg; }(); item1.req.goal_constraints.push_back( @@ -107,12 +107,12 @@ int main(int argc, char** argv) // Set pose blend radius // For the last pose, it must be 0! - item2.blend_radius = 0; + item2.blend_radius = 0.0; // MotionSequenceItem configuration item2.req.group_name = PLANNING_GROUP; item2.req.planner_id = "LIN"; - item2.req.allowed_planning_time = 5; + item2.req.allowed_planning_time = 5.0; item2.req.max_velocity_scaling_factor = 0.1; item2.req.max_acceleration_scaling_factor = 0.1; @@ -124,9 +124,9 @@ int main(int argc, char** argv) msg.pose.position.y = -0.2; msg.pose.position.z = 0.8; msg.pose.orientation.x = 1.0; - msg.pose.orientation.y = 0; - msg.pose.orientation.z = 0; - msg.pose.orientation.w = 0; + msg.pose.orientation.y = 0.0; + msg.pose.orientation.z = 0.0; + msg.pose.orientation.w = 0.0; return msg; }(); item2.req.goal_constraints.push_back( @@ -231,7 +231,7 @@ int main(int argc, char** argv) // Planning options goal_msg.planning_options.planning_scene_diff.is_diff = true; goal_msg.planning_options.planning_scene_diff.robot_state.is_diff = true; - // goal_msg.planning_options.plan_only = true; + // goal_msg.planning_options.plan_only = true; // Uncomment to only plan the trajectory // Goal response callback auto send_goal_options = rclcpp_action::Client::SendGoalOptions(); @@ -273,13 +273,6 @@ int main(int argc, char** argv) RCLCPP_INFO(LOGGER, "Result received"); }; - // Feedback callback - // It does not show the state of the sequence, but the state of the robot: PLANNING, MONITOR, IDLE - send_goal_options.feedback_callback = [](GoalHandleMoveGroupSequence::SharedPtr, - const std::shared_ptr feedback) { - RCLCPP_INFO(LOGGER, "Feedback: %s", feedback->state.c_str()); - }; - // Send the action goal auto goal_handle_future = action_client->async_send_goal(goal_msg, send_goal_options);