Author: Alessandro Di Fava < >

Maintainer: Jordi Pages < >, Alessandro Di Fava < >



(!) Please ask about problems and questions regarding this tutorial on Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Planning in cartesian space with TRAC-IK

Description: Use TRAC-IK in MoveIt! to plan a joint trajectory in order to reach a given pose in cartesian space

Keywords: Motion planning, cartesian space, inverse kinematics, TRAC-IK

Tutorial Level: INTERMEDIATE

Next Tutorial: Planning with Octomap



This tutorial shows how to use TRAC-IK in MoveIt! in order to move the end-effector frame of TIAGo to a desired pose in cartesian space.


First make sure that the tutorials are properly installed along with the TIAGo simulation, as shown in the Tutorials Installation Section.

Install TRAC-IK plugin

In order to execute the demo first we need to install the TRAC-IK plugin for MoveIt! in your workspace. In a console run the following command

sudo apt-get install ros-indigo-trac-ik-kinematics-plugin

The command adds the trac-ik-kinematics-plugin and trac_ik_lib to your workspace.


First open two consoles and source the public simulation workspace as follows:

cd ~/tiago_public_ws
source ./devel/setup.bash

Launching the simulation

In the first console launch the following simulation

IK_SOLVER=trac_ik roslaunch tiago_gazebo tiago_gazebo.launch public_sim:=true robot:=steel

Gazebo will show up with TIAGo.


Wait until TIAGo has tucked its arm. Then you may proceed with the next steps.

The IK_SOLVER=trac_ik environment variable is used to set TRAC_IK solver as the solver to use in MoveIt! Without this variable, the default solver is the KDL one. The configuration file tiago_moveit_config/config/kinematics_trac_ik.yaml referred to TRAC_IK solver is shown:

  kinematics_solver: trac_ik_kinematics_plugin/TRAC_IKKinematicsPlugin
  kinematics_solver_timeout: 0.005
  solve_type: Speed
  position_only_ik: false
  kinematics_solver: trac_ik_kinematics_plugin/TRAC_IKKinematicsPlugin
  kinematics_solver_timeout: 0.005
  solve_type: Speed
  position_only_ik: false

See for details about the parameters.

Launching the nodes

Now we are going to run the example of the previous tutorial (see for details) that will bring TIAGo's end-effector frame, i.e. arm_tool_link, to the following cartesian space configuration with respect to /base_footprint:

x: 0.4
y: -0.3
z: 0.26
Roll: -0.011
Pitch: 1.57
Yaw: 0.037

In order to safely reach such a cartesian goal the node plan_arm_torso_ik included in tiago_moveit_tutorial package has to be called as follows

rosrun tiago_moveit_tutorial plan_arm_torso_ik 0.4 -0.3 0.26 -0.011, 1.57, 0.037

An example of plan executed by the node is depicted in the following sequence of images:





Note that the final pose of /arm_tool_link is the same of the previous tutorial, but the joints configuration of the arm is different. It depends on MoveIt! planner but it's also due to the using of a different IK solver.

Wiki: Robots/TIAGo/Tutorials/Planning_cartesian_space_TRAC_IK (last edited 2017-04-12 09:01:30 by AlessandroDiFava)