Head Movement Example

From sdk-wiki
Jump to: navigation, search

Summary

The Head "Wobbler" Example randomly moves the head to demonstrate using the head pan and nod interfaces.

Code Walkthrough

Head Wobbler - Code Walkthrough

Quickstart

From an RSDK Shell, run the head_wobbler.py demo from the baxter_examples package:

    $ rosrun baxter_examples head_wobbler.py

Baxter's head will nod and begin panning left and right to random angles.

Overview

Baxter's head can move up and down in a nod_ motion, and rotate left-to-right in a _pan motion. The head nod motion is a single action that can be triggered to run, but cannot be set to a specific angle. The pan motion swings Baxter's 'face' (a.k.a. screen) to a settable angle, rotating around the vertical axes of the head.

The head wobbler example is intented to be a simple demo whose code can be examined to learn how to use the head and demonstrate the use of the baxter_interface Head class. The non-interactive demo calls the command_nod() function and then sets the head pan to a few randomly generated angles, waiting in between each in order to give enough time for the head to move there.

For more information on Baxter's head, see Using the Head.

Interfaces

ROS API

See the API Reference page for details.

  • Head Action Client Interface: robot/head/head_action

baxter_interface APIs

  • Head class: head.py
  • command_nod()
  • set_pan( <angle> )

Documentation

Head Wobbler - Code Walkthrough

Troubleshooting

For common issues specific to using wobbler with Baxter, check out the Troubleshooting page.