ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# OpenRAVE IK fails to find a solution on Katana 6M90a arm

This is a follow-up question to this one. I can now start the IK service, but it doesn't find a solution.

Steps to reproduce:

rosrun orrosplanning ik_openrave.py --scene=\$(rospack find katana_description)/collada/katana6m90a.robot.xml


In a new terminal:

rosrun orrosplanning testarmik5d.py


Before doing that, I had to change "Base" to "katana_base_link" in the file testarmik5d.py. Also, I added a debug output to the end which prints out "IK failed to find a solution".

This is the output in the first terminal:

[openravepy_int.cpp:3096] viewer qtcoin successfully attached
[INFO] 1305727377.607870: setting map frame to katana_base_link
[INFO] 1305727377.636657: openrave services ready: /IK, /GetPositionIK
[INFO] 1305727453.084118: generating ik for <manipulator:arm, parent=katana6m90a>
openravepy.databases.inversekinematics: Generating inverse kinematics for manip arm: TranslationDirection5D [0, 1, 2, 3, 4] (this might take up to 10 min)
openravepy.databases.inversekinematics: creating ik file /home/martin/.openrave/kinematics.06a287e4f96075cb37e70ca665496409/ikfast41.TranslationDirection5D.0_1_2_3_4.cpp
openravepy.ikfast: moved translation [0, 0, -1473/10000] to right end
openravepy.ikfast: moved translation [0, 0, 0] to left end
openravepy.ikfast: moved translation on intersecting axis [0, 0, 0] to left
openravepy.ikfast: ikfast translation direction 5d: [j0, j1, j2, j3, j4]
openravepy.ikfast: attempting li/woernle/hiller general ik method
openravepy.ikfast: found non-singular AU matrix
openravepy.ikfast: solved coupled variables: [j0, j1, j2]
openravepy.ikfast: [j0, j1, j2] [j3, j4]
[...]
openravepy.ikfast: [j0, j1, j2, j3] [j4]
openravepy.ikfast: generating cpp code...
openravepy.databases.inversekinematics: inversekinematics generation is done, compiled shared object: /home/martin/.openrave/kinematics.06a287e4f96075cb37e70ca665496409/ikfast41.TranslationDirection5D.x86_64.0_1_2_3_4.so


In the second terminal, I just see (my own) error message over and over:

IK failed to find a solution
...


Also, if I try to use the "Translation3D" IK type, OpenRAVE hangs for more than 20 minutes on a fast PC after printing "openravepy.ikfast: generating cpp code...". Any idea what I am doing wrong here?

As usual, the necessary files can be found in the katana_description package.

EDIT: Rosen's answer solved my question. For the benefit of later readers, here is what had to be changed:

Before (incorrect):

<direction>0 0 1</direction>
<translation>0 0 0</translation>


After (correct):

<direction>1 0 0</direction>
<translation>0 0 -0.03</translation>


edit retag close merge delete

Sort by » oldest newest most voted

hi guys, please change the direction and origin of the <manipulator> tag as follows:

<direction>1 0 0</direction>
<translation>0 0 -0.03</translation>


when selecting the robot in openrave, you should see the black arrow normal to the gripper surface. this is the most useful form of 5D ik, and ik results are:

openravepy.databases.inversekinematics: success rate: 0.890000, wrong solutions: 0.000000, no solutions: 0.110000, missing solution: 0.079000


You originally had it pointing toward the z-axis, which aligned with one of the joint axes. if you still need z-axis direction, i'll look into the problem and report.

more

Perfect, that solved it. Thanks a lot, OpenRAVE is awesome!
( 2011-05-18 21:22:06 -0600 )edit

I'm Martin's assistant and just wanted to specifiy our problem a little bit, because I just discovered that the IK solver very rarely suceeded.

I'd run:

rosrun openrave openrave.py --database inversekinematics --robot=katana6m90a.robot.xml --usecached --iktests=1000 --iktype=translationdirection5d


with the following results:

 openravepy.databases.inversekinematics: success rate: 0.001000, wrong solutions: 0.002000, no solutions: 0.997000, missing solution: 0.000000


Maybe that helps, if anybody has an idea what could be wrong in our approach.

more