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 support for SE2 poses in Collision2D #278

Merged
merged 6 commits into from
Aug 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
SE2.translation is now an alias for SE2.xy().
  • Loading branch information
luisenp committed Aug 30, 2022
commit d0cba3059f6d4856c7f6ce5500ab59e46cc37d6d
4 changes: 2 additions & 2 deletions theseus/geometry/se2.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def theta(self, jacobians: Optional[List[torch.Tensor]] = None) -> torch.Tensor:

@property
def translation(self) -> Point2:
return Point2(tensor=self[:, :2])
return self.xy()

def xy(self, jacobians: Optional[List[torch.Tensor]] = None) -> Point2:
mhmukadam marked this conversation as resolved.
Show resolved Hide resolved
if jacobians is not None:
Expand All @@ -145,7 +145,7 @@ def xy(self, jacobians: Optional[List[torch.Tensor]] = None) -> Point2:
)
J_out[:, :2, :2] = rotation.to_matrix()
jacobians.append(J_out)
return self.translation
return Point2(tensor=self[:, :2])

def update_from_x_y_theta(self, x_y_theta: torch.Tensor):
rotation = SO2(theta=x_y_theta[:, 2:])
Expand Down