Author: Jordi Pages < jordi.pages@pal-robotics.com >

Maintainer: Jordi Pages < jordi.pages@pal-robotics.com >

Support: tiago-support@pal-robotics.com

Source: https://github.com/pal-robotics/tiago_tutorials.git

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. 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

head_action_title.jpg

Purpose

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.

Pre-requisites

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

Execution

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 end_effector:=pal-hey5 public_sim:=true world:=look_to_point

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

gazebo_look_to_point.jpg

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.

look_to_point_window.jpg

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 2023-02-24 10:38:52 by thomaspeyrucain)