Fields
float
x component of quaternion
float
y component of quaternion
float
z component of quaternion
float
w component of quaternion (scalar) Can be initialized with either quaternion components or Euler angles
Constructor
Signature
- Using quaternion components (x, y, z, w)
- Using Euler angles (roll, pitch, yaw) where the first three arguments are interpreted as roll, pitch, and yaw respectively
- Using a rotation matrix (3x3 numpy array or list)
- Using a quaternion array (4-element list or numpy array)
required
x component of quaternion, roll angle, rotation matrix, or quaternion array
y component of quaternion or pitch angle. Ignored when x is an array.
z component of quaternion or yaw angle. Ignored when x is an array.
w component of quaternion. When None, x, y, z are interpreted as Euler angles.
Methods
conjugate()
Signature
from_dict()
Signature
normalize()
Signature
to_axis_angle()
Signature
default:"False"
If True, the angle is returned in degrees. Defaults to False.
to_dict()
Signature
to_euler()
Signature
default:"'xyz'"
Order of rotations. Defaults to “xyz”. Supported orders include “xyz”, “zyx”, “yzx”, etc.
to_matrix()
Signature