|
def | __init__ (self, quat, normalize=True, scalar_first=False) |
|
def | __getstate__ (self) |
|
def | __setstate__ (self, state) |
|
def | single (self) |
|
def | __bool__ (self) |
|
def | __len__ (self) |
|
def | from_quat (cls, quat, *scalar_first=False) |
|
def | from_matrix (cls, matrix) |
|
def | from_rotvec (cls, rotvec, degrees=False) |
|
def | __mul__ (self, other) |
| Compose this rotation with the other. More...
|
|
def | inv (self) |
| Invert this rotation. More...
|
|
def | magnitude (self) |
| Get the magnitude of the rotation. More...
|
|
def | as_quat (self, str seq="xyzw") |
| Represent as quaternions. More...
|
|
def | as_matrix (self) |
| Represent as rotation matrix. More...
|
|
def | as_rotvec (self, bool degrees=False) |
| Represent as rotation vector. More...
|
|
def | as_mrp (self) |
| Represent as Modified Rodrigues Parameters (MRPs). More...
|
|
def | as_euler (self, str seq, bool degrees=False) |
| Represent as Euler angles. More...
|
|
def | rotation_angle (self, other) |
|
def | x (self) |
|
def | y (self) |
|
def | z (self) |
|
def | w (self) |
|
◆ __init__()
def spatial_casadi.spatial.Rotation.__init__ |
( |
|
self, |
|
|
|
quat, |
|
|
|
normalize = True , |
|
|
|
scalar_first = False |
|
) |
| |
◆ __bool__()
def spatial_casadi.spatial.Rotation.__bool__ |
( |
|
self | ) |
|
Comply with Python convention for objects to be True.
Required because Rotation.__len__() is defined and not always truthy.
◆ __getstate__()
def spatial_casadi.spatial.Rotation.__getstate__ |
( |
|
self | ) |
|
◆ __len__()
def spatial_casadi.spatial.Rotation.__len__ |
( |
|
self | ) |
|
◆ __mul__()
def spatial_casadi.spatial.Rotation.__mul__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Compose this rotation with the other.
@param other Object containing the rotation or translation to be composed with this one. Note that compositions are not commutative, so p * q is different from q * p. In the case of translations q * p is undefined.
@return The product A * B, if other is a rotation the output will be a rotation. However, if other is a translation then the output will also be a translation.
◆ __setstate__()
def spatial_casadi.spatial.Rotation.__setstate__ |
( |
|
self, |
|
|
|
state |
|
) |
| |
◆ as_euler()
def spatial_casadi.spatial.Rotation.as_euler |
( |
|
self, |
|
|
str |
seq, |
|
|
bool |
degrees = False |
|
) |
| |
Represent as Euler angles.
@param seq Specifies sequence of axes for rotations. Up to 3 characters belonging to the set {‘X’, ‘Y’, ‘Z’} for intrinsic rotations, or {‘x’, ‘y’, ‘z’} for extrinsic rotations. Extrinsic and intrinsic rotations cannot be mixed in one function call.
@param degrees Returned angles are in degrees if this flag is True, else they are in radians. Default is False.
@return Euler angles specified in radians (degrees is False) or degrees (degrees is True).
◆ as_matrix()
def spatial_casadi.spatial.Rotation.as_matrix |
( |
|
self | ) |
|
Represent as rotation matrix.
@return A 3-by-3 rotation matrix.
◆ as_mrp()
def spatial_casadi.spatial.Rotation.as_mrp |
( |
|
self | ) |
|
Represent as Modified Rodrigues Parameters (MRPs).
@return A vector giving the MRP, a 3 dimensional vector co-directional to the axis of rotation and whose magnitude is equal to tan(theta / 4), where theta is the angle of rotation (in radians).
◆ as_quat()
def spatial_casadi.spatial.Rotation.as_quat |
( |
|
self, |
|
|
str |
seq = "xyzw" |
|
) |
| |
Represent as quaternions.
@param seq Specifies the ordering of the quaternion. Available options are 'wxyz' (i.e. scalar-first) and 'xyzw' (i.e. scalar-last). The default is the scalar-last format given by 'xyzw'.
@return A quaternion vector.
◆ as_rotvec()
def spatial_casadi.spatial.Rotation.as_rotvec |
( |
|
self, |
|
|
bool |
degrees = False |
|
) |
| |
Represent as rotation vector.
@param degrees If True, then the given magnitudes are assumed to be in degrees. Default is False.
@return A 3-dimensional rotation vector
◆ from_euler()
def spatial_casadi.spatial.Rotation.from_euler |
( |
|
seq, |
|
|
|
angles, |
|
|
|
degrees = False |
|
) |
| |
|
static |
Initialize from Euler angles.
@param seq Specifies sequence of axes for rotations. Up to 3 characters belonging to the set {‘X’, ‘Y’, ‘Z’} for intrinsic rotations, or {‘x’, ‘y’, ‘z’} for extrinsic rotations. Extrinsic and intrinsic rotations cannot be mixed in one function call.
@param angles Euler angles specified in radians (degrees is False) or degrees (degrees is True). For a single character seq, angles can be:
- a single value.
- array_like with shape (N,), where each angle[i] corresponds to a single rotation.
@param degrees If True, then the given angles are assumed to be in degrees. Default is False.
@return Object containing the rotation represented by the rotation around given axes with given angles.
◆ from_matrix() [1/2]
def spatial_casadi.spatial.Rotation.from_matrix |
( |
|
cls, |
|
|
|
matrix |
|
) |
| |
◆ from_matrix() [2/2]
def spatial_casadi.spatial.Rotation.from_matrix |
( |
|
matrix | ) |
|
|
static |
Initialize from rotation matrix.
@param matrix A 3-by-3 rotation matrix or 4-by-4 homogeneous transformation matrix.
@return Object containing the rotation represented by the rotation matrix.
◆ from_mrp()
def spatial_casadi.spatial.Rotation.from_mrp |
( |
|
mrp | ) |
|
|
static |
Initialize from Modified Rodrigues Parameters (MRPs).
@param mrp A vector giving the MRP, a 3 dimensional vector co-directional to the axis of rotation and whose magnitude is equal to tan(theta / 4), where theta is the angle of rotation (in radians).
◆ from_quat()
def spatial_casadi.spatial.Rotation.from_quat |
( |
|
cls, |
|
|
|
quat, |
|
|
* |
scalar_first = False |
|
) |
| |
Initialize from quaternion.
◆ from_rotvec()
def spatial_casadi.spatial.Rotation.from_rotvec |
( |
|
cls, |
|
|
|
rotvec, |
|
|
|
degrees = False |
|
) |
| |
◆ identity()
def spatial_casadi.spatial.Rotation.identity |
( |
| ) |
|
|
static |
Get the identity rotation.
◆ inv()
def spatial_casadi.spatial.Rotation.inv |
( |
|
self | ) |
|
◆ magnitude()
def spatial_casadi.spatial.Rotation.magnitude |
( |
|
self | ) |
|
Get the magnitude of the rotation.
◆ random()
def spatial_casadi.spatial.Rotation.random |
( |
| ) |
|
|
static |
Generate uniformly distributed rotations.
@return Random rotation.
◆ rotation_angle()
def spatial_casadi.spatial.Rotation.rotation_angle |
( |
|
self, |
|
|
|
other |
|
) |
| |
Angle between two rotations.
◆ single()
def spatial_casadi.spatial.Rotation.single |
( |
|
self | ) |
|
◆ symbolic()
def spatial_casadi.spatial.Rotation.symbolic |
( |
| ) |
|
|
static |
Symbolic representation.
@return Symbolic rotation.
◆ w()
def spatial_casadi.spatial.Rotation.w |
( |
|
self | ) |
|
◆ x()
def spatial_casadi.spatial.Rotation.x |
( |
|
self | ) |
|
◆ y()
def spatial_casadi.spatial.Rotation.y |
( |
|
self | ) |
|
◆ z()
def spatial_casadi.spatial.Rotation.z |
( |
|
self | ) |
|
◆ _quat
spatial_casadi.spatial.Rotation._quat |
|
private |
◆ _single
spatial_casadi.spatial.Rotation._single |
|
private |
The documentation for this class was generated from the following file: