0
$\begingroup$

I need to plan a series of motions to cartesian poses to check they are achievable. I use the move_group C++ interface. My problem is knowing how to set the robot state at the beginning of each planning with the robot state achieved during the previous planning. Setting the robot state with the previous pose goal (using setFromIK and setStartState) doesn't work as the IK can return a different set of joint positions that the one achieved by the previous plan. So what I think I need is to update the robot state with the joints angles achieved by the previous plan. Any idea how I can do that ?

Note: I'm using ROS2 humble and moveit2 with a 6DOF Kinova arm.

$\endgroup$

1 Answer 1

1
$\begingroup$

In both ros1 and ros2, the RobotState class has setJointPositions() methods. It seems like it does exactly what you are asking for.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.