Head Orientation and Gaze Control¶
TIAGo Pro's head can be controlled using a service to point the head to any 3D point defined in any available reference frame. This is useful for applications such as visual servoing, where the robot needs to keep its head pointed at a specific target.
For this, use the service /head_controller/point_head to control the head. This service accepts a PointHead message, which contains a target 3D point (defined in any frame) to look at, a pointing axis defined in a head frame, and some parameters to control the speed of the head.
Example¶
To direct the head to a point 1 meter in front of the robot at 2 meters height (from the base_footprint frame), you can use the following command:
ros2 action send_goal /head_controller/point_head_action control_msgs/action/PointHead
"target:
header:
stamp:
sec: 0
nanosec: 0
frame_id: 'base_footprint'
point:
x: 1.0
y: 0.0
z: 2.0
pointing_axis:
x: 1.0
y: 0.0
z: 0.0
pointing_frame: 'sellion_link'
min_duration:
sec: 0
nanosec: 0
max_velocity: 0.2"
It is recommended that you use the sellion_link as the pointing_frame with the x pointing_axis, as they refer to the front of the head for a natural pointing behavior. You can tune the max_velocity or min_duration to adjust the speed of the head movement.