Jump to: navigation , search

Head Position and State

The head state topic will give you the current pan angle (side-to-side) of the head and report boolean status flags if the robot is currently moving its head.

Note: Flags may not report 'true' values until after the first respective movement command is sent.

Component ID:
head_pan

Head State:
/robot/head/head_state (intera_core_msgs-HeadState)

  • pan field gives you the current angle (radians) of the head. 0 is forward, -pi/2 to Sawyer's right, and +pi/2 to Sawyer's left.
  • isPanning is boolean field that will switch to True while the robot is executing a command.

Note: The isPanning field is initialized to True upon startup and will update thereafter.

Head (Joint) State:
/robot/joint_states (sensor_msgs-JointState)

  • The position of the head may also be determined from the joint_state message.

Head Movement Control

Pan Head:
/robot/head/command_head_pan (intera_core_msgs-HeadPanCommand)

  • target sets the target angle. 0.0 is straight ahead.
  • speed is an integer from [0-100], 100 = max speed.
  • Setting an angle in the command_head_pan topic does not gurantee the head will get to that position. There is a small deband around the reference angle around the order of +/- 0.12 radians.

Example:

    # Check head position/state: 
    $ rostopic echo /robot/head/head_state
    # Move (pan) head side-to-side: 
    $ rostopic pub /robot/head/command_head_pan intera_core_msgs/HeadPanCommand -- 0.0 100