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

Table of Contents

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.

Tools

Indigo

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

Kinetic

collada_urdf

sudo apt-get install ros-kinetic-collada-urdf
moveit_kinematics
sudo apt-get install ros-kinetic-moveit-kinematics
openrave, using this guide: https://scaron.info/teaching/installing-openrave-on-ubuntu-16.04.html sympy 0.7.0
sudo pip install sympy==0.7.1

Pathing the plugin generator

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

Generating the IKFast code

First generate a collada file of your robot URDF:

cd %your_catkin_ws%/src
cd %your_robot%_support/urdf
rosrun collada_urdf urdf_to_collada %your_robot%.urdf %your_robot%.dae
Check this model using openrave:
openrave.py %your_robot%.dae

Check for the link names:

openrave-robot.py %your_robot%.dae --info links

When the links are correct, use openrave to generate the C++ source for IKFast, with the baselink being the first link of the robot, and the eelink being the last link in your robot, e.g. tool0 or the tip of your tool, in my case link 11:

python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot=%your_robot%.dae --iktype=transform6d --baselink=1 --eelink=11 --savefile=ikfast61_%your_robot%_manipulator.cpp

Even if you are just using a robot from the abb_experimental package, you will have to create a MoveIt support package, as the naming has changed with a recent commit, and the IKFast tools need to have consistent naming, which the ABB repo currently (2017-11-9) does not have.

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:

cd %your_catkin_ws%/src
catkin_create_pkg %your_robot%_ikfast_manipulator

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

cd %your_robot%_support/urdf
rosrun moveit_kinematics create_ikfast_moveit_plugin.py %your_robot% manipulator %your_robot%_ikfast_manipulator ikfast61_%your_robot%_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