Skip to content

Commit

Permalink
fix failing test due to wrong inverse function call
Browse files Browse the repository at this point in the history
  • Loading branch information
powertj committed Nov 2, 2023
1 parent 5e0f624 commit 4d06979
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pytorch_kinematics/transforms/transform3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def transform_normals(self, normals):
if normals.dim() not in [2, 3]:
msg = "Expected normals to have dim = 2 or dim = 3: got shape %r"
raise ValueError(msg % (normals.shape,))
mat = self._get_matrix_inverse()[:, :3, :3]
mat = self.inverse().get_matrix()[:, :3, :3]
normals_out = _broadcast_bmm(normals, mat)

# This doesn't pass unit tests. TODO investigate further
Expand Down Expand Up @@ -435,7 +435,7 @@ def transform_shape_operator(self, shape_operators):
if shape_operators.dim() not in [3, 4]:
msg = "Expected shape_operators to have dim = 3 or dim = 4: got shape %r"
raise ValueError(msg % (shape_operators.shape,))
mat = self._get_matrix_inverse()[:, :3, :3]
mat = self.inverse().get_matrix()[:, :3, :3]
shape_operators_out = _broadcast_bmm(mat.permute(0, 2, 1), _broadcast_bmm(shape_operators, mat))

# When transform is (1, 4, 4) and shape_operator is (P, 3, 3) return
Expand Down

0 comments on commit 4d06979

Please sign in to comment.