mix bb_so101.calibrate (bb_so101 v0.3.0)

Copy Markdown View Source

Calibrates servo range of motion by having the user manually move the arm through its full range while tracking min/max positions for all joints.

Usage

mix bb_so101.calibrate PORT [OPTIONS]

Arguments

  • PORT - Serial port (e.g., /dev/ttyUSB0 or /dev/ttyACM0)

Options

  • --baud-rate, -b - Baud rate (default: 1000000)
  • --dry-run, -n - Show what would be done without writing offsets
  • --joint, -j - Calibrate only these joints. Repeatable, and accepts a comma-separated list. Defaults to all of them.

Process

  1. Disables torque on the servos being calibrated so you can move them freely
  2. Move each of those joints through its FULL range of motion
  3. The display shows live min/max tracking for each joint
  4. Press Enter when done
  5. Locates each joint's zero within the travel it recorded
  6. Sets position_offset so that zero corresponds to 0 radians

Where zero goes

For most joints, zero is the midpoint of the recorded travel. They are symmetric about it, and the midpoint splits the cost of not quite reaching a stop across both ends.

The gripper is anchored to its closed stop instead, 10° below zero — the lower limit in the official SO-101 URDF. It is the one joint whose physical endpoint matters, because "actually closed" is what gripping depends on, so the slack is pushed to the open end where nothing relies on it.

Calibration begins by resetting position_offset to zero, so a joint that is not listed keeps the calibration it already has. Name the joints you have actually disturbed — after re-mounting a horn or swapping a servo — rather than recalibrating the whole arm and having to move every joint again.

Example

mix bb_so101.calibrate /dev/ttyUSB0
mix bb_so101.calibrate /dev/ttyUSB0 --dry-run
mix bb_so101.calibrate /dev/ttyUSB0 --joint gripper
mix bb_so101.calibrate /dev/ttyUSB0 -j wrist_roll -j gripper