Fix Servo pose joint limit halting - #3841
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe servo now applies Cartesian-mode all-joint halting to ChangesCartesian halt behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to 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)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Description
halt_all_joints_in_cartesian_modecurrently 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
POSEcase and passes with it.Checklist
MIGRATION.md— no API changeSummary by CodeRabbit
Bug Fixes
Tests