Moveit2 CHOMP: Only joint-space goals are supported

asked 2023-06-22 06:07:11 -0500

angcorcue2 gravatar image

I am trying to use the CHOMP planner in Moveit2. I have managed to configure it in the pipeline and I can use it from the RViz interface. From move group I can also make it go to saved positions by

move_group_.setNamedTarget("SCAN_1");

the problem is when I try to reach a target position using:

 ove_group_.setPoseTarget(target_pose, "hand_press");

or

move_group_.setJointValueTarget(target_pose, "hand_press");

I get the following error: [chomp_planner] [ERROR] Only joint-space goals are supported

edit retag flag offensive close merge delete

Comments

Hi, What is your target_pose? Is it x,y,z location or joint values? You cant use setPoseTarget with chomp planner, as it uses only joint values.

Aki gravatar image Aki  ( 2023-06-22 07:18:29 -0500 )edit

My target_pose is geometry_msgs::msg::PoseStamped with the x,y,z and orientation

angcorcue2 gravatar image angcorcue2  ( 2023-06-22 08:01:04 -0500 )edit

Yes, that will not work with chomp planner. It needs joint values as input. Here you cant use "move_group_.setPoseTarget(target_pose, "hand_press");"

You will have to use "move_group_.setJointValueTarget(target_pose, "hand_press");". And here you will have to use 'joint_values' instead of 'target_pose'. Where 'joint_values' is of type "std::vector<double>". You can define 'joint_values' as: joint_values = {0.467856549620054, -1.3451591625519976, -0.49588841470121653, 0.8398919287470068}; (values inside the vectors are joint angles or values of all of your joints).

Aki gravatar image Aki  ( 2023-06-22 08:16:41 -0500 )edit

I also tried many times before and have reached the conclusion that the chomp planner in moveit2 is only capable of forward kinematics and not inverse kinematics. So if you will give a pose as an input (inverse kinematics), it won't work. You will have to give joint values of all joints as input (forward kinematics).

Aki gravatar image Aki  ( 2023-06-22 08:24:18 -0500 )edit

thank you very much. is there any way to get the inverse kinematics from a position and then pass it to CHOMP? Is it easy from move group inteface?

angcorcue2 gravatar image angcorcue2  ( 2023-06-22 08:36:14 -0500 )edit

You can use a different planner like OMPL. That works properly for moveit2. You can use inverse and forward kinematics both with OMPL planner.

Aki gravatar image Aki  ( 2023-06-22 23:58:13 -0500 )edit

It was what I used in the past with bad results. Have you tried using CHOMP as a post-processor adapter for OMPL, as described here?

angcorcue2 gravatar image angcorcue2  ( 2023-06-25 14:06:28 -0500 )edit