Skip to content

update the piper limits for j4, I have no idea where these weird non-…#78

Merged
osushkov merged 1 commit into
mainfrom
fix_limits
May 19, 2026
Merged

update the piper limits for j4, I have no idea where these weird non-…#78
osushkov merged 1 commit into
mainfrom
fix_limits

Conversation

@osushkov

Copy link
Copy Markdown
Collaborator

…symmetric numbers came from

@osushkov osushkov requested review from JafarAbdi and araju May 19, 2026 06:15
@greptile-apps

greptile-apps Bot commented May 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the j4 joint limits for the PIPER arm type in get_joint_limits, replacing the asymmetric pair (-1.745 / +1.954 rad) with the symmetric value ±1.85 rad to match the pattern used by all other arm variants (PIPER_H, PIPER_X, PIPER_L).

  • j4 min changed from -1.745 → -1.85 rad (range extended by ~6°); j4 max changed from +1.954 → +1.85 rad (range reduced by ~6°).
  • All other arm types already use symmetric j4 limits, so this aligns PIPER with the established pattern.

Confidence Score: 4/5

Minimal two-number change; the reduction of the positive limit is conservative, but the extension of the negative limit should be verified against the hardware spec before merging.

The change is intentional and consistent with how all other arm variants define j4 limits. The only open question is whether -1.85 is safe for the PIPER hardware given that the prior negative limit was a smaller magnitude (-1.745); if those numbers came from the manufacturer's URDF they may have been correct despite looking asymmetric.

src/piper_control/piper_interface.py — specifically the new j4 min value (-1.85) should be confirmed against the robot's official joint limits.

Important Files Changed

Filename Overview
src/piper_control/piper_interface.py Updated j4 limits for PIPER arm type: min changed from -1.745 to -1.85 (extended range) and max from 1.954 to 1.85 (reduced range), making j4 symmetric at ±1.85 rad, consistent with all other arm variants.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[get_joint_limits called] --> B{arm_type?}
    B -->|PIPER| C["j4: min=-1.85, max=+1.85\n(was -1.745 / +1.954)"]
    B -->|PIPER_H| D["j4: min=-2.216, max=+2.216\n(unchanged)"]
    B -->|PIPER_X| E["j4: min=-1.570, max=+1.570\n(unchanged)"]
    B -->|PIPER_L| F["j4: min=-2.216, max=+2.216\n(unchanged)"]
    B -->|other| G[raise ValueError]
    C --> H[Return symmetric limits dict]
    D --> H
    E --> H
    F --> H
Loading

Fix All in Claude Code Fix All in Codex

Reviews (1): Last reviewed commit: "update the piper limits for j4, I have n..." | Re-trigger Greptile

Comment on lines +114 to +115
"min": [-2.687, 0.0, -3.054, -1.85, -1.309, -2.967],
"max": [2.687, 3.403, 0.0, 1.85, 1.309, 2.967],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Extended negative range worth verifying against hardware

The j4 negative limit was extended from -1.745 to -1.85 rad (~6° more range), while the positive limit was reduced from 1.954 to 1.85 rad. If -1.745 reflected the actual hardware hard-stop (e.g. a mechanical constraint that made the joint inherently asymmetric), commanding the joint to -1.85 could drive it past its physical limit. Worth cross-checking against the Piper hardware datasheet or URDF before shipping.

Fix in Claude Code Fix in Codex

@osushkov osushkov merged commit 2a7362a into main May 19, 2026
4 checks passed
@osushkov osushkov deleted the fix_limits branch May 19, 2026 06:26
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