-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation about MotionSequenceRequest (Pilz Industrial Motion Planner) #655
Comments
Hi there, is there any progress on C++ usage of Pilz Industrial Motion Planner's Sequence? In my case, Action Server for moveit_msgs/action/MoveGroupSequence is not active. Also, all the functions within #include <pilz_industrial_motion_planner/move_group_sequence_action.h> are all private and there is no documentation how to kick start using it. Some guides or sample codes are truly appreciated. Thanks! |
Hi there, I have tried with the service call and it worked well. #include <moveit_msgs/GetMotionSequence.h>
// after launched the node handler
sequence_path_client_ = nh_ptr_->serviceClient<moveit_msgs::GetMotionSequence>("plan_sequence_path");
// initialized the service call
moveit_msgs::GetMotionSequenceRequest motion_sequence_req;
moveit_msgs::GetMotionSequenceResponse motion_sequence_res;
moveit::core::RobotStatePtr robot_state_ptr(robot_move_group_ptr->getCurrentState());
robot_move_group_ptr->setStartState(*robot_state_ptr);
for (size_t i = 0; i < target_poses.size(); i++)
{
moveit_msgs::MotionSequenceItem motion_sequence_item;
motion_sequence_item.blend_radius = 0.1;
if (i == target_poses.size() - 1)
motion_sequence_item.blend_radius = 0.0;
robot_state_ptr->setFromIK(robot_joint_group_ptr, target_poses[i]);
robot_move_group_ptr->setJointValueTarget(*robot_state_ptr);
robot_move_group_ptr->constructMotionPlanRequest(motion_sequence_item.req);
if (i != target_poses.size() - 1)
motion_sequence_item.req.start_state = moveit_msgs::RobotState();
motion_sequence_req.request.items.push_back(motion_sequence_item);
}
// call the service
sequence_path_client_.call(motion_sequence_req, motion_sequence_res); |
@Hantao-Ye thanks for this update, but that is ROS 1 code, the original question pertains to ROS 2 |
@sea-bass Sorry for the mistake:cry: |
Hi @hoedwin, Unfortunately, I couldn't find a way of implementing sequence execution using <pilz_industrial_motion_planner/move_group_sequence_action.h>. However, I have designed and implemented my own way of executing static programs (sequences) using the Pilz Industrial Motion Planner. You can find it here, in our IFRA-Cranfield/ros2_SimRealRobotControl repository. Regards, |
+1 also interested in this feature for data collection purposes. Would be nice to incorporate planning sequences in |
Hi, I've playing around with the MoveGroupSequenceAction as explain in the Pilz Tutorial and I think I got it to work. For the record, I'm using ROS2 Humble. First, I start the action server with the moveit config
Then, following the moveit_msgs Documentation I create and send to the MoveGroupSequenceAction the corresponding goal msg:
I'm still doing some testing and the code could be improved, but this allows to configure the blend radius and get a smoother robot motion. Any feedback will be greatly appreciated! |
This is great @alejomancinelli! I ported the current Pilz tutorial to ROS 2 but didn't do the sequence part, hence this issue. If you want to put up a PR adding your work, please @ me and I will happily review and test. |
Sure! I will do a couple of tests, clean up the code and add this as another tutorial. Maybe I will have to ask for some help since I've never done a PR in a public repo. I've also would like to implement the stop() and pause() commands. Reading through the pilz_robot_programming the stop() commands should be simple, just a client.async_cancel_goal( ... ), while the pause() seems a little more complicated since it uses threads to stop the execution and then continue it. I will leave these things for later since it's more of a API thing to control the movement. |
Happy to help with that PR. You'll just need to fork this repository, make your changes, and then push your branch. That will then show up as a PR on the main repo. Once that draft PR is up, tag me on it and we'll get through any issues! |
Closed by #917 -- thanks again @alejomancinelli! |
Hi all,
A quick and simple doubt: I am trying to implement sequence executions using the Pilz_Industrial_Motion_Planner. I have followed your documentation here, and I have successfully implemented the motion planner but I am missing documentation about the MotionSequenceRequest.
I have checked your C++ code on Moveit Task Constructor, but unfortunately, that doesn't work for me since I am interested in:
I have tried to implement this on my own (even with subsequent plans changing the RobotState manually), but with no success.
Some documentation (+ source code) on the ROS2 (C++) version of this would be amazing!
I am happy to contribute to this, but I would need some help at the beginning.
Thank you very much in advance,
Mikel Bueno
Cranfield University
The text was updated successfully, but these errors were encountered: