Skip to article

Record and replay the first poses

Checked 2026-11-01

Result: replay a short reviewed path and understand the final motor state. You need Extension v9, verified calibration and a profile for every motor. Do not run a complete arm using a one-profile example.

1. Check stationary hardware

Support the arm and keep torque off. These commands read hardware; do not add --include-writes:

macOS / Linux
npm run bus-benchmark -- --port "$SERVO_PORT" --ids 1,2,3,4,5,6 --repetitions 100
Windows PowerShell
npm.cmd run bus-benchmark -- --port "$env:SERVO_PORT" --ids 1,2,3,4,5,6 --repetitions 100
macOS / Linux
npm run telemetry -- --port "$SERVO_PORT" --ids 1,2,3,4,5,6 --samples 1000 --interval-ms 20 --output tools/diagnostics/results/first-check
Windows PowerShell
npm.cmd run telemetry -- --port "$env:SERVO_PORT" --ids 1,2,3,4,5,6 --samples 1000 --interval-ms 20 --output tools/diagnostics/results/first-check

Use the actual IDs. Choose a new telemetry output directory for another run. Voltage checks default to 8–16 V; if that is inappropriate, set --voltage-min and --voltage-max to the hardware’s expected range.

Check: investigate communication failures, alarms and flagged readings. A report file alone does not mean the check passed. Do not substitute the full hardware-diff suite: it can move motors and replace settings.

2. Record two nearby poses

Run the recorder in an interactive terminal:

macOS / Linux
npm run record-poses -- --port "$SERVO_PORT" --ids 1,2,3,4,5,6
Windows PowerShell
npm.cmd run record-poses -- --port "$env:SERVO_PORT" --ids 1,2,3,4,5,6
  1. Support the mechanism and press Enter to confirm torque release.
  2. Wait for Torque off verified.
  3. Choose a supported pose within the travel limits, hold it still and enter start.
  4. Make a small reviewed manual movement, hold the new pose and enter nearby.
  5. Enter done and keep the printed JSON path.

A pose is a sequential snapshot of stationary motors, not a synchronized motion recording. Torque remains off. Files are saved in tools/poses/recordings/; they contain no calibration snapshot and cannot detect later offset changes.

3. Check the configuration and entire path

Create tools/poses/controller.local.json using the configuration guide. Include every recorded motor, its profile and the correct port. The bus must contain exactly those motors. If your mechanism requires a validated gravity model for support, configure it before starting; a zero-compensation example does not establish suitability for your load.

Replace POSES.json with the recorded path and quote paths containing spaces. Preview connects to hardware, reads it and checks targets and configured limits throughout the recording without changing settings or starting movement. It does not check collisions, clearances or the physical path of the links:

macOS / Linux
npm run replay -- tools/poses/controller.local.json POSES.json
Windows PowerShell
npm.cmd run replay -- tools/poses/controller.local.json POSES.json

Check: IDs and port are correct, frame count matches the recording, and targets and speeds are expected. cappedTargets reports targets clipped to current limits. Investigate any clipping before the first run instead of assuming the modified path matches the recording.

4. Start movement

Check the clear path from the present position to the first pose, as well as between recorded poses. Keep hands outside the travel area and retain access to motor power disconnection. This command enables control and motion:

macOS / Linux
npm run replay -- tools/poses/controller.local.json POSES.json --run
Windows PowerShell
npm.cmd run replay -- tools/poses/controller.local.json POSES.json --run

A new session or changed profiles can briefly release torque during startup. Secure or safely support the mechanism beforehand. Joint speeds scale with travel distance, but each servo plans its own S-curve: exact simultaneous arrival is not guaranteed. Waypoints are visited with stops rather than blended into one continuous trajectory.

Check: the program completes without error, positions reach the configured tolerance and a log is saved in logs/motion/. Successful completion is not a measurement of endpoint absolute accuracy.

5. Finish the session

Normal Extension replay completion leaves motors powered and holding the final target. Ctrl+C stops new targets; it is not an immediate motion stop. With a gravity model, the controller services remaining motion and waits for rest before exit. Without a gravity model, it can exit while the motor continues toward the last target. When gravity is configured, the final effort remains, but the host no longer updates it after exit.

To release torque after the process finishes, support the arm, run the recording command from step 2, confirm release, wait for Torque off verified, then enter done. This creates an unused empty recording. If communication is lost, this procedure may fail; an accessible motor power disconnect is still necessary.

Continue as needed: gravity, teleoperation, tuning or log viewing. See session reference for differences between tool stop behavior.


Documentation home · Source revision: a995f77. Extension 9.0.