ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Getting the joint values of a computed path to a pose goal

asked 2015-05-20 04:15:56 -0600

bluefish gravatar image

Hi everybody,

I'm using moveit with an UR5. The planner I use is the RRTConnectkConfigDefault-planner. The goal for the planner is a pose.

My question is now: Is there a way to retrieve the joint values of the six axes of the computed goal. Maybe out of my_plan from bool success = group.plan(my_plan);. Maybe something like moveit_msgs::RobotTrajectory trajectory = my_plan.trajectory_;. But I here I got stuck and couldn't find anything in the documentation.

And second: Is there a way to get all possible IK-joints (all IK-solutions which also have no collisions) and choose the goal-joints out of them?

Thanks in advance and regards!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-05-20 08:18:52 -0600

Simon Schmeisser gravatar image

updated 2017-04-03 01:58:57 -0600

130s gravatar image

I currently use

std::vector<double> joints = my_plan.trajectory_.joint_trajectory.points[plan.trajectory_.joint_trajectory.points.size()-1].positions;

which is kind of stupid because there is also std::vector::back(), so it should be


Here is the docs you need:

so positions is "float64[]" which translates to std::vector<double>

edit flag offensive delete link more


This is exactly what I was looking for. Thanks! Do you also have by any chance an idea how to get all possible IK-solutions?

bluefish gravatar image bluefish  ( 2015-05-20 09:14:18 -0600 )edit

You're welcome. Unfortunately I don't know the answer to your second question. Would be interesting for me as well. I fear this might not be as easy, depending on what IK you use. As far as I understand the default one is sampling/random based and will only find one solution. You could try several

Simon Schmeisser gravatar image Simon Schmeisser  ( 2015-05-20 10:09:55 -0600 )edit

times and see if it changes? I think that is what some of the code does internally. For ik-fast there might be a way to get all solutions but I don't know it.

Maybe ask on moveit-devel and/or open an extra question?

Simon Schmeisser gravatar image Simon Schmeisser  ( 2015-05-20 10:11:28 -0600 )edit

Hi! I asked the question in the moveit-user-google-group. Here is the link.

bluefish gravatar image bluefish  ( 2015-05-26 04:32:16 -0600 )edit

answered 2015-09-29 01:23:59 -0600 gravatar image

You can try searching SetFromIK ,some function like this,I remeber

edit flag offensive delete link more

Question Tools



Asked: 2015-05-20 04:15:56 -0600

Seen: 1,901 times

Last updated: Apr 03 '17