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

MoveIt Difficulties with end-effector Pose transformation for humanoid robot

asked 2021-08-18 07:49:22 -0500

jangerrit gravatar image

updated 2021-08-18 13:19:52 -0500

ROS Distro: Melodic

OS: Ubuntu 18.04

MoveIt compiled from sources

OpenManipulator-P + RH8D

Problem Description:

We have two different Ik_systems (one ROS/MoveIt, one custom) for our humanoid robot. We'd like to experiment with them with regard to the quality of ik_solutions. When comparing ik_solutions of our two ik systems, we noticed, that we have severe differences between the orientation of our ROS IK solution and the Custom IK solution, while they visually seem to be extremely close.

We figured there is a difference between the coordinate system of our custom implementation and the ROS one. Next step was to compare the values of our Homing Pose. The Homing Pose is set via Joint States, so the Joint Positions are exactly the same in both systems (also visual positions are identical). While the xyz position is exactly the same in both systems (difference per axis < 1e-08), the Orientation is completely different: Custom System: [x: 0, y: 0, z: 0, w: 1] MoveIt System: [x: -0.5, y: 0.5, z: 0.5, w: 0.5]. Big problem for us is that due to this difference we are currently have tremendous problems executing some IK experiments.

We would like the Homing Pose Orientation to also be [x: 0, y: 0, z: 0, w: 1] (so that both of our systems are configured identically, we think our current problem will then vanish) but we are not able to transform it. Orientation always stays [x: -0.5, y: 0.5, z: 0.5, w: 0.5], I already modified the urdf, tried setPoseReferenceFrame in controller, nothing helps. Both systems use the same base_link and the same eef link. I looked up the Orientation of the base_link in rviz and it is [x: 0, y: 0, z: 0, w: 1], so this seems correct for me.

Any idea how to fix this?

Homing Pose: Homing Pose

Kinematic Chain: image description

MoveIt Orientation shown below, Expectation [0,0,0,1]

[INFO] Current Orientation: r: 0.000000 p: 1.570796 y: 4.709419 || x: -0.499931 y: 0.501418 z: 0.500063 w: 0.498584

edit retag flag offensive close merge delete

Comments

I would give you pictures but I do not have enough points

you do now.

Please do not post images of terminals, source code or .launch/.urdf or any other files though. Those all contain text or "are" text, so copy-paste those into your question.

gvdhoorn gravatar image gvdhoorn  ( 2021-08-18 12:28:06 -0500 )edit

thank you really much

jangerrit gravatar image jangerrit  ( 2021-08-18 13:21:06 -0500 )edit

Please explain what "I already modified the urdf... nothing helps" means. Please describe the idea behind the change you make to the urdf. And what was the result?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-08-22 14:05:40 -0500 )edit

Sounds like you're not using the same end effector frame or planning frame in your custom IK and the ROS/MoveIt plugin.

fvd gravatar image fvd  ( 2021-08-22 14:13:16 -0500 )edit

"I already modified the urdf" means I played around with the <axis> tag of the joints where the coordinate frames change orientation, as shown in the last picture. It sometimes broke urdf, sometimes did not have any effect as far as I could observe.

jangerrit gravatar image jangerrit  ( 2021-08-23 05:58:45 -0500 )edit

Please explain in more detail in your post how you set up the IK and call it in your code, what your end effector links are, what your URDF and planning groups look like, and which outputs are different than what you expect. Also see the documentation for getEndEffectorLink and setEndEffectorLink

fvd gravatar image fvd  ( 2021-08-23 08:09:00 -0500 )edit

Solved the Problem, it has nothing to do with the urdf. MoveIt just does not recognize our kinematic chain correctly.

Our kin. chain should look like the following: r_arm: base_link -> r_tool0

So what I did was:

  • configure kin. chain for Planning Group in MoveIt setup_assistant as shown above
  • execute move_group->setPoseReferenceFrame("base_link") in controller

Problem is getPlanningFrame() always returns "world" frame. So our custom IK system uses "base_link" as reference frame, while MoveIt uses "world". I discovered a lot of people experiencing this bug and there seems to be no solution, we will transform everything with tf2 now.

jangerrit gravatar image jangerrit  ( 2021-08-23 09:06:46 -0500 )edit

@jangerrit I'm glad you figured it out. You should post your comment as the answer.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-08-23 09:32:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-08-24 03:12:42 -0500

jangerrit gravatar image

Solved the Problem, it has nothing to do with the urdf. MoveIt just does not recognize our kinematic chain correctly.

Our kin. chain should look like the following: r_arm: base_link -> r_tool0

So what I did was:

  • configure kin. chain for Planning Group in MoveIt setup_assistant as shown above
  • execute move_group->setPoseReferenceFrame("base_link") in controller

Problem is getPlanningFrame() always returns "world" frame. So our custom IK system uses "base_link" as reference frame, while MoveIt uses "world". I discovered a lot of people experiencing this bug and there seems to be no solution, we will transform everything with tf2 now.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-08-18 07:49:22 -0500

Seen: 382 times

Last updated: Aug 24 '21