Difference between revisions of "Enable Robot"

Jump to: navigation , search
(EStop and Robot State)
 
Line 91: Line 91:
 
<div class="content-block">
 
<div class="content-block">
 
=== EStop and Robot State ===
 
=== EStop and Robot State ===
For more information about the E-Stop states and the robot state message, see: [[Robot State and EStop]].
+
For more information about the E-Stop states and the robot state message, see: [[E-STOP and Enable Robot]].
  
 
=== Troubleshooting ===
 
=== Troubleshooting ===

Latest revision as of 18:31, 13 January 2017

Overview

The enable robot example program will allow you to enable/disable/reset/stop the robot. You can also get the robot's current state. The robot must be enabled in order to control the motors. In order to control Sawyer's arms, the robot must be put in the 'Enabled' state. Enabling the robot provides power to the joint motors, which are initially in the 'Disabled' state on start-up or after a serious error, such as an E-Stop (Emergency-Stop). The robot's 'State' can be checked with the enable_robot tool.

Note: If an error has occurred, the robot state may need to be reset (-r) before being enabled again.

Basic Usage

To Enable the robot:

$ rosrun intera_interface enable_robot.py -e

To Disable the robot:

$ rosrun intera_interface enable_robot.py -d

Functions

To get help on enable_robot use the -h argument:

$ rosrun intera_interface enable_robot.py -h

Help screen:

enable_robot.py [ARGUMENTS]

  • h, --help show this help message and edit
  • s, --state Print current robot state
  • e, --enable Enable the robot
  • d, --disable Disable the robot
  • r, --reset Reset the robot
  • S, --stop Stop the robot

Robot State

To get the current robot state use -s:

$ rosrun intera_interface enable_robot.py -s

enabled: False
stopped: False
error: False
estop_button: 0
estop_source: 0

The state output above indicates a normal (all-clear) status, as you would see after power-up. Once you enable the robot to control the arms, you should see the same status but with enabled: True.

Enable Robot

Use -e to enable the robot.

$ rosrun intera_interface enable_robot.py -e

The robot state enabled field should then switch to True.

Disable Robot

Use -d to disable the robot.

$ rosrun intera_interface enable_robot.py -d

The robot state enabled field should then switch to False.

Reset

Use -r to reset the robot after an error (if the robot state gives error: True).

$ rosrun intera_interface enable_robot.py -r

This should clear the error field, setting it back to error: False.

Stop

Use -S (capital S) to stop the robot. This is similar to a "software" E-Stop.

$ rosrun intera_interface enable_robot.py -S

This will disable the robot and also cause the stopped field and the error field to go True. You will need to reset the robot before enabling it again.

EStop and Robot State

For more information about the E-Stop states and the robot state message, see: E-STOP and Enable Robot.

Troubleshooting

Robot fails to enable or reset

If your robot "fails to reset" when you run robot enable, the first thing to check is if the E-Stop is engaged:

$ rosrun intera_interface enable_robot -s

enabled: False
stopped: True
error: True
estop_button: 1
estop_source: 1

If the estop_button: field says '1', it means the E-Stop is engaged (from [intera_core_msgs/AssemblyState][intera_core_msgs-AssemblyState] message: uint8 ESTOP_BUTTON_PRESSED=1). Disengage the E-Stop by twisting the red top until it 'pops'-up, then try resetting the robot.

$ rosrun intera_interface enable_robot -r
$ rosrun intera_interface enable_robot -e