mink 0.0.9__py3-none-any.whl → 0.0.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mink/lie/so3.py
CHANGED
@@ -85,6 +85,7 @@ class SO3(MatrixLieGroup):
|
|
85
85
|
assert matrix.shape == (SO3.matrix_dim, SO3.matrix_dim)
|
86
86
|
wxyz = np.empty(SO3.parameters_dim, dtype=np.float64)
|
87
87
|
mujoco.mju_mat2Quat(wxyz, matrix.ravel())
|
88
|
+
# NOTE mju_mat2Quat normalizes the quaternion.
|
88
89
|
return SO3(wxyz=wxyz)
|
89
90
|
|
90
91
|
@classmethod
|
@@ -163,20 +164,22 @@ class SO3(MatrixLieGroup):
|
|
163
164
|
def exp(cls, tangent: np.ndarray) -> SO3:
|
164
165
|
axis = np.array(tangent)
|
165
166
|
theta = mujoco.mju_normalize3(axis)
|
166
|
-
wxyz = np.
|
167
|
+
wxyz = np.empty(4, dtype=np.float64)
|
168
|
+
# NOTE mju_axisAngle2Quat does not normalize the quaternion but is guaranteed
|
169
|
+
# to return a unit quaternion when axis is a unit vector. In our case,
|
170
|
+
# mju_normalize3 ensures that axis is a unit vector.
|
167
171
|
mujoco.mju_axisAngle2Quat(wxyz, axis, theta)
|
168
172
|
return SO3(wxyz=wxyz)
|
169
173
|
|
170
174
|
# Eq. 133.
|
171
175
|
def log(self) -> np.ndarray:
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
return theta * axis
|
176
|
+
q = np.array(self.wxyz)
|
177
|
+
q *= np.sign(q[0])
|
178
|
+
w, v = q[0], q[1:]
|
179
|
+
norm = mujoco.mju_normalize3(v)
|
180
|
+
if norm < get_epsilon(v.dtype):
|
181
|
+
return np.zeros_like(v)
|
182
|
+
return 2 * np.arctan2(norm, w) * v
|
180
183
|
|
181
184
|
# Eq. 139.
|
182
185
|
def adjoint(self) -> np.ndarray:
|
@@ -334,7 +334,7 @@ mink/contrib/keyboard_teleop/teleop_mocap.py,sha256=2cuauiBHsQb6IVruRbGtCumdHQaz
|
|
334
334
|
mink/lie/__init__.py,sha256=7tm3ZFnF3o1SDd9MOFO1In13lHMQJHO0FB-ejI6tsgE,202
|
335
335
|
mink/lie/base.py,sha256=8TGWWEWRvmoBsJP-9y1YXQHkTC-TFfI8JDvBFKxxP-A,4865
|
336
336
|
mink/lie/se3.py,sha256=cEzAzKEfBAQcbHhbZbhW8QZA8WpfRRaeZ0YGdSmhOx8,8634
|
337
|
-
mink/lie/so3.py,sha256=
|
337
|
+
mink/lie/so3.py,sha256=Goipwo7PRxNecYRNBmueWCiO2D51D7qHlzs2gQiXO-Q,8423
|
338
338
|
mink/lie/utils.py,sha256=DuEl3pj84daLvMKN84-YBvkXnJfqvc5vpvJ9J-pJ11U,403
|
339
339
|
mink/limits/__init__.py,sha256=hX5Dgpri9AE6YtUCkW79AXMBuNAuBhniR9kQ6Rxwv3Y,416
|
340
340
|
mink/limits/collision_avoidance_limit.py,sha256=MJXesSjvm_2O6RUEz2e4D8uTVOHyTsH9j4UxkPemcn8,11918
|
@@ -351,7 +351,7 @@ mink/tasks/frame_task.py,sha256=DeNg-bEJxqnrRI0FaJK4UHyb8CyF4A7uPF9G-CdN0sg,5307
|
|
351
351
|
mink/tasks/posture_task.py,sha256=sVDZyalCh5DP8zmCuX5kYuZxiMxRut_mTZUjv5y3b5M,3998
|
352
352
|
mink/tasks/relative_frame_task.py,sha256=9rIiYocI1eEESt0bLZZpQR7K6ggVRZH8iEhdhzkfZa0,5119
|
353
353
|
mink/tasks/task.py,sha256=F16YZT1L9ueNOcKoOhbCyEnZw0DOgrmjqADl0jahVQI,4838
|
354
|
-
mink-0.0.
|
355
|
-
mink-0.0.
|
356
|
-
mink-0.0.
|
357
|
-
mink-0.0.
|
354
|
+
mink-0.0.10.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
355
|
+
mink-0.0.10.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
356
|
+
mink-0.0.10.dist-info/METADATA,sha256=AJQA0xMmwAZiWYmLgDDQo1rKDBQ7AYJxCUMtd-6nlik,5607
|
357
|
+
mink-0.0.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|