- 3.0.2 rigid body dynamics module.
|
whole robot state, i.e. RBDState and Actuator Dynamics More...
#include <FloatingBaseRobotState.h>
Public Types | |
using | Base_t = RBDState< NJOINTS, SCALAR > |
using | RBDState_t = RBDState< NJOINTS, SCALAR > |
using | RigidBodyPose_t = tpl::RigidBodyPose< SCALAR > |
using | RigidBodyState_t = tpl::RigidBodyState< SCALAR > |
using | JointState_t = JointState< NJOINTS, SCALAR > |
using | STORAGE_TYPE = typename RigidBodyPose_t::STORAGE_TYPE |
using | actuator_state_vector_t = ct::core::StateVector< ACT_STATE_DIM, SCALAR > |
Euler or quat. More... | |
using | state_vector_quat_t = ct::core::StateVector< NSTATE_QUAT, SCALAR > |
using | state_vector_euler_t = ct::core::StateVector< NSTATE, SCALAR > |
Public Types inherited from ct::rbd::RBDState< NJOINTS, SCALAR > | |
using | RigidBodyState_t = tpl::RigidBodyState< SCALAR > |
using | RigidBodyPose_t = tpl::RigidBodyPose< SCALAR > |
typedef ct::core::StateVector< NSTATE_QUAT, SCALAR > | state_vector_quat_t |
typedef ct::core::StateVector< NSTATE, SCALAR > | state_vector_euler_t |
typedef ct::core::StateVector< NDOF, SCALAR > | coordinate_vector_t |
Public Member Functions | |
FloatingBaseRobotState (const STORAGE_TYPE storage=STORAGE_TYPE::EULER) | |
default constructor More... | |
FloatingBaseRobotState (const RBDState_t &rbdState, const actuator_state_vector_t &act_state=actuator_state_vector_t::Zero()) | |
constructor with actuator state as parameter More... | |
FloatingBaseRobotState (const RigidBodyState_t &baseState, const JointState_t &jointState, const actuator_state_vector_t &act_state=actuator_state_vector_t::Zero()) | |
constructor with base, jonit and actuator state as parameters More... | |
FloatingBaseRobotState (const FloatingBaseRobotState &other) | |
copy constructor More... | |
~FloatingBaseRobotState () | |
destructor More... | |
RBDState_t & | rbdState () |
accessor to base class RBDState More... | |
const RBDState_t & | rbdState () const |
accessor to base class RBDState More... | |
actuator_state_vector_t & | actuatorState () |
accessor to actuator state More... | |
const actuator_state_vector_t & | actuatorState () const |
accessor to actuator state More... | |
template<typename T = state_vector_quat_t> | |
std::enable_if<(ACT_STATE_DIM > 0), T >::type | toStateVectorQuaternion () const |
compute state vector including with quaternion representation More... | |
template<typename T = state_vector_quat_t> | |
std::enable_if<(ACT_STATE_DIM==0), T >::type | toStateVectorQuaternion () const |
template<typename T = state_vector_euler_t> | |
std::enable_if<(ACT_STATE_DIM > 0), T >::type | toStateVectorEulerXyzUnique () const |
get unique state vector with euler coordinates More... | |
template<typename T = state_vector_euler_t> | |
std::enable_if<(ACT_STATE_DIM==0), T >::type | toStateVectorEulerXyzUnique () const |
template<typename T = state_vector_euler_t> | |
std::enable_if<(ACT_STATE_DIM > 0), T >::type | toStateVectorEulerXyz () const |
get state vector in euler coordinates More... | |
template<typename T = state_vector_euler_t> | |
std::enable_if<(ACT_STATE_DIM==0), T >::type | toStateVectorEulerXyz () const |
template<typename T = void> | |
std::enable_if<(ACT_STATE_DIM > 0), T >::type | fromStateVectorQuaternion (const state_vector_quat_t &state) |
reconstruct robot state from an Eigen state-vector with quaternion representation More... | |
template<typename T = void> | |
std::enable_if<(ACT_STATE_DIM==0), T >::type | fromStateVectorQuaternion (const state_vector_quat_t &state) |
template<typename T = void> | |
std::enable_if<(ACT_STATE_DIM > 0), T >::type | fromStateVectorEulerXyz (const state_vector_euler_t &state) |
reconstruct robot state from an Eigen state-vector with euler representation More... | |
template<typename T = void> | |
std::enable_if<(ACT_STATE_DIM==0), T >::type | fromStateVectorEulerXyz (const state_vector_euler_t &state) |
void | fromStateVectorRaw (const state_vector_quat_t &state) |
a convenience method More... | |
void | fromStateVectorRaw (const state_vector_euler_t &state) |
a convenience method More... | |
void | setZero () |
set all zero More... | |
Public Member Functions inherited from ct::rbd::RBDState< NJOINTS, SCALAR > | |
RBDState (typename RigidBodyPose_t::STORAGE_TYPE storage=RigidBodyPose_t::EULER) | |
RBDState (const RBDState &other) | |
RBDState (const RigidBodyState_t &baseState, const JointState< NJOINTS, SCALAR > &jointState) | |
virtual | ~RBDState ()=default |
bool | operator!= (const RBDState &other) const |
bool | isApprox (const RBDState &rhs, const SCALAR &tol=1e-10) |
RigidBodyState_t & | base () |
get base states More... | |
const RigidBodyState_t & | base () const |
get constant base states More... | |
RigidBodyPose_t & | basePose () |
get base pose More... | |
const RigidBodyPose_t & | basePose () const |
get constant base states More... | |
tpl::RigidBodyVelocities< SCALAR > & | baseVelocities () |
get base velocities More... | |
const tpl::RigidBodyVelocities< SCALAR > & | baseVelocities () const |
get constant base velocities More... | |
kindr::LocalAngularVelocity< SCALAR > & | baseLocalAngularVelocity () |
get base local angular velocity More... | |
const kindr::LocalAngularVelocity< SCALAR > & | baseLocalAngularVelocity () const |
get constant base local angular velocity More... | |
kindr::Velocity< SCALAR, 3 > & | baseLinearVelocity () |
get base linear velocity More... | |
const kindr::Velocity< SCALAR, 3 > & | baseLinearVelocity () const |
get constant base local angular velocity More... | |
JointState< NJOINTS, SCALAR > & | joints () |
get joint states More... | |
const JointState< NJOINTS, SCALAR > & | joints () const |
get constant joint states More... | |
JointState< NJOINTS, SCALAR >::JointPositionBlock | jointPositions () |
get joint positions More... | |
const JointState< NJOINTS, SCALAR >::JointPositionBlockConst | jointPositions () const |
get constant joint positions More... | |
JointState< NJOINTS, SCALAR >::JointPositionBlock | jointVelocities () |
get joint velocities More... | |
const JointState< NJOINTS, SCALAR >::JointPositionBlockConst | jointVelocities () const |
get constant joint velocities More... | |
state_vector_quat_t | toStateVectorQuaternion () const |
coordinate_vector_t | toCoordinatePositionUnique () const |
coordinate_vector_t | toCoordinatePosition () const |
coordinate_vector_t | toCoordinateVelocity () const |
state_vector_euler_t | toStateVectorEulerXyzUnique () const |
state_vector_euler_t | toStateVectorEulerXyz () const |
void | fromStateVectorQuaternion (const state_vector_quat_t &state) |
void | fromStateVectorEulerXyz (const state_vector_euler_t &state) |
void | fromStateVectorRaw (const state_vector_quat_t &state) |
void | fromStateVectorRaw (const state_vector_euler_t &state) |
virtual void | setDefault () |
void | setZero () |
void | setRandom () |
Static Public Attributes | |
static const size_t | NDOF = Base_t::NDOF |
static const size_t | NSTATE = Base_t::NSTATE + ACT_STATE_DIM |
static const size_t | NSTATE_QUAT = NSTATE + 1 |
Static Public Attributes inherited from ct::rbd::RBDState< NJOINTS, SCALAR > | |
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t | NDOF = NJOINTS + 6 |
static const size_t | NSTATE = 2 * (NJOINTS + 6) |
static const size_t | NSTATE_QUAT = NSTATE + 1 |
Protected Attributes | |
actuator_state_vector_t | act_state_ |
Protected Attributes inherited from ct::rbd::RBDState< NJOINTS, SCALAR > | |
RigidBodyState_t | baseState_ |
JointState< NJOINTS, SCALAR > | jointState_ |
whole robot state, i.e. RBDState and Actuator Dynamics
NJOINTS | the number of robot joints |
ACT_STATE_DIM | the state dimension of the actuator |
SCALAR | the scalar type |
using ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::Base_t = RBDState<NJOINTS, SCALAR> |
using ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::RBDState_t = RBDState<NJOINTS, SCALAR> |
using ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::RigidBodyPose_t = tpl::RigidBodyPose<SCALAR> |
using ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::RigidBodyState_t = tpl::RigidBodyState<SCALAR> |
using ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::JointState_t = JointState<NJOINTS, SCALAR> |
using ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::STORAGE_TYPE = typename RigidBodyPose_t::STORAGE_TYPE |
using ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::actuator_state_vector_t = ct::core::StateVector<ACT_STATE_DIM, SCALAR> |
Euler or quat.
using ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::state_vector_quat_t = ct::core::StateVector<NSTATE_QUAT, SCALAR> |
using ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::state_vector_euler_t = ct::core::StateVector<NSTATE, SCALAR> |
|
inline |
default constructor
|
inline |
constructor with actuator state as parameter
|
inline |
constructor with base, jonit and actuator state as parameters
|
inline |
copy constructor
|
inline |
destructor
|
inline |
|
inline |
accessor to base class RBDState
|
inline |
accessor to actuator state
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::act_state_.
Referenced by TEST().
|
inline |
accessor to actuator state
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::act_state_.
|
inline |
compute state vector including with quaternion representation
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::act_state_, and ct::rbd::RBDState< NJOINTS, SCALAR >::toStateVectorQuaternion().
Referenced by TEST().
|
inline |
|
inline |
get unique state vector with euler coordinates
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::act_state_, and ct::rbd::RBDState< NJOINTS, SCALAR >::toStateVectorEulerXyzUnique().
Referenced by TEST().
|
inline |
|
inline |
get state vector in euler coordinates
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::act_state_, and ct::rbd::RBDState< NJOINTS, SCALAR >::toStateVectorEulerXyz().
Referenced by TEST().
|
inline |
|
inline |
reconstruct robot state from an Eigen state-vector with quaternion representation
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::act_state_, ct::rbd::RBDState< NJOINTS, SCALAR >::fromStateVectorQuaternion(), and ct::rbd::RBDState< NJOINTS, SCALAR >::NSTATE_QUAT.
Referenced by ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::fromStateVectorRaw(), and TEST().
|
inline |
|
inline |
reconstruct robot state from an Eigen state-vector with euler representation
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::act_state_, ct::rbd::RBDState< NJOINTS, SCALAR >::fromStateVectorEulerXyz(), and ct::rbd::RBDState< NJOINTS, SCALAR >::NSTATE.
Referenced by ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::fromStateVectorRaw(), and TEST().
|
inline |
|
inline |
a convenience method
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::fromStateVectorQuaternion().
|
inline |
a convenience method
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::fromStateVectorEulerXyz().
|
inline |
set all zero
References ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::act_state_, and ct::rbd::RBDState< NJOINTS, SCALAR >::setZero().
|
static |
|
static |
|
static |
|
protected |
Referenced by ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::actuatorState(), ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::fromStateVectorEulerXyz(), ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::fromStateVectorQuaternion(), ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::setZero(), ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::toStateVectorEulerXyz(), ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::toStateVectorEulerXyzUnique(), and ct::rbd::FloatingBaseRobotState< NJOINTS, ACT_STATE_DIM, SCALAR >::toStateVectorQuaternion().