Skip to content
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

orthonormalize the rotationShear() part of transforms #1720

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

erikwijmans
Copy link
Contributor

Motivation and Context

When setting scene graph transformations, we need to explicitly normalize the rotation component to be orthonormal as sometimes floating point errors accumulate.

I also preemptively added an orthornomalize call when updating the camera positions for a robot as that seems like it'll be prone to this issue.

How Has This Been Tested

This was discovered in facebookresearch/habitat-lab#697, so I used the repro script there.

Types of changes

Bug fix (non-breaking change which fixes an issue)

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 6, 2022
@erikwijmans erikwijmans merged commit ccbfa32 into main Apr 7, 2022
@erikwijmans erikwijmans deleted the normalize-rotations branch April 7, 2022 21:24
Copy link
Contributor

@Skylion007 Skylion007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed one minor thing.

@@ -14,6 +14,10 @@
import numpy as np
import quaternion as qt

from habitat_sim._ext.habitat_sim_bindings.core import ( # noqa: F401
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erikwijmans Actually, just realized that this should have been imported via bindings/__init__.py this should have been caught by the import-linter, but I suppose moving the python to src_python may have broken it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples and tests shouldn't, but I think it's fine to important from the bindings directly with src_python. I didn't import this in bindings/__init__.py as I think this function's canonical home should be here as this is where we have other rigid transform utils.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants