dfki-ric / pytransform3d

3D transformations for Python.
https://dfki-ric.github.io/pytransform3d/
Other
618 stars 65 forks source link

draw TUM pose format using quaternion #197

Closed arenas7307979 closed 2 years ago

arenas7307979 commented 2 years ago

hii, I have seen the example of drawing through Euler Angle, if there is a way to directly draw path use quaternion or convert function active_matrix_from_extrinsic_quaternion?

tum is pose format : tx ty tz qx qy qz qw

image

example: https://github.com/dfki-ric/pytransform3d/blob/master/examples/plots/plot_euler_angles.py

arenas7307979 commented 2 years ago

p = np.array([2.0, 0.0, 0.0]) euler = [0, 0, 0] euler[axis] = angle R = pr.matrix_from_quaternion([1,0,0,0])

R = pr.active_matrix_from_intrinsic_euler_xyz(euler)

pr.plot_basis(ax, R, p)

AlexanderFabisch commented 2 years ago

I'm a bit confused, but I guess you are looking for something like this: https://dfki-ric.github.io/pytransform3d/_auto_examples/plots/plot_camera_trajectory.html#sphx-glr-auto-examples-plots-plot-camera-trajectory-py