Orientation
Inherits from:object
A class to represent the orientation as a quaternion
Attributes:
x (float): x component of quaternion
y (float): y component of quaternion
z (float): z component of quaternion
w (float): w component of quaternion (scalar)
Can be initialized with either quaternion components or Euler angles
init
Arguments
init
Arguments
init
Arguments
3x3 rotation matrix or 9/16-element list
init
Arguments
4-element array [x, y, z, w]
init
- 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)
Arguments
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.
Raises
conjugate
normalize
to_euler
Arguments
Order of rotations. Defaults to “xyz”. Supported orders include “xyz”, “zyx”, “yzx”, etc.
to_matrix
to_axis_angle
Returns
3 dimensional vector which is co-directional to the axis of rotation and whose norm gives the angle of rotation.