Repository navigation
fix(ik): Robot.ikine_* accept an (N, 4, 4) array of poses - #714
Open
petercorke wants to merge 1 commit into
Open
petercorke wants to merge 1 commit into
petercorke wants to merge 1 commit into
Conversation
ETS.ikine_* accept an (N, 4, 4) array as a pose trajectory but the Robot wrappers did not: they built the pose with SE3(Tep, check=False), which silently makes a malformed object from a 3-D array, and the solver then failed deep inside with a shape-mismatch ValueError. Convert the array with a small helper that works around spatialmath not accepting such an array (spatialmath-python#236), and reject any other array shape up front with a clear ValueError. Applies to the ikine_* and ik_* wrappers, the ik_* (C++) solvers still handle a single pose only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 14 |
| Duplication | -4 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #714 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 143 143
Lines 14269 14277 +8
=====================================
- Misses 14269 14277 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ETS.ikine_*accept an(N, 4, 4)array as a pose trajectory, but theRobotwrappers (Robot.ikine_LM/NR/GN/QP) did not. They built the pose withSE3(Tep, check=False), which silently makes a malformed object from a 3-D array, and the solver then failed deep inside withValueError: operands could not be broadcast together with shapes (3,4) (3,)._as_se3, that works around spatialmath not accepting such an array (reported as Enhancement: SE3 constructor should accept an (N, 4, 4) ndarray as N poses rai-opensource/spatialmath-python#236), and reject any other array shape up front with a clearValueError. The helper is used at all seven wrap sites (the fourikine_*and the three C++ik_*wrappers). Theik_*solvers still handle a single pose only.Notes
(N, 4, 4)array is accepted byRobot.ikine_*, which is only true with this change.Test plan
tests/test_IK.pyandtests/test_ik_joint_limits.pypass locallytest_robot_ikine_accepts_pose_arrays(LM/GN/NR, array vsSE3input give the same result, and a single 4x4 array still works) fails onmainwith theValueErrorabove and passes heretest_robot_ikine_rejects_badly_shaped_arrays🤖 Generated with Claude Code