Skip to content

fix: preserve rotation quadrants in trlog2 - #256

Open
vera-rubin wants to merge 1 commit into
rai-opensource:masterfrom
vera-rubin:fix/trlog2-quadrants
Open

vera-rubin wants to merge 1 commit into
rai-opensource:masterfrom
vera-rubin:fix/trlog2-quadrants

Conversation

@vera-rubin

Copy link
Copy Markdown

trlog2 loses the quadrant for rotations beyond 90°, so its logarithms don't exponentiate back to the input.
We use atan2 in the SO(2) and SE(2) branches to recover the correct angle.
We tested the reported round trips and added a regression covering matrix and twist returns alongside the existing 2D pose and twist tests.

Fixes #252

— ChipLab

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@petercorke

Copy link
Copy Markdown
Collaborator

Thank you for your interest in SMTB, for the report in #252, and for the fix. It's great to have a first PR from you.

I confirmed that 120°, 180° and −120° fail all three round trips (SO2.log, SE2.log, Twist2(SE2).exp) before the change and pass after it, with no new singularity at θ = π in the SE(2) branch. The atan2 change and the regression test are what I'd have written. Thanks for the clear reproducer.

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.

trlog2 loses the quadrant for valid SO(2) and SE(2) rotations

3 participants