Skip to content

Fix SE matrix conjugation to use the inverse - #320

Open
kaushikgunasekaren wants to merge 2 commits into
rai-opensource:masterfrom
kaushikgunasekaren:fix-se-conjugation-nov22
Open

kaushikgunasekaren wants to merge 2 commits into
rai-opensource:masterfrom
kaushikgunasekaren:fix-se-conjugation-nov22

Conversation

@kaushikgunasekaren

Copy link
Copy Markdown

Bug

conjugation(A) is documented as the matrix similarity transform X @ A @ inv(X). For SE2 and SE3, it instead multiplies by the transpose of the inverse. With nonzero translation, even conjugating the identity matrix no longer returns identity, and conjugating a Lie-algebra matrix does not match the pose adjoint.

Change

Remove the extra transpose from the SE branch. Keep the SO branch's transpose, which is already the inverse of a rotation matrix. No operator-overload or covariance-transform semantics change is included.

Validation

  • 24 focused regression/control cases: 16 fail before the fix; all 24 pass after it.
  • SO2/SO3 controls, SE2/SE3 translations and combined translation/rotation, identity/dense/diagonal matrices, inverse-conjugation round trips, unchanged inputs and pose storage.
  • Lie-algebra results match an independently assembled adjoint result and preserve the required bottom row or skew symmetry.
  • Full local suite: 590 passed, 3 skipped, 99 subtests passed (21 warnings), versus 566 passed on unchanged master.
  • Regression-test Black 23.10.0, fatal changed-file flake8 and added-line whitespace checks pass. Existing unrelated source formatting is preserved. Whole-repository fatal lint has two pre-existing undefined-name findings in tests/test_dualquaternion.py.

AI assistance was used for investigation, implementation and tests. Validation is local Python testing only; no hardware validation is claimed.

This branch has not been deployed

No deployments
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