Safety¶
The library has several layers of protection. None of them replaces a hand on the power switch.
Layer |
Where |
What it does |
|---|---|---|
Soft joint limits |
|
every joint target is clipped |
Jump guard |
|
a target that far from the previous one raises |
Rate limit |
|
joint targets move at most this fast (3 deg per 30 Hz cycle) |
Low-pass filter |
|
removes steps and jitter from targets |
Torque cap |
|
the MIT position target is clamped to measured +- 10 deg, so the PD torque is at most kp x 10 deg |
Feedforward clip |
|
caps the total feedforward (gravity, friction, ripple) in case the model is wrong |
Gain ramp |
|
gains and feedforward rise from zero at enable: no torque step |
Stall detection |
|
a joint more than 10 deg behind its target for 1 s while moving less than 1 deg raises |
Temperature |
|
a warning is logged; above the stop limit torque goes off (or the arm holds, |
Cartesian limits |
tool |
workspace box, speed, tilt and yaw limits on TCP commands; unreachable steps are refused |
Staged fold |
|
on a normal exit the arm folds base + wrist first, then shoulder + elbow |
When something goes wrong: the arm holds¶
The rule: torque goes off only on purpose. An arm that loses torque in mid-air falls and hits something, so a failure never switches torque off and never starts a motion. The arm holds where it is, stays enabled, and waits for the next program or for the operator.
What happens |
What the arm does |
|---|---|
The |
folds to the zero pose in stages, then torque off |
An exception in your code, Ctrl-C, SIGTERM (CLI) |
holds the measured pose, stays enabled; the program exits |
Stall detected ( |
holds the measured pose, |
The servo thread dies (bus error, bug) |
sends one last hold frame if it can, stays enabled |
The program is killed, the PC hangs, the CAN cable comes off |
the motors keep executing the last frame they got |
A driver exceeds |
torque off, the arm falls, |
|
torque off: the operator’s decision |
Two settings change this: safety.on_stall: disable (torque off on a stall: the choice when pressing into a person
matters more than the fall) and safety.on_overtemp: hold (keep holding a hot motor until its own protection
trips).
How the hold survives the program¶
In MIT mode a RobStride driver keeps executing the last frame it received. With its CAN timeout at 0 (parameter
0x7028; the value found on the B601-RS, checked at every connect) it does so for as long as it has power. When a
program leaves by an error, Arm.detach() sends one last frame, “hold the measured pose, target velocity zero,
gravity feedforward for this pose”, and releases the bus without disabling anything.
Warning
Nobody watches a held arm. There is no stall check and no temperature guard until a program connects again. The motors keep producing the torque the pose needs, and the only protection left is the drivers’ own.
Taking over¶
Arm.connect() never assumes that torque is off. It reads the joint angles with parameter reads (which do not
replace the frame a motor is executing), then sends one full-gain frame that holds exactly those angles: an
enabled motor keeps holding, a disabled one ignores it, and both answer with their state. If motors are enabled,
the Arm continues the hold without a jump and sets arm.taken_over; your program decides what to do from there
(arm.move_home(), arm.fold(), …).
The hold is continued at the same equilibrium, not at the measured angles: the new target is placed so that the controller asks for the torque the motors report at that moment. A held arm sits a little away from its target (gravity model error, friction), and re-targeting to the measured angle would move it by that error at every take-over. For the same reason a stop keeps the target of every joint that was following it and only re-targets joints that are far from theirs.
A program that only looks (rebot-control state, or a with block that never calls enable() or a motion
command) leaves a held arm exactly as it found it. state prints torque: ON, holding in that case.
Releasing¶
rebot-control release --fold # fold to the zero pose from where it is, then torque off
rebot-control release # torque off now: hold the arm with your hand first
Both ask for confirmation. arm.release(fold=True) / arm.release() do the same from code.
Kill switch: cut motor power (support the arm: it falls).
Before running new code on the real arm¶
Run the same script with
--sim(orbackend="sim") and look at it with the viewer.Start slow: low
max_speed, a small workspace box.Keep the arm folded until the code has proven itself at the home pose.