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.Translation Class Reference

A class defining a translation vector. More...

Public Member Functions

def __init__ (self, ArrayType t)
 Initializer for the Translation class. More...
 
def __add__ (self, other)
 Compose this translation with the other via vector addition. More...
 
def __neg__ (self)
 Negated translation. More...
 
def __sub__ (self, other)
 Compose this translation with the other via vector subtraction. More...
 
ArrayType as_vector (self)
 Represent as a translation vector. More...
 
ArrayType as_matrix (self)
 Represent as homogenous transformation matrix. More...
 
def as_transformation (self)
 Represent as homogenous transformation. More...
 

Static Public Member Functions

def identity ()
 Get the identity translation. More...
 
def random ()
 Generate uniformly distributed translations. More...
 
def symbolic ()
 Symbolic representation. More...
 
def from_vector (t)
 Initialize from translation vector. More...
 
def from_matrix (T)
 Initialize from a homogenous transformation matrix. More...
 

Private Attributes

 _t
 

Detailed Description

A class defining a translation vector.

Constructor & Destructor Documentation

◆ __init__()

def spatial_casadi.spatial.Translation.__init__ (   self,
ArrayType  t 
)

Initializer for the Translation class.

Parameters
tA 3-dimensional translation vector.
Returns
An instance of the Translation class.

Member Function Documentation

◆ __add__()

def spatial_casadi.spatial.Translation.__add__ (   self,
  other 
)

Compose this translation with the other via vector addition.

Parameters
otherObject containing the translation to be composed with this one.
Returns
The translation that is the result of A + B.

◆ __neg__()

def spatial_casadi.spatial.Translation.__neg__ (   self)

Negated translation.

Returns
The translation that is the negation of this translation, i.e. -t.

◆ __sub__()

def spatial_casadi.spatial.Translation.__sub__ (   self,
  other 
)

Compose this translation with the other via vector subtraction.

Parameters
otherObject containing the translation to be composed with this one via subtraction.
Returns
The translation that is the result of A - B.

◆ as_matrix()

ArrayType spatial_casadi.spatial.Translation.as_matrix (   self)

Represent as homogenous transformation matrix.

Returns
A 4-by-4 homogenous transformation matrix.

◆ as_transformation()

def spatial_casadi.spatial.Translation.as_transformation (   self)

Represent as homogenous transformation.

Returns
A instance of the Transformation class with identity rotation.

◆ as_vector()

ArrayType spatial_casadi.spatial.Translation.as_vector (   self)

Represent as a translation vector.

Returns
A 3-dimensional translation vector.

◆ from_matrix()

def spatial_casadi.spatial.Translation.from_matrix (   T)
static

Initialize from a homogenous transformation matrix.

Parameters
TA 4-by-4 homogenous transformation matrix.
Returns
Object containing the translation represented by the input matrix.

◆ from_vector()

def spatial_casadi.spatial.Translation.from_vector (   t)
static

Initialize from translation vector.

Parameters
tA 3-dimensional translation vector.
Returns
Object containing the translation represented by the input vector.

◆ identity()

def spatial_casadi.spatial.Translation.identity ( )
static

Get the identity translation.

◆ random()

def spatial_casadi.spatial.Translation.random ( )
static

Generate uniformly distributed translations.

Returns
Random translation.

◆ symbolic()

def spatial_casadi.spatial.Translation.symbolic ( )
static

Symbolic representation.

Returns
Symbolic translation.

Member Data Documentation

◆ _t

spatial_casadi.spatial.Translation._t
private

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