Skip to content

Commit

Permalink
Fix quaternion transform where from equals to.
Browse files Browse the repository at this point in the history
  • Loading branch information
oysand committed Feb 11, 2022
1 parent 19391a6 commit 8670f3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/alitra/frame_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ def transform_quaternion(
from_: Literal["robot", "asset"],
to_: Literal["robot", "asset"],
) -> Quaternion:
if from_ == to_:
return quaternion

quaternion_from: Rotation = Rotation.from_quat(quaternion.as_np_array())

if not isinstance(quaternion, Quaternion):
Expand Down

0 comments on commit 8670f3a

Please sign in to comment.