Skip to content
Bas Janssen edited this page Nov 9, 2017 · 19 revisions

Creating the IKFast plugin

Descartes has been designed to be used with IKFast. This means that an IKFast solver plug-in must be build for the robot to be used. All of the steps below have been performed on Ubuntu 14.04 and ROS Indigo.

In these steps it is assumed that the IKFast solution is build for the customized ABB IRB120 robot used in this package.

To build the IKFast plug-in the following tools are required:

collada_urdf

sudo apt-get install ros-indigo-collada-urdf
moveit_kinematics
sudo apt-get install ros-indigo-moveit-kinematics
openrave
sudo apt-get install ros-indigo-openrave
sympy 0.7.0
sudo pip install sympy==0.7.1

If you use ROS Kinetic please follow this guide to install openrave: https://scaron.info/teaching/installing-openrave-on-ubuntu-16.04.html

Patching create_ikfast_moveit_plugin: The current version of the script on Indigo has a problem, as it generates ambiguous Isnans. By applying the patch detailed here: https://github.com/gavanderhoorn/moveit/commit/5d4e3a842bc279f168cf5edb0b7f0c81dd0e3bfe this can be solved. The script can be edited using the following command:

sudo nano -c /opt/ros/indigo/lib/moveit_kinematics/create_ikfast_moveit_plugin.py

First generate a collada file of your robot URDF:

cd irb120_pen_support/urdf
rosrun collada_urdf urdf_to_collada irb120_pen.urdf irb120_pen.dae
Check this model using openrave:
openrave.py irb120_pen.dae

Check for the link names:

openrave-robot.py irb120_pen.dae --info links

When the links are correct, use openrave to generate the C++ source for IKFast:

python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot=irb120_pen.dae --iktype=transform6d --baselink=1 --eelink=11 --savefile=ikfast61_irb120_pen_manipulator.cpp

Create a MoveIt robot support package, if it does not exist yet. Add all links to the kinematic chain group called manipulator:

roslaunch moveit_setup_assistant setup_assistant.launch

Create the package that will become the IKFast plug-in:

catkin_create_pkg irb120_pen_ikfast_manipulator

Generate the IKFast plug-in, this will also update the MoveIt support package to use the IKFast solver:

cd irb120_pen_support/urdf
rosrun moveit_kinematics create_ikfast_moveit_plugin.py irb120_pen manipulator irb120_pen_ikfast_manipulator ikfast61_irb120_pen_manipulator.cpp

Lastly, compile all:

catkin_make

Sources

The basic steps to create the IKFast solution have been taken from the following tutorial: http://wiki.ros.org/Industrial/Tutorials/Create_a_Fast_IK_Solution

The patch for the isnan() has been found on the following link: https://github.com/ros-planning/moveit/issues/584

Clone this wiki locally