Skip to content

rebot_devarm_leader: add a 'calibrate' subcommand to measure sign/offset_rad (leader/follower zeroing is never cross-verified) #734

Description

@johnnynunez

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 Add reBot DevArm leader arm plugin (Damiao dm-serial backend) #729 added wrap detection (probe exit code 3; per-joint valid=false streaming) — but detection without a measurement/recovery flow still leaves the operator stranded.

Proposal

Add a calibrate subcommand next to probe:

  1. Guided flow ("fully close the gripper and press ENTER") measures the actual zero and direction,
  2. Writes sign/offset_rad to the calibration file,
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    TBD

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions