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

Maintainer: Sara Cooper < sara.cooper@pal-robotics.com >

Support: ari-support@pal-robotics.com

Source: https://github.com/pal-robotics/ari_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 ARI'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 ARU. 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 ARI simulation, as shown in the Tutorials Installation Section.

Execution

Open two consoles and source the public simulation workspace as follows:

  • $ cd ~/ari_public_ws
    $ source ./devel/setup.bash

Launching the simulation

In the first console launch for example the following simulation

  •  roslaunch ari_gazebo ari_gazebo.launch public_sim:=true world:=pick_place_cabinet

Gazebo will show up with ARI in front of a cabinet with objects on its shelves.

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 ari_tutorials/ari_look_to_point/src/ari_look_to_point.cpp.

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

  • rosrun ari_look_to_point ari_look_to_point

the node will subscribe to the following topics:

* /head_front_camera/camera_info * /head_front_camera/image_raw

The first topic contains the instrinsic parameters of the camera and the second one the rgb image from the RGBD camera of ARI'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/ARI/Tutorials/motions/head_action (last edited 2020-02-07 16:58:20 by SaraCooper)