Skip to content

Commit 729b774

Browse files
committed
fix: inline note about wxyz vs xyzw format
1 parent a8fad77 commit 729b774

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/tbp/monty/frameworks/models/motor_policies.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,9 @@ def get_inverse_agent_rot(self):
12231223
Returns:
12241224
Inverse quaternion rotation.
12251225
"""
1226+
# Note that quaternion format is [w, x, y, z]
12261227
[w, x, y, z] = qt.as_float_array(self.state[self.agent_id]["rotation"])
1228+
# Note that scipy.spatial.transform.Rotation (v1.10.0) format is [x, y, z, w]
12271229
[x, y, z, w] = rot.from_quat([x, y, z, w]).inv().as_quat()
12281230
return qt.quaternion(w, x, y, z)
12291231

0 commit comments

Comments
 (0)