signals-cpp
Loading...
Searching...
No Matches
State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim > Struct Template Reference

Base type for all Model state representations. More...

#include <State.h>

Public Types

using PoseType = typename PoseTypeSpec::Type
 
using TwistType = typename TwistTypeSpec::Type
 

Public Member Functions

 State ()
 Initialize an empty state.
 
 State (T *arr)
 Initialize state from a pose and twist pointer array.
 
 State (const State &other)
 State copy constructor.
 
norm () const
 Obtain the norm of all pose and twist components combined.
 
Stateoperator*= (const double &s)
 Scale the state (pose and twist) by a scalar.
 
template<typename T2>
Stateoperator+= (const State< T2, TwistTypeSpec, TwistDim, TwistTypeSpec, TwistDim > &r)
 Add a tangent space state (twist and derivative of twist) to the current state.
 

Static Public Member Functions

static State identity ()
 Set the state to identity (zero) values across the board.
 
static State nans ()
 Set the state to NaN values across the board.
 

Public Attributes

PoseType pose
 Pose type.
 
TwistType twist
 Twist (derivative of Pose) type.
 

Detailed Description

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
struct State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >

Base type for all Model state representations.

Provides a convenient union of the "pose" and "twist" (or time derivative of pose) components of a state vector and defines arithmetic operations for that union.

A state is not a Signal type in itself, which is why separate *Signal types are derived below.

Derived types:

  • Scalar(d)State and Scalar(d)StateSignal
  • Vector1(d)State and Vector1(d)StateSignal
  • Vector2(d)State and Vector2(d)StateSignal
  • Vector3(d)State and Vector3(d)StateSignal
  • Vector4(d)State and Vector4(d)StateSignal
  • Vector5(d)State and Vector5(d)StateSignal
  • Vector6(d)State and Vector6(d)StateSignal
  • Vector7(d)State and Vector7(d)StateSignal
  • Vector8(d)State and Vector8(d)StateSignal
  • Vector9(d)State and Vector9(d)StateSignal
  • Vector10(d)State and Vector10(d)StateSignal
  • SO2(d)State and SO2(d)StateSignal
  • SO3(d)State and SO3(d)StateSignal
  • SE2(d)State and SE2(d)StateSignal
  • SE3(d)State and SE3(d)StateSignal

Member Typedef Documentation

◆ PoseType

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
using State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::PoseType = typename PoseTypeSpec::Type

◆ TwistType

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
using State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::TwistType = typename TwistTypeSpec::Type

Constructor & Destructor Documentation

◆ State() [1/3]

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::State ( )
inline

Initialize an empty state.

◆ State() [2/3]

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::State ( T * arr)
inline

Initialize state from a pose and twist pointer array.

◆ State() [3/3]

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::State ( const State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim > & other)
inline

State copy constructor.

Member Function Documentation

◆ identity()

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
static State State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::identity ( )
inlinestatic

Set the state to identity (zero) values across the board.

◆ nans()

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
static State State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::nans ( )
inlinestatic

Set the state to NaN values across the board.

◆ norm()

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
T State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::norm ( ) const
inline

Obtain the norm of all pose and twist components combined.

◆ operator*=()

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
State & State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::operator*= ( const double & s)
inline

Scale the state (pose and twist) by a scalar.

◆ operator+=()

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
template<typename T2>
State & State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::operator+= ( const State< T2, TwistTypeSpec, TwistDim, TwistTypeSpec, TwistDim > & r)
inline

Add a tangent space state (twist and derivative of twist) to the current state.

Member Data Documentation

◆ pose

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
PoseType State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::pose

Pose type.

◆ twist

template<typename T, typename PoseTypeSpec, size_t PoseDim, typename TwistTypeSpec, size_t TwistDim>
TwistType State< T, PoseTypeSpec, PoseDim, TwistTypeSpec, TwistDim >::twist

Twist (derivative of Pose) type.


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