Fix Servo Jacobian fallback without IK solver - #3826
Conversation
Signed-off-by: Dennis Lanov <dennis.lanov@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 (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThis change enables solver-less chain groups to resolve Jacobian-compatible base and tip frames. Twist and Pose command handling now accepts these frames, reports ambiguous frame failures, and tests finite nonzero joint deltas. ChangesSolver-less Jacobian command handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change enables TWIST and POSE commands to use the existing Jacobian fallback for solver-less chain groups while preserving safe behavior for non-chain groups; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Servo
participant FrameHelpers
participant RobotState
participant JacobianFallback
Servo->>FrameHelpers: resolve planning base and tip frames
FrameHelpers-->>Servo: return chain frames
Servo->>RobotState: process Twist or Pose command
RobotState->>JacobianFallback: compute joint deltas from Jacobian
JacobianFallback-->>Servo: return finite nonzero joint deltas
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Description
Fixes #3789.
MoveIt Servo already has a direct-Jacobian fallback in
jointDeltaFromIK()when no IK solver is configured. However, TWIST and POSE commands could not reach that path becausegetIKSolverBaseFrame()andgetIKSolverTipFrame()returnedstd::nulloptwhenever the planning group had no IK solver.This change allows solver-less kinematic chain groups to use the same base and tip frames that
RobotState::getJacobian()uses internally:Groups with an IK solver retain the existing behavior and continue using the solver-provided frames.
For non-chain groups without an IK solver, the helpers continue to fail safely with
std::nulloptrather than choosing an ambiguous frame.Regression coverage verifies:
Testing
Validated with an incremental
moveit_servobuild:colcon build --packages-select moveit_servo— passedmoveit_servo_utils_test— 18/18 passedpre-commiton all changed files — passedgit diff --check— passedChecklist
Summary by CodeRabbit
New Features
Bug Fixes
Tests