Skip to content

Commit 7d96c26

Browse files
Minor changes
1 parent 141d5ac commit 7d96c26

File tree

2 files changed

+16
-23
lines changed

2 files changed

+16
-23
lines changed

doc/how_to_guides/pilz_industrial_motion_planner/pilz_industrial_motion_planner.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,10 @@ Then, the request is created:
486486
service_request->request.items.push_back(item1);
487487
service_request->request.items.push_back(item2);
488488

489-
Service call and response. The method ``future.wait_for(timeout_duration)`` waits for the
490-
result to become available. The method blocks until specified ``timeout_duration`` has elapsed or the
491-
result becomes available, whichever comes first. The return value identifies the state of
492-
the result. This is perform every 1 seconds until the future is ready.
489+
Once the service call is completed, the method ``future.wait_for(timeout_duration)`` blocks until
490+
a specified ``timeout_duration`` has elapsed or the result becomes available, whichever comes
491+
first. The return value identifies the state of the result. This is performed every second
492+
until the future is ready.
493493

494494

495495
::
@@ -589,7 +589,7 @@ Then, the request is created:
589589
sequence_request.items.push_back(item1);
590590
sequence_request.items.push_back(item2);
591591

592-
Create goal and planning options. A goal response callback and result callback can be included as well.
592+
The goal and planning options are configured. A goal response callback and result callback can be included as well.
593593

594594
::
595595

@@ -600,7 +600,7 @@ Create goal and planning options. A goal response callback and result callback c
600600
// Planning options
601601
goal_msg.planning_options.planning_scene_diff.is_diff = true;
602602
goal_msg.planning_options.planning_scene_diff.robot_state.is_diff = true;
603-
// goal_msg.planning_options.plan_only = true;
603+
// goal_msg.planning_options.plan_only = true; // Uncomment to only plan the trajectory
604604

605605
Finally, send the goal request and wait for the response:
606606

doc/how_to_guides/pilz_industrial_motion_planner/src/pilz_sequence.cpp

+10-17
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ int main(int argc, char** argv)
7676
// MotionSequenceItem configuration
7777
item1.req.group_name = PLANNING_GROUP;
7878
item1.req.planner_id = "LIN";
79-
item1.req.allowed_planning_time = 5;
79+
item1.req.allowed_planning_time = 5.0;
8080
item1.req.max_velocity_scaling_factor = 0.1;
8181
item1.req.max_acceleration_scaling_factor = 0.1;
8282

@@ -93,9 +93,9 @@ int main(int argc, char** argv)
9393
msg.pose.position.y = -0.2;
9494
msg.pose.position.z = 0.6;
9595
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;
9999
return msg;
100100
}();
101101
item1.req.goal_constraints.push_back(
@@ -107,12 +107,12 @@ int main(int argc, char** argv)
107107

108108
// Set pose blend radius
109109
// For the last pose, it must be 0!
110-
item2.blend_radius = 0;
110+
item2.blend_radius = 0.0;
111111

112112
// MotionSequenceItem configuration
113113
item2.req.group_name = PLANNING_GROUP;
114114
item2.req.planner_id = "LIN";
115-
item2.req.allowed_planning_time = 5;
115+
item2.req.allowed_planning_time = 5.0;
116116
item2.req.max_velocity_scaling_factor = 0.1;
117117
item2.req.max_acceleration_scaling_factor = 0.1;
118118

@@ -124,9 +124,9 @@ int main(int argc, char** argv)
124124
msg.pose.position.y = -0.2;
125125
msg.pose.position.z = 0.8;
126126
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;
130130
return msg;
131131
}();
132132
item2.req.goal_constraints.push_back(
@@ -231,7 +231,7 @@ int main(int argc, char** argv)
231231
// Planning options
232232
goal_msg.planning_options.planning_scene_diff.is_diff = true;
233233
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
235235

236236
// Goal response callback
237237
auto send_goal_options = rclcpp_action::Client<MoveGroupSequence>::SendGoalOptions();
@@ -273,13 +273,6 @@ int main(int argc, char** argv)
273273
RCLCPP_INFO(LOGGER, "Result received");
274274
};
275275

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-
283276
// Send the action goal
284277
auto goal_handle_future = action_client->async_send_goal(goal_msg, send_goal_options);
285278

0 commit comments

Comments
 (0)