Package baxter_interface :: Module head :: Class Head
[hide private]
[frames] | no frames]

Class Head

source code

object --+
         |
        Head

Interface class for the head on the Baxter Robot.

Used to control the head pan angle and to enable/disable the head nod action.

Instance Methods [hide private]
 
__init__(self)
Constructor.
source code
 
_on_head_state(self, msg) source code
float
pan(self)
Get the current pan angle of the head.
source code
bool
nodding(self)
Check if the head is currently nodding.
source code
bool
panning(self)
Check if the head is currently panning.
source code
 
set_pan(self, angle, speed=100, timeout=10.0)
Pan at the given speed to the desired angle.
source code
 
command_nod(self, timeout=5.0)
Command the head to nod once.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Constructor.

Overrides: object.__init__

pan(self)

source code 

Get the current pan angle of the head.

Returns: float
current angle in radians

nodding(self)

source code 

Check if the head is currently nodding.

Returns: bool
True if the head is currently nodding, False otherwise.

panning(self)

source code 

Check if the head is currently panning.

Returns: bool
True if the head is currently panning, False otherwise.

set_pan(self, angle, speed=100, timeout=10.0)

source code 

Pan at the given speed to the desired angle.

Parameters:
  • angle (float) - Desired pan angle in radians.
  • speed (int) - Desired speed to pan at, range is 0-100 [100]
  • timeout (float) - Seconds to wait for the head to pan to the specified angle. If 0, just command once and return. [10]

command_nod(self, timeout=5.0)

source code 

Command the head to nod once.

Parameters:
  • timeout (float) - Seconds to wait for the head to nod. If 0, just command once and return. [0]