Skip to content

ROM soak: stop 5° short of every joint limit - #327

Merged
shawnpatel merged 1 commit into
mainfrom
rom-safety-margin
Sep 25, 2026
Merged

shawnpatel merged 1 commit into
mainfrom
rom-safety-margin

Conversation

@shawnpatel

@shawnpatel shawnpatel commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • rom.enable used to sweep each joint to its exact limit and hold it there for the waypoint pause. That pushed the joint into its end of travel on every cycle of the two-hour soak and overtorqued the motors.
  • The sweep's end points are now 5° inside each limit on both sides (ROM_LIMIT_MARGIN). The limits are inset locally in enable.py; the real limits in robot/axol.py are unchanged, so teleop is unaffected.
  • The gripper open/close cycle is unchanged: it runs on a 0–1 scale with its own force cap.
  • The elbow's home (0°) is also its lower limit. The sweep still returns there between steps, the same rest pose teleop uses, so the elbow is inset only at the top end (145°).
  • Updated the module docstring and docs/cli/diag-rom-enable.mdx.

Test plan

  • New tests/test_rom_limit_margin.py runs one full sweep cycle (with and without the shoulder_3 mirror). It checks that no sweep end point comes within 5° of a limit on either arm, and that each joint still reaches its inset end points.
  • uv run pytest (1594 passed), ruff check ., ruff format --check .
  • Hardware soak with diag.rom-enable

🤖 Generated with Claude Code


Note

Medium Risk
Changes commanded joint positions during a long hardware soak; scope is diagnostics-only and limits in robot/axol are untouched, but incorrect margin logic could reduce ROM coverage or still stress joints at the bench.

Overview
The two-hour ROM soak (diag.rom-enable) no longer commands joints to their exact mechanical limits at each sweep waypoint. Sweep endpoints are inset by ROM_LIMIT_MARGIN (5°) on both sides via a local _inset() wrapper around the canonical limits in robot/axol, so waypoint holds do not park motors against end stops for the full pause cycle.

Teleop and shared limit definitions are unchanged—only the diagnostic ROM module uses the inset ranges. Module and CLI docs now describe the margin behavior.

Tests mock one full run_rom_cycle and assert sweep targets stay at least 5° inside arm_limits while still hitting the inset extremes (with and without shoulder_3 mirroring).

Reviewed by Cursor Bugbot for commit 260fa93. Configure here.

rom.enable swept each joint to its exact limit and held it there for the
waypoint pause, parking the joint against its end of travel on every
cycle of a two-hour soak and overtorquing the motors. Sweep extremes are
now inset by ROM_LIMIT_MARGIN (5°) on both sides; the robot-wide limits
in robot/axol.py are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
axol Ready Ready Preview Sep 25, 2026 1:33am UTC

Request Review

@shawnpatel
shawnpatel merged commit 13a9616 into main Sep 25, 2026
6 checks passed
@shawnpatel
shawnpatel deleted the rom-safety-margin branch September 25, 2026 01:51
shawnpatel added a commit that referenced this pull request Sep 25, 2026
#327 inset every joint's sweep by ROM_LIMIT_MARGIN. Only wrist_2 and
wrist_3 need it; the shoulders, elbow and wrist_1 go back to sweeping
their full limits as before.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 260fa937 Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant