Author: Jordi Pages < >

Maintainer: Jordi Pages < >



(!) 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.

Head control

Description: Example on how to move TIAGo's head using an action that makes the robot look to a given direction.

Keywords: joint, trajectory controller, rqt_joint_trajectory_controller

Tutorial Level: BEGINNER

Next Tutorial: Play back pre-defined upper body motions



This tutorial shows how to use the head action to move the head of TIAGo. The action can be used to make the robot head to look at any point expressed in any frame.


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


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 for example the following simulation

  •  roslaunch tiago_gazebo tiago_gazebo.launch robot:=titanium public_sim:=true world:=look_to_point

Gazebo will show up with TIAGo in front of a table with objects.


Running the example of C++ action client

An example of C++ node using a head action client is given in tiago_tutorials/look_to_point/src/look_to_point.cpp.

In order to run the node write the following instruction in the second console

  • rosrun look_to_point look_to_point

the node will subscribe to the following topics:

* /xtion/rgb/camera_info * /xtion/rgb/image_raw

The first topic contains the instrinsic parameters of the camera and the second one the rgb image from the RGBD camera of TIAGo's head.

The rgb image will be shown in a window that will show up.


By clicking on any pixel of the image the robot will move its head in order to look at that point. With this we can easily lower or raise the head, look right or leftwards, etc.

look_to_point_lower_head.jpg look_to_point_raise_head.jpg look_to_point_left.jpg look_to_point_right.jpg

Wiki: Robots/TIAGo/Tutorials/motions/head_action (last edited 2016-10-24 07:33:06 by Jordi Pages)