Quaternion class.
More...
◆ __init__()
Quaternion constructor.
@param x x-value of the quaternion.
@param y y-value of quaternion.
@param z z-value of quaternion.
@param w w-value of quaternion.
@return An instance of the Quaternion class.
◆ __mul__()
def optas.spatialmath.Quaternion.__mul__ |
( |
|
self, |
|
|
|
quat |
|
) |
| |
Quaternion multiplication.
@param quat Another quaternion to multiply.
@return Quaternion product.
◆ fromangvec()
Return a quaternion from angle-vector form.
@param theta Angle of rotation (radians).
@param v Direction vector to rotate about.
@return An instance of the Quaternion class.
◆ fromrpy()
def optas.spatialmath.Quaternion.fromrpy |
( |
ArrayType |
rpy | ) |
|
|
static |
Return a quaternion from Roll-Pitch-Yaw angles.
@param rpy Roll-Pitch-Yaw angles (radians).
@return An instance of the Quaternion class.
◆ fromvec()
def optas.spatialmath.Quaternion.fromvec |
( |
ArrayType |
q | ) |
|
|
static |
Return a quaternion from a quaternion vector array.
@param q Quaternion as an array.
@return An instance of the Quaternion class.
◆ getquat()
Return the quaternion vector.
@return The quaternion as an array.
◆ getrotm() [1/2]
◆ getrotm() [2/2]
◆ getrpy()
Return the quaternion as Roll-Pitch-Yaw angles.
@return The RPY Euler angles (in radians).
◆ inv()
def optas.spatialmath.Quaternion.inv |
( |
|
self | ) |
|
◆ split()
Tuple[ArrayType] optas.spatialmath.Quaternion.split |
( |
|
self | ) |
|
Split the quaternion into its xyzw parts.
@return The xyzw parts of the quaternion.
◆ sumsqr()
Sum the square values of the quaternion elements.
@return Result of the sum of square values of the quaternion.
◆ _q
optas.spatialmath.Quaternion._q |
|
private |
The documentation for this class was generated from the following file: