Skip to content

Fix Servo pose joint limit halting - #3841

Open
zhang-wenchao wants to merge 1 commit into
moveit:mainfrom
vincent-forks:fix/servo-pose-joint-bound-halt
Open

Fix Servo pose joint limit halting#3841
zhang-wenchao wants to merge 1 commit into
moveit:mainfrom
vincent-forks:fix/servo-pose-joint-bound-halt

Conversation

@zhang-wenchao

@zhang-wenchao zhang-wenchao commented Aug 30, 2026

Copy link
Copy Markdown

Description

halt_all_joints_in_cartesian_mode currently applies to twist commands, but not pose commands. When a pose command drives one joint into its position limit, Servo stops that joint while the remaining joints continue moving. The end effector can then move well away from the commanded Cartesian pose.

Treat pose commands as Cartesian commands in haltJoints(). With the default setting enabled, the whole group now stops when a joint reaches its bound and can resume when the command moves away from the bound.

I reproduced this on a Star Arm 102-FL with repeated upward pose commands. Once one joint reached its bound, the other joints kept moving and the tool orientation error grew to about 64 degrees. With this change, the group holds its pose at the bound and recovers on a command in the opposite direction.

The added integration test places Panda joint 7 just inside its limit, sends a pose command that also moves the other joints, and verifies that all positions and velocities are held. The test fails without the POSE case and passes with it.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation — no user-facing workflow change
  • Document API changes in MIGRATION.md — no API change
  • Create tests, which fail without this PR
  • Include a screenshot if changing a GUI — no GUI change
  • Review another open pull request

Summary by CodeRabbit

  • Bug Fixes

    • Cartesian pose commands now correctly halt all joints when a joint reaches its configured limit margin.
    • Halted joints remain stationary with zero velocity and report the appropriate joint-bound state.
  • Tests

    • Added integration coverage for stopping all joints during Cartesian pose control.

Apply halt_all_joints_in_cartesian_mode to pose commands as well as twist commands. Add an integration test that places one joint near its bound and verifies that a Cartesian pose command halts the complete joint group.

Signed-off-by: Zhang WenChao <zhangwenchao001@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b75b8608-5d91-4883-8b6d-1a14d0081e4f

📥 Commits

Reviewing files that changed from the base of the PR and between 1e7a109 and 386f325.

📒 Files selected for processing (2)
  • moveit_ros/moveit_servo/src/servo.cpp
  • moveit_ros/moveit_servo/tests/test_integration.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The servo now applies Cartesian-mode all-joint halting to POSE commands. An integration test verifies the resulting JOINT_BOUND status, unchanged joint positions, and zero joint velocities.

Changes

Cartesian halt behavior

Layer / File(s) Summary
Pose halt handling and integration coverage
moveit_ros/moveit_servo/src/servo.cpp, moveit_ros/moveit_servo/tests/test_integration.cpp
POSE commands now trigger the configured all-joint halt behavior. The integration test covers a panda_joint7 joint-bound condition and verifies the halt result.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 386f3

This localized change makes pose commands halt the full joint group at a position limit and adds coverage for that behavior; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: fixing Servo joint-limit halting for pose commands.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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