Repository navigation
Fix SpatialForce/SpatialMomentum SE(3) transform to use the coadjoint (Ad^-T) #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
petercorke
merged 6 commits into
rai-opensource:master
from
youdie006:fix/169-spatial-force-coadjoint
Sep 16, 2026
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a319c45
Fix SpatialForce/SpatialMomentum SE(3) transform to use the coadjoint
youdie006 67f5413
Address review: refresh stale docstrings and take the cheaper coadjoi…
youdie006 444e126
Merge branch 'master' into fix/169-spatial-force-coadjoint
youdie006 f4ef2ba
Merge branch 'master' into fix/169-spatial-force-coadjoint
youdie006 97e2798
Merge branch 'master' into fix/169-spatial-force-coadjoint
youdie006 a3e9f7c
Merge branch 'master' into fix/169-spatial-force-coadjoint
petercorke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Fix SpatialForce/SpatialMomentum SE(3) transform to use the coadjoint
A spatial force/wrench is dual to spatial motion, so under an SE(3) transform it must map by the coadjoint Ad^-T (inverse-transpose of the adjoint), not the adjoint transpose Ad^T. Because the SE(3) adjoint is non-orthogonal whenever the translation is nonzero, Ad^T != Ad^-T, so SpatialForce/SpatialMomentum were transformed incorrectly for any pose with translation (correct only for a pure rotation, where Ad is orthogonal). For example T = SE3(1, 0, 0) acting on a unit z-force and a y-angular-velocity breaks the invariance of instantaneous power (f . v), which must be frame-independent: the current code gives 0 in one frame and 2 in the other. Use np.linalg.inv(Ad).T in SpatialForce.__rmul__ and in the force/momentum branch of the general SpatialVector.__rmul__. Motion (velocity/acceleration), which correctly uses Ad, is unchanged. Add a regression test to the previously-empty test_products stub asserting the power invariance and the explicit transformed wrench/momentum. Fixes #169.
- Loading branch information
commit a319c455d3458b8dfc70759a28342918ca117a4f
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A modest (8%) speed increase if you compute adjoint of inv(T).