moveit: IkParameterizationType translationyaxisangle4d is not implemented
TranslationYaxis4D is not implemented in moveit_kinematics
With the help of @gavanderhoorn his answer on http://answers.ros.org/question/263925/generating-an-ikfast-solution-for-4-dof-arm/ I have made an IkFast plugin for my robot. When dragging the handles in Moveit the robot goal pose doesn’t move, and while trying to drag I get the message:
[ERROR] [1500016582.397196842]: IK for this IkParameterizationType not implemented yet.
I’ve looked this up and came to the following answer on ros.answers.org http://answers.ros.org/question/191884/ik-for-this-ikparameterizationtype-not-implemented-yet/
I would be greatly helped to know which actions I should take to (similarly as in the answer above) get these kinematics implemented.
Environment
- ROS Distro: Kinetic
- OS Version: Ubuntu 16.04
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (14 by maintainers)
Commits related to this issue
- enable IKP_TranslationZAxisAngle4D, c.f. https://github.com/ros-planning/moveit/issues/548#issuecomment-316298918 — committed to k-okada/SCORE by k-okada 6 years ago
- add IKP_Translation{X,Y,Z}AxisAngle4D to the cpp template, see https://github.com/ros-planning/moveit/issues/548#issuecomment-316298918 and I have tested on https://github.com/k-okada/SCORE/tree/maste... — committed to k-okada/moveit by k-okada 6 years ago
- add IKP_Translation{X,Y,Z}AxisAngle4D to the cpp template, see https://github.com/ros-planning/moveit/issues/548#issuecomment-316298918 and I have tested on https://github.com/k-okada/SCORE/tree/maste... — committed to v4hn/moveit by k-okada 6 years ago
- add IKP_Translation{X,Y,Z}AxisAngle4D to the cpp template, see https://github.com/ros-planning/moveit/issues/548#issuecomment-316298918 and I have tested on https://github.com/k-okada/SCORE/tree/maste... — committed to shadow-robot/moveit by k-okada 6 years ago
- add IKP_Translation{X,Y,Z}AxisAngle4D to the cpp template, see https://github.com/ros-planning/moveit/issues/548#issuecomment-316298918 and I have tested on https://github.com/k-okada/SCORE/tree/maste... — committed to mayman99/moveit by k-okada 6 years ago
- ikfast: implement Translation*AxisAngle4D IK type Fixes #548 — committed to mintar/moveit by mintar 4 years ago
- ikfast: implement Translation*AxisAngle4D IK type Fixes #548 — committed to mintar/moveit by mintar 4 years ago
I have same topic (running moveit on yaw-yaw-z-yaw SCARA robot) and the discussion here was so helpful.
I have to use Translation3D and then manually set the eef rotation, becauses of ikfast issue. For the record,here is what I confirmed;[1 0 0]
(https://github.com/rdiankov/openrave/issues/596#issuecomment-403673192), so we have to add dummy link for that (https://github.com/k-okada/SCORE/commit/d9df9044ba22046d571ca95174890654087ef253)ik fast withTranslationZAxisAngle4D
did not work, see https://github.com/rdiankov/openrave/issues/596 for detail.running ikfast with ‘Translation3D’ and extend code for last yaw axis https://github.com/k-okada/SCORE/commit/549779a137110cfb1d2d2b6a2d2b550851926f7b#diff-25d902c24283ab8cfbac54dfa101ad31, see https://github.com/k-okada/SCORE/commit/2253b14d2761ab9652a780097ea352f26db7252d for the scriptikfast_moveit_plugin.cpp
based on https://github.com/ros-planning/moveit/issues/548#issuecomment-316298918 comment. see https://github.com/ros-planning/moveit/pull/973 for this modificationI can confirm this works with moveit_commander sample code
I’ve added a PR that adds the missing IK types: #1823
The comment here also tries to explain this:
https://github.com/ros-planning/moveit/blob/d8678597530a8cbdb4af5075cd230fdaf1af6aae/moveit_kinematics/ikfast_kinematics_plugin/templates/ikfast61_moveit_plugin_template.cpp#L96-L98
I’ve posted this snippet from the openrave documentation before:
That explains why TranslationYAxisAngle4D doesn’t work, but TranslationZAxisAngle4D does: The “YAxis” or “ZAxis” here is the manipulator’s base link coordinate frame (“world” in your picture), not the end effector frame. Also, it’s not a rotation around that axis, but an angle with that axis - in other words, exactly the pitch angle that you want.
It would be great if you could open a pull request with your change!
What it means is that when you ignore the translation, the rotation of the eef can be expressed as a rotation around one of the robot arm base frame axes.
For example, a SCARA robot has 4 degrees of freedom. The endeffector can rotate. The z axis of the robot’s base frame and eef always point up, since the eef misses the degrees of freedom to rotate the z axis out of that plane. Since the two z axes are always parallel, the eef pose can always be expressed as translation (x,y,z) and yaw angle wrt. the base frame, and
TranslationZAxisAngle4D
would be appropriate.It would help if you could provide the URDF and the generated ikfast solver of your robot.
You should be able to get the rotation angle like this:
If that doesn’t work, try
pose_frame.M.GetEulerZYZ
orpose_frame.M.GetEulerZYX
; see here.You do not calculate it at all.
M
is the 3x3 rotation matrix and you have to extract the Roll/Pitch/Yaw angle yourself. For example thetf
package provides methods to extract them.