rebot_devarm_leader: add a 'calibrate' subcommand to measure sign/offset_rad (leader/follower zeroing is never cross-verified)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 385
- Forks
- 88
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 82
Description
Context
The rebot_devarm_leader calibration file format supports sign and offset_rad per joint — but no tool measures them. The leader's zero comes from the vendor/motor flash (Damiao) while a follower's zero is set manually in its own calibration flow: two zeroing procedures that nothing cross-verifies. Any constant delta or sign flip between them appears directly as a command at t=0.
Evidence
- A physically closed gripper read +6.227 rad (i.e., −0.056 + 2π) after a power cycle — the Damiao multi-turn counter is volatile, and with 6.8 rad of travel (> 2π) the reading is ambiguous in software (modulo folding is unrecoverable). Confirmed via two independent decode paths (C++ plugin probe and the motorbridge Python stack).
- Commanding "open" from the wrapped branch drove ~13 rad into the mechanical stop and silently latched over-temperature faults (0xC) in the firmware.
- PR #729 added wrap detection (probe exit code 3; per-joint
valid=falsestreaming) — but detection without a measurement/recovery flow still leaves the operator stranded.
Proposal
Add a calibrate subcommand next to probe:
- Guided flow ("fully close the gripper and press ENTER") measures the actual zero and direction,
- Writes
sign/offset_radto the calibration file, - Optionally cross-checks against the follower's convention and errors out loudly on mismatch instead of letting the first teleop frame slam.
Precedent: the same measure-don't-assume approach fixed the mirrored-gripper class in LeRobot (huggingface/lerobot#3942 → measured drive_mode in calibrate(), following the OMX fix in huggingface/lerobot#2815).
On our side, the B601 daemon now refuses /enable on a wrapped gripper and offers POST /rehome_gripper (close-until-stall) — verified live on hardware. The plugin-side calibrate would make that recovery generic.
Part of the field-integration feedback series (SO-101 + reBot DevArm, June 29 – July 6). Priority suggestion: P1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the rebot_devarm_leader implementation and its existing probe subcommand, then trace how the calibration file stores per-joint sign and offset_rad values. Define the guided close-and-confirm flow, persistence, and follower convention check using the wrapped-gripper evidence and the existing B601 recovery behavior. Done means calibrate measures the zero and direction, writes the calibration values, and rejects a convention mismatch loudly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- robotics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100