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

add Sim(2) #201

Merged
merged 10 commits into from
Apr 23, 2021
Merged

add Sim(2) #201

merged 10 commits into from
Apr 23, 2021

Conversation

johnwlambert
Copy link
Contributor

Add support for 2d rigid body transformations with scaling, e.g. Similarity(2), instead of just SE(2) transformations. SE(2) functionality is already implemented in argoverse-api here

sRt = -Rt @ (self.s_ * self.t_)
return Sim2(Rt, sRt, 1.0 / self.s_)

def transformFrom(self, point_cloud: np.ndarray) -> np.ndarray:
Copy link
Contributor

Choose a reason for hiding this comment

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

I imagine this naming is by convention, but I personally get confused by it. What would be positive / negatives of something like to_target or to_target_frame vs transformFrom?

Additionally, depending on the discussion above, should we consider conforming to snake case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just switched to snake case -- thanks.

Copy link
Contributor

@benjaminrwilson benjaminrwilson left a comment

Choose a reason for hiding this comment

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

Looks good, John. I had a few thoughts regarding overall structure in the code base moving forward. Definitely curious on your thoughts.


Refs:
http://ethaneade.com/lie_groups.pdf
https://github.com/borglab/gtsam/blob/develop/gtsam_unstable/geometry/Similarity3.h
Copy link
Contributor

Choose a reason for hiding this comment

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

This link gives me a 404.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch -- i just updated it with the correct link

argoverse/utils/sim2.py Show resolved Hide resolved
argoverse/utils/sim2.py Show resolved Hide resolved
argoverse/utils/sim2.py Show resolved Hide resolved
argoverse/utils/sim2.py Show resolved Hide resolved
argoverse/utils/sim2.py Show resolved Hide resolved
argoverse/utils/sim2.py Show resolved Hide resolved
tests/test_sim2.py Show resolved Hide resolved
@benjaminrwilson
Copy link
Contributor

LGTM 👍

@johnwlambert johnwlambert merged commit 594c023 into master Apr 23, 2021
@johnwlambert johnwlambert deleted the add-sim2 branch April 23, 2021 14:58
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.

None yet

2 participants