Component:Ikfast

From OpenRAVE

Jump to: navigation, search

Contents

ikfast

Given any set of joints in any OpenRAVE robot, ikfast automatically generates closed-form 6D/3D inverse kinematics solutions for those joints given the position of the end effector of one of the robot links. It is not trivial to create hand-optimized inverse kinematics solutions for arms that can capture all degenerate cases, having closed-form IK speeds up many tasks including planning algorithms, so it really is a must for most robotics researchers. IKfast will hopefully be a useful tool for researchers throughout the world.

Closed-form solutions are necessary for motion planning due to 2 reasons:

  • Numerical inverse kinematics solvers will always be much slower than closed form solutions. Planners require being able to process thousands of configurations per second. The closed-form code generated by ikfast can produce solutions on the order of ~10 microseconds. As a comparison, most numerical solutions are on the order of 10 milliseconds (assuming good convergence).
  • The null space of the solution set can be explored because all solutions are computed.

ikfast uses sympy for the symbolic math and consists of only one python file: ikfast.py. A patched version sympy 0.6.3 is included in any installation of OpenRAVE. For the curious, the patches applied are in ikfast/sympy_0.6.3_patches.diff.

Features

  • Generate inverse kinematics for 6 joints for an end effector rotation and translation (6D).
  • Generate inverse kinematics for 3 joints for an end effector rotation only (3D).
  • All possible discrete solutions calculated (usually up to 8)
  • Generated C++ code independent of OpenRAVE or any other library.
  • Automatically detects degenerate cases where 2 or more axes align and cause infinite solutions.
  • At the moment, algorithm assumes that the translation and rotational components of the kinematics can be separated. In other words, it attempts to solve for the translation component of the end effector first using the first 3 base joints.
  • Invalid solutions are detected by checking if square roots are given negative values or arc sines and arc cosines are given inputs exceeding the [-1,1] range.

Usage

To get help and a description of the ikfast arguments type

./ikfast.py --help

Windows users will have to install python manually and add it to the environment path.

OpenRAVE allows ikfast to be called for any robot using the --generateik command line option:

openrave --generateik robot [robotfile] ikfast [ikfast_executable] [freeparam [joint index]] output [filename] manipulator [index] [rotation3donly]

For example, to generate the inverse kinematics of the barrettwam, type:

openrave --generateik robot robots/barrettwam.robot.xml freeparam Shoulder_Yaw manipulator 0 output ik_barrettwam.cpp

If you set the debug mode to 5, you can see the exact command sent to ikfast.

In order to compile the generated file in Linux/MacOSX do:

gcc -lstdc++ -o ik_barrettwam ik_barrettwam.cpp

This will generate a small program that outputs all solutions given the end effector with respect to the robot base.

Robots

Here are some robots with their auto-generated ik files:

Barrett WAM - 7DOF

media:ik_barrettwam.cpp

Mitsubishi PA-10 - 7DOF

media:ik_pa10.cpp

Puma Arm - 6DOF

media:ik_puma.cpp

Manus Arm - 6DOF

media:ik_manusleftarm.cpp

Man1 - 7DOF

media:ik_man1left.cpp media:ik_man1right.cpp

HRP2 - 7DOF

media:ik_hrp2left.cpp media:ik_hrp2right.cpp

Authors

Rosen Diankov - PhD graduate student at the Robotics Institute at Carnegie Mellon University.

Personal tools