From 8670f3a2db02bb1afacb54b5448e487fdb79af9e Mon Sep 17 00:00:00 2001 From: oysand Date: Fri, 11 Feb 2022 09:23:43 +0100 Subject: [PATCH] Fix quaternion transform where from equals to. --- src/alitra/frame_transform.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/alitra/frame_transform.py b/src/alitra/frame_transform.py index ca7d54f..2309020 100644 --- a/src/alitra/frame_transform.py +++ b/src/alitra/frame_transform.py @@ -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):