The follower moves real hardware, and it will do whatever a command tells it to. Several checks stand between a bad command and the motors, and they are the difference between a robot that stops when something goes wrong and one that keeps going. You set them with SafetyConfig, which goes on the follower rather than the leader. Only the follower can enforce a limit, so one configured anywhere else is a suggestion.

Safe states

The follower is always in one of five states, and only one of them moves the robot.
The follower's five states. A session starts into Holding. Commands arriving move it to Active and commands stopping move it back, which is the normal cycle. Active can drop to Torque off if the failsafe is set to cut torque. Holding and Active both go to Emergency stop, which only a person clears, back to Holding.
Steps 1 to 3 are the normal cycle. The other arrows can happen at any time. A normal session moves between HOLDING and ACTIVE all the time. Letting go of the deadman, a network blip, or a slow tick all drop it back to HOLDING, and the next command that arrives picks it up again. Three things worth knowing:
  • HOLDING is the default failsafe, not TORQUE_OFF. Cutting torque on a loaded arm drops it, so the arm holds instead.
  • ESTOPPED never clears itself. Only clear_estop() leaves it, which is what makes it an emergency stop.
  • TORQUE_OFF is recoverable. arm() reads where the arm has come to rest, puts the power back and returns to HOLDING. Because it reads first, the arm holds where it actually is rather than travelling back to the old target through whatever arc it fell through.

Before you run it

Especially on real hardware, near people.
  • Anyone in the room can take control. Keep it private.
  • Position limits exist only if limits() returns them.
  • slew is per tick, so changing the tick rate changes the speed cap.
  • Watch stats() for overruns. A loop that cannot hold its period makes the watchdog meaningless.
  • Tune the timeouts on your own link. The defaults have not seen your network.

Follower

The gates, the emergency stop, and recovering from a failsafe.

Leader

Claiming control, the deadman, and arming.

Configuration

Every safety setting and its default.

Recording

What a clamp leaves in the dataset.