Skip to content

Robot State and EStop

Rob Linsalata edited this page Sep 26, 2013 · 3 revisions

The "Robot State" refers to the state variable that shows whether the robot (motors) are enabled or disabled, if the e-stop is engaged, and if there are any hardware errors.

Quickstart

Use the [[enable_robot|Enable Robot Example]] tool with various arguments to enable the robot or check its current state.

Overview

The "Robot State" refers to the state variable that shows whether the robot (motors) are enabled or disabled, if the e-stop is engaged, and if there are any hardware errors.

EStop and State Message

Below are various state messages and what they mean and indicate. The third column tells you the Resolution to follow if having a problem and you see this message.

Message EStop State / Error Meaning Resolution
enabled: False Robot is disabled; Power to motors is OFF [[Enable robot
estop_button: 1 E-Stop button is engaged or loose.
estop_button: 2 S/W Stop was called.
estop_button: 3 E-Stop button now disengaged (released), but not reset yet.

EStop States

Below is the raw contents of the [baxter_msgs/AssemblyState][baxter_msgs-AssemblyState] Message from the /robot/state topic. The contents explain the meaning of the estop_button and estop_source fields.

$ rosmsg show baxter_core_msgs/AssemblyState -r
bool enabled             # true if enabled
bool stopped             # true if stopped -- e-stop asserted
bool error               # true if a component of the assembly has an error
#
# The following are specific to the robot top-level assembly:
uint8  estop_button      # One of the following:
  uint8   ESTOP_BUTTON_UNPRESSED = 0   # Robot is not stopped and button is not pressed
  uint8   ESTOP_BUTTON_PRESSED   = 1
  uint8   ESTOP_BUTTON_UNKNOWN   = 2   # STATE_UNKNOWN when estop was asserted by a non-user source
  uint8   ESTOP_BUTTON_RELEASED  = 3   # Was pressed, is now known to be released, but robot is still stopped.
#
uint8  estop_source      # If stopped is true, the source of the e-stop.  One of the following:
  uint8  ESTOP_SOURCE_NONE      = 0   # e-stop is not asserted
  uint8  ESTOP_SOURCE_USER      = 1   # e-stop source is user input (the red button)
  uint8  ESTOP_SOURCE_UNKNOWN   = 2   # e-stop source is unknown
  uint8  ESTOP_SOURCE_FAULT     = 3   # MotorController asserted e-stop in response to a joint fault
  uint8  ESTOP_SOURCE_BRAIN     = 4   # MotorController asserted e-stop in response to a lapse of the brain heartbeat

This table shows example scenarios of various E-Stop states and the corresponding robot state message that would be published.

Message EStop State / Error Resolution
enabled: True
stopped: False
error: False
estop_button: 0
estop_source: 0
(Good) Robot is enabled; E-Stop is connected and disengaged.
enabled: False
stopped: False
error: False
estop_button: 0
estop_source: 0
(Good) EStop connected and not triggered; robot disabled; or robot reset. Use the enable_robot tool to enable the robot:
$ rosrun tools enable_robot.py -e
enabled: False
stopped: True
error: True
estop_button: 1
estop_source: 1
E-Stop is engaged; Or E-Stop has come loose. Disengage the E-Stop, make sure it is firmly connected to the robot, then reset the robot.
enabled: False
stopped: True
error: False
estop_button: 3
estop_source: 1
E-Stop is released (or reconnected), but not reset. Reset the robot, then try again:
$ rosrun tools enable_robot.py -r
enabled: False
stopped: True
error: True
estop_button: 2
estop_source: 1
User triggered (Software) E-Stop. Reset the robot, then try again:
$ rosrun tools enable_robot.py -r

More Information

See the Enable Robot Example for more information about the robot's state and dealing with errors.

  [baxter_msgs-AssemblyState]: http://github.com/RethinkRobotics/sdk-examples/blob/master/baxter/baxter_msgs/msg/AssemblyState.msg

Clone this wiki locally