feat: add reBot DevArm RobStride support - #17
Conversation
Add a generic environment runtime lifecycle, a guarded motorbridge SocketCAN backend for the seven-motor B601-RS arm, passive hardware validation, documentation, and unit tests.
|
Independent safety review found blocking issues in preemptive e-stop, in-motion feedback/deadman behavior, startup validation, shutdown policy, minimum-jerk velocity bounds, config validation, loopback-only RPC exposure, LIBERO CLI failure handling, gripper settlement evidence, and package discovery. Marking this PR draft while these are corrected and covered by regression tests. No physical motion testing will be performed during the fixes. |
Add preemptive stop RPCs, monitored fail-closed trajectories, startup guards, an agent heartbeat deadman, strict configuration validation, and safe shutdown behavior. Also fix LIBERO CLI validation, package robot backends and config data in wheels, and extend concurrency, lifecycle, packaging, and safety regression coverage.
|
Safety-review remediation is now pushed in The PR body has been updated with the preemptive stop path, monitored fail-closed control, startup/deadman/shutdown guards, wheel/CLI fixes, 49-test result, passive hardware evidence, and the explicit hard-server-crash safety boundary. The PR remains draft pending the independent re-review of the remediated code. |
Publish arm and gripper enabled state only after a final cancellation check under the I/O and state locks, so a concurrent emergency stop always wins. Reject overlong gripper profiles before lazy enable.
|
Follow-up safety audit pushed in |
Prevent motion entry from clearing concurrent stop requests, hold an enabled gripper during soft stop, and latch disable failures until a confirmed emergency-stop retry. Use wall-clock trajectory progress to avoid feedback-latency catch-up bursts and enforce hard configuration ceilings within the 75-second RPC budget.
|
Second-review remediation is pushed in
Validation: 62 passed, Ruff/format, compile/lock/diff, Sphinx |
|
please rebase to main and use the new classes such as |
Summary
EnvRuntimelifecycle contract so robot-specific server/client wiring no longer lives inrpent/cli/main.pyrobots/libero/runtime.py, including early--suite/--taskvalidation and nonzero startup errorsmotorbridgeand SocketCAN; there is nowrc_demodependencySafety behavior
mechPos(0x7019) plus status/fault telemetry without clearing faults, selecting a control mode, enabling torque, or sending a target; close confirmsdisable_allbefore releasing CANmechVelscalereset_stopcannot resurrect an older operationreset_stopis rejected while any stop/disable transition is in progress and whiledisable_failed=trueenable_armvalidates startup position, finite-difference velocity, and operation/fault status before selecting MIT mode; it enables only the six arm joints and holds the observed poseenable_armis idempotent and preserves a physically enabled gripper statestop_motion,emergency_stop, andshutdownuse a priority RPC path that bypasses normal command serialization; feedback/command batches release the I/O lock between motors, so e-stop waits behind at most one motorbridge call before disable startsdisable_all; if disable fails, it retains the controller and physically uncertain enabled/disable_failedstate for retry instead of erasing itSafety boundary
RobStride
0x7028 canTimeoutexists on the tested B601 firmware but defaults to0. Real-hardware tests on motor 7 found no post-enablemode_state 2 -> 0transition after 21.5 seconds of host silence with raw20000, either as a runtime write or after saving parameters in MIT mode. A manual disable was still required. Therefore neither0x7028normotorbridge.set_can_timeout_ms()is treated as a verified watchdog, and a hard crash orSIGKILLof the environment-server process cannot be guaranteed fail-safe by Python. Real-hardware operation must remain attended with the arm supported and a physical emergency stop reachable. The PR remains draft for this reason.Validation at
9bcaad87031e754dce7dc826e10b2d22f9c8543c77 passedwith the complete test suitecompileall,git diff --check, anduv lock --checkpass under the project Python 3.11.14 resolution-W --keep-goingrobots.rebot_robstrideplusconfig/rebot_robstride.example.yamlcan0at 1 Mbit/s detected IDs 1–7; every motor reportedstatus_available=true,status_code=0,fault_raw=0, andwarning_raw=0; torque remained disabled and CAN remainedERROR-ACTIVEwith zero error countersdisable_allon closeDependencies
The optional Linux-only
rebot-robstrideextra addsmotorbridge>=0.4.9(MIT) andPyYAML>=6.0.