- 3.0.2 rigid body dynamics module.
ct::rbd::JointState< NJOINTS, SCALAR > Class Template Reference

joint state and joint velocity More...

#include <JointState.h>

Public Types

enum  NDOFS { NDOFS = NJOINTS }
 
typedef Eigen::Matrix< SCALAR, 2 *NJOINTS, 1 > joint_state_vector_t
 
typedef Eigen::Matrix< SCALAR, NJOINTS, 1 > Position
 
typedef Eigen::Matrix< SCALAR, NJOINTS, 1 > Velocity
 
typedef Eigen::VectorBlock< joint_state_vector_t, NJOINTS > JointPositionBlock
 
typedef Eigen::VectorBlock< const joint_state_vector_t, NJOINTS > JointPositionBlockConst
 

Public Member Functions

 JointState ()
 
 JointState (const joint_state_vector_t &state)
 
bool operator== (const JointState &rhs) const
 
bool operator!= (const JointState< NJOINTS, SCALAR > &rhs) const
 
JointState< NJOINTS, SCALARoperator+ (const JointState< NJOINTS, SCALAR > &rhs) const
 
JointState< NJOINTS, SCALARoperator- (const JointState< NJOINTS, SCALAR > &rhs) const
 
JointState< NJOINTS, SCALARoperator* (const SCALAR &scalar) const
 
JointState< NJOINTS, SCALARoperator/ (const SCALAR &scalar) const
 
bool operator< (const JointState< NJOINTS, SCALAR > &rhs) const
 
bool operator> (const JointState< NJOINTS, SCALAR > &rhs) const
 
bool isApprox (const JointState< NJOINTS, SCALAR > &rhs, const SCALAR &tol=1e-10)
 
JointPositionBlock getPositions ()
 get joint state More...
 
const JointPositionBlockConst getPositions () const
 get constant joint state More...
 
SCALARgetPosition (size_t i)
 
const SCALARgetPosition (size_t i) const
 
template<typename T >
void toUniquePosition (T lowerLimitVec, double tolerance=0.0)
 normalize the joint state to be in the range [lowerLimitVec, lowerLimitVec + 2pi) More...
 
template<typename T >
bool checkPositionLimits (const T lowerLimit, const T upperLimit, const double tolerance=0.0)
 check joint position limits assuming limits and joint position are in the same range e.g. [-pi, pi) More...
 
JointPositionBlock getVelocities ()
 get joint velocity More...
 
const JointPositionBlockConst getVelocities () const
 get constant joint velocity More...
 
SCALARgetVelocity (size_t i)
 
const SCALARgetVelocity (size_t i) const
 
template<typename T >
bool checkVelocityLimits (T limit)
 check joint velocity limits More...
 
joint_state_vector_ttoImplementation ()
 
const joint_state_vector_ttoImplementation () const
 
void setZero ()
 set states to zero More...
 
void setRandom ()
 

Protected Attributes

joint_state_vector_t state_
 

Detailed Description

template<size_t NJOINTS, typename SCALAR = double>
class ct::rbd::JointState< NJOINTS, SCALAR >

joint state and joint velocity

Member Typedef Documentation

◆ joint_state_vector_t

template<size_t NJOINTS, typename SCALAR = double>
typedef Eigen::Matrix<SCALAR, 2 * NJOINTS, 1> ct::rbd::JointState< NJOINTS, SCALAR >::joint_state_vector_t

◆ Position

template<size_t NJOINTS, typename SCALAR = double>
typedef Eigen::Matrix<SCALAR, NJOINTS, 1> ct::rbd::JointState< NJOINTS, SCALAR >::Position

◆ Velocity

template<size_t NJOINTS, typename SCALAR = double>
typedef Eigen::Matrix<SCALAR, NJOINTS, 1> ct::rbd::JointState< NJOINTS, SCALAR >::Velocity

◆ JointPositionBlock

template<size_t NJOINTS, typename SCALAR = double>
typedef Eigen::VectorBlock<joint_state_vector_t, NJOINTS> ct::rbd::JointState< NJOINTS, SCALAR >::JointPositionBlock

◆ JointPositionBlockConst

template<size_t NJOINTS, typename SCALAR = double>
typedef Eigen::VectorBlock<const joint_state_vector_t, NJOINTS> ct::rbd::JointState< NJOINTS, SCALAR >::JointPositionBlockConst

Member Enumeration Documentation

◆ NDOFS

template<size_t NJOINTS, typename SCALAR = double>
enum ct::rbd::JointState::NDOFS
Enumerator
NDOFS 

Constructor & Destructor Documentation

◆ JointState() [1/2]

template<size_t NJOINTS, typename SCALAR = double>
ct::rbd::JointState< NJOINTS, SCALAR >::JointState ( )
inline

◆ JointState() [2/2]

template<size_t NJOINTS, typename SCALAR = double>
ct::rbd::JointState< NJOINTS, SCALAR >::JointState ( const joint_state_vector_t state)
inline

Member Function Documentation

◆ operator==()

template<size_t NJOINTS, typename SCALAR = double>
bool ct::rbd::JointState< NJOINTS, SCALAR >::operator== ( const JointState< NJOINTS, SCALAR > &  rhs) const
inline

◆ operator!=()

template<size_t NJOINTS, typename SCALAR = double>
bool ct::rbd::JointState< NJOINTS, SCALAR >::operator!= ( const JointState< NJOINTS, SCALAR > &  rhs) const
inline

◆ operator+()

template<size_t NJOINTS, typename SCALAR = double>
JointState<NJOINTS, SCALAR> ct::rbd::JointState< NJOINTS, SCALAR >::operator+ ( const JointState< NJOINTS, SCALAR > &  rhs) const
inline

◆ operator-()

template<size_t NJOINTS, typename SCALAR = double>
JointState<NJOINTS, SCALAR> ct::rbd::JointState< NJOINTS, SCALAR >::operator- ( const JointState< NJOINTS, SCALAR > &  rhs) const
inline

◆ operator*()

template<size_t NJOINTS, typename SCALAR = double>
JointState<NJOINTS, SCALAR> ct::rbd::JointState< NJOINTS, SCALAR >::operator* ( const SCALAR scalar) const
inline

◆ operator/()

template<size_t NJOINTS, typename SCALAR = double>
JointState<NJOINTS, SCALAR> ct::rbd::JointState< NJOINTS, SCALAR >::operator/ ( const SCALAR scalar) const
inline

◆ operator<()

template<size_t NJOINTS, typename SCALAR = double>
bool ct::rbd::JointState< NJOINTS, SCALAR >::operator< ( const JointState< NJOINTS, SCALAR > &  rhs) const
inline

◆ operator>()

template<size_t NJOINTS, typename SCALAR = double>
bool ct::rbd::JointState< NJOINTS, SCALAR >::operator> ( const JointState< NJOINTS, SCALAR > &  rhs) const
inline

◆ isApprox()

template<size_t NJOINTS, typename SCALAR = double>
bool ct::rbd::JointState< NJOINTS, SCALAR >::isApprox ( const JointState< NJOINTS, SCALAR > &  rhs,
const SCALAR tol = 1e-10 
)
inline

Referenced by TEST().

◆ getPositions() [1/2]

◆ getPositions() [2/2]

template<size_t NJOINTS, typename SCALAR = double>
const JointPositionBlockConst ct::rbd::JointState< NJOINTS, SCALAR >::getPositions ( ) const
inline

get constant joint state

◆ getPosition() [1/2]

◆ getPosition() [2/2]

template<size_t NJOINTS, typename SCALAR = double>
const SCALAR& ct::rbd::JointState< NJOINTS, SCALAR >::getPosition ( size_t  i) const
inline

◆ toUniquePosition()

template<size_t NJOINTS, typename SCALAR = double>
template<typename T >
void ct::rbd::JointState< NJOINTS, SCALAR >::toUniquePosition ( lowerLimitVec,
double  tolerance = 0.0 
)
inline

normalize the joint state to be in the range [lowerLimitVec, lowerLimitVec + 2pi)

Referenced by TEST().

◆ checkPositionLimits()

template<size_t NJOINTS, typename SCALAR = double>
template<typename T >
bool ct::rbd::JointState< NJOINTS, SCALAR >::checkPositionLimits ( const T  lowerLimit,
const T  upperLimit,
const double  tolerance = 0.0 
)
inline

check joint position limits assuming limits and joint position are in the same range e.g. [-pi, pi)

Referenced by TEST().

◆ getVelocities() [1/2]

◆ getVelocities() [2/2]

template<size_t NJOINTS, typename SCALAR = double>
const JointPositionBlockConst ct::rbd::JointState< NJOINTS, SCALAR >::getVelocities ( ) const
inline

get constant joint velocity

◆ getVelocity() [1/2]

template<size_t NJOINTS, typename SCALAR = double>
SCALAR& ct::rbd::JointState< NJOINTS, SCALAR >::getVelocity ( size_t  i)
inline

◆ getVelocity() [2/2]

template<size_t NJOINTS, typename SCALAR = double>
const SCALAR& ct::rbd::JointState< NJOINTS, SCALAR >::getVelocity ( size_t  i) const
inline

◆ checkVelocityLimits()

template<size_t NJOINTS, typename SCALAR = double>
template<typename T >
bool ct::rbd::JointState< NJOINTS, SCALAR >::checkVelocityLimits ( limit)
inline

check joint velocity limits

Referenced by TEST().

◆ toImplementation() [1/2]

template<size_t NJOINTS, typename SCALAR = double>
joint_state_vector_t& ct::rbd::JointState< NJOINTS, SCALAR >::toImplementation ( )
inline

◆ toImplementation() [2/2]

template<size_t NJOINTS, typename SCALAR = double>
const joint_state_vector_t& ct::rbd::JointState< NJOINTS, SCALAR >::toImplementation ( ) const
inline

◆ setZero()

template<size_t NJOINTS, typename SCALAR = double>
void ct::rbd::JointState< NJOINTS, SCALAR >::setZero ( )
inline

◆ setRandom()

template<size_t NJOINTS, typename SCALAR = double>
void ct::rbd::JointState< NJOINTS, SCALAR >::setRandom ( )
inline

Referenced by TEST().

Member Data Documentation

◆ state_


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