MoveIt Difficulties with end-effector Pose transformation for humanoid robot
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:
Kinematic Chain:
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
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.thank you really much
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?
Sounds like you're not using the same end effector frame or planning frame in your custom IK and the ROS/MoveIt plugin.
"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.
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
andsetEndEffectorLink
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:
move_group->setPoseReferenceFrame("base_link")
in controllerProblem 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 I'm glad you figured it out. You should post your comment as the answer.