8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6872e31 commit 3b035deCopy full SHA for 3b035de
roboticstoolbox/backends/Swift/Swift.py
@@ -418,12 +418,14 @@ def _step_shapes(self, dt):
418
419
T = shape.base
420
t = T.t.astype('float64')
421
- r = T.rpy('rad').astype('float64')
422
-
423
t += shape.v[:3] * dt
424
- r += shape.v[3:] * dt
425
426
- shape.base = sm.SE3(t) * sm.SE3.RPY(r)
+ R = sm.SO3(T.R)
+ Rdelta = sm.SO3.EulerVec(shape.v[3:] * dt)
+ R = Rdelta * R
+ R = R.norm() # renormalize to avoid numerical issues
427
+
428
+ shape.base = sm.SE3.SO3(R, t=t)
429
430
def _draw_all(self):
431
0 commit comments