spatial-casadi  1.1.0
Spatial transformation library for CasADi Python.
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
spatial_casadi.spatial.Transformation Class Reference

A class for representing homogenous transformations. More...

Public Member Functions

def __init__ (self, Rotation rotation, Translation translation)
 Initializer for the Transformation class. More...
 
def inv (self)
 Invert this homogeneous transformation. More...
 
Translation translation (self)
 Return the translation part of the homogeneous transformation. More...
 
Rotation rotation (self)
 Return the rotation part of the homogeneous transformation. More...
 
ArrayType as_matrix (self)
 Represent as homogenous transformation matrix. More...
 
def __mul__ (self, other)
 Compose this transformation with the other. More...
 
def flatten (self)
 Returns the homogenous transform as a vector representation [quat, t] where quat is a unit-quaternion for the rotation and t is the translation. More...
 

Static Public Member Functions

def identity ()
 Get the identity homogenous transform. More...
 
def random ()
 Generate uniformly distributed homogeneous transforms. More...
 
def symbolic ()
 Symbolic representation. More...
 
def from_matrix (ArrayType T)
 Initialize from homogenous transformation matrix. More...
 

Private Attributes

 _rotation
 Rotation object. More...
 
 _translation
 Translation object. More...
 

Detailed Description

A class for representing homogenous transformations.

Constructor & Destructor Documentation

◆ __init__()

def spatial_casadi.spatial.Transformation.__init__ (   self,
Rotation  rotation,
Translation  translation 
)

Initializer for the Transformation class.

Parameters
rotationThe rotation part of the homogenous transformation.
translationThe translation part of the homogenous transformation.
Returns
An instance of the Transformation class.

Member Function Documentation

◆ __mul__()

def spatial_casadi.spatial.Transformation.__mul__ (   self,
  other 
)

Compose this transformation with the other.

Parameters
otherObject containing the transformation to be composed with this one. Note that transformation compositions are not commutative, so p * q is different from q * p.
Returns
The homgeonous transformation that is the product A * B.

◆ as_matrix()

ArrayType spatial_casadi.spatial.Transformation.as_matrix (   self)

Represent as homogenous transformation matrix.

Returns
A 4-by-4 homogenous transformation matrix.

◆ flatten()

def spatial_casadi.spatial.Transformation.flatten (   self)

Returns the homogenous transform as a vector representation [quat, t] where quat is a unit-quaternion for the rotation and t is the translation.

Returns
Vector representation for the homogeneous transform.

◆ from_matrix()

def spatial_casadi.spatial.Transformation.from_matrix ( ArrayType  T)
static

Initialize from homogenous transformation matrix.

Parameters
matrixA 4-by-4 homogeneous transformation matrix.
Returns
Object containing the homogeneous transformation represented by the matrix.

◆ identity()

def spatial_casadi.spatial.Transformation.identity ( )
static

Get the identity homogenous transform.

◆ inv()

def spatial_casadi.spatial.Transformation.inv (   self)

Invert this homogeneous transformation.

◆ random()

def spatial_casadi.spatial.Transformation.random ( )
static

Generate uniformly distributed homogeneous transforms.

Returns
Random homogeneous transform.

◆ rotation()

Rotation spatial_casadi.spatial.Transformation.rotation (   self)

Return the rotation part of the homogeneous transformation.

Returns
The rotation part of the homogeneous transformation.

◆ symbolic()

def spatial_casadi.spatial.Transformation.symbolic ( )
static

Symbolic representation.

Returns
Symbolic homogenous transform.

◆ translation()

Translation spatial_casadi.spatial.Transformation.translation (   self)

Return the translation part of the homogeneous transformation.

Returns
The translation part of the homogeneous transformation.

Member Data Documentation

◆ _rotation

spatial_casadi.spatial.Transformation._rotation
private

Rotation object.

◆ _translation

spatial_casadi.spatial.Transformation._translation
private

Translation object.


The documentation for this class was generated from the following file: