Author: Alessandro Di Fava < alessandro.difava@pal-robotics.com >

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

Support: tiago-support@pal-robotics.com

Source: https://github.com/pal-robotics/tiago_dual_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_1.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_dual_public_ws
    source ./devel/setup.bash

Launching the simulation

In the first console launch for example the following simulation

  •  roslaunch tiago_dual_gazebo tiago_dual_gazebo.launch public_sim:=true world:=tutorial_office gzpose:="-x 1.40 -y -2.79 -z -0.003 -R 0.0 -P 0.0 -Y 0.0"

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

tiago++_head_gazebo.jpg

Running the example of C++ action client

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

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

  • rosrun head_look_to_point head_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.

head_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.

head_action_1.jpg head_action_2.jpg head_action_3.jpg head_action_4.jpg

Wiki: Robots/TIAGo++/Tutorials/motions/head_action (last edited 2023-03-06 14:13:21 by thomaspeyrucain)