23 template <
size_t NJOINTS,
size_t ACT_STATE_DIM = 0,
typename SCALAR =
double>
27 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
80 template <
typename T = state_vector_quat_t>
88 template <
typename T = state_vector_quat_t>
96 template <
typename T = state_vector_euler_t>
104 template <
typename T = state_vector_euler_t>
112 template <
typename T = state_vector_euler_t>
120 template <
typename T = state_vector_euler_t>
128 template <
typename T =
void>
132 Eigen::VectorBlock<const Eigen::Matrix<SCALAR, NSTATE_QUAT, 1>,
Base_t::NSTATE_QUAT> stateBase =
133 state.template head<Base_t::NSTATE_QUAT>();
135 act_state_ = state.template tail<ACT_STATE_DIM>();
137 template <
typename T =
void>
145 template <
typename T =
void>
149 Eigen::VectorBlock<const Eigen::Matrix<SCALAR, NSTATE, 1>,
Base_t::NSTATE> stateBase =
150 state.template head<Base_t::NSTATE>();
152 act_state_ = state.template tail<ACT_STATE_DIM>();
154 template <
typename T =
void>
FloatingBaseRobotState(const RBDState_t &rbdState, const actuator_state_vector_t &act_state=actuator_state_vector_t::Zero())
constructor with actuator state as parameter
Definition: FloatingBaseRobotState.h:53
void fromStateVectorRaw(const state_vector_quat_t &state)
a convenience method
Definition: FloatingBaseRobotState.h:162
state_vector_euler_t toStateVectorEulerXyz() const
Definition: RBDState.h:161
std::enable_if<(ACT_STATE_DIM==0), T >::type fromStateVectorEulerXyz(const state_vector_euler_t &state)
Definition: FloatingBaseRobotState.h:155
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 ...
Definition: FloatingBaseRobotState.h:129
STORAGE_TYPE
the orientation can either be stored as EulerAngles or as quaternion.
Definition: RigidBodyPose.h:38
std::enable_if<(ACT_STATE_DIM==0), T >::type toStateVectorEulerXyzUnique() const
Definition: FloatingBaseRobotState.h:105
Pose of a single rigid body.
Definition: RigidBodyPose.h:29
static const size_t NSTATE_QUAT
Definition: FloatingBaseRobotState.h:40
joint state and joint velocity
Definition: JointState.h:21
actuator_state_vector_t & actuatorState()
accessor to actuator state
Definition: FloatingBaseRobotState.h:76
coordinate_vector_t toCoordinatePositionUnique() const
Definition: RBDState.h:128
joint states and base states
Definition: RBDState.h:27
coordinate_vector_t toCoordinatePosition() const
Definition: RBDState.h:136
static const size_t NSTATE_QUAT
Definition: RBDState.h:34
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
Definition: FloatingBaseRobotState.h:146
std::enable_if<(ACT_STATE_DIM > 0), T >::type toStateVectorEulerXyzUnique() const
get unique state vector with euler coordinates
Definition: FloatingBaseRobotState.h:97
std::enable_if<(ACT_STATE_DIM > 0), T >::type toStateVectorEulerXyz() const
get state vector in euler coordinates
Definition: FloatingBaseRobotState.h:113
std::enable_if<(ACT_STATE_DIM > 0), T >::type toStateVectorQuaternion() const
compute state vector including with quaternion representation
Definition: FloatingBaseRobotState.h:81
void fromStateVectorRaw(const state_vector_euler_t &state)
a convenience method
Definition: FloatingBaseRobotState.h:164
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
Definition: FloatingBaseRobotState.h:60
void setZero()
set all zero
Definition: FloatingBaseRobotState.h:166
static const size_t NSTATE
Definition: FloatingBaseRobotState.h:39
FloatingBaseRobotState(const FloatingBaseRobotState &other)
copy constructor
Definition: FloatingBaseRobotState.h:68
std::enable_if<(ACT_STATE_DIM==0), T >::type fromStateVectorQuaternion(const state_vector_quat_t &state)
Definition: FloatingBaseRobotState.h:138
static const size_t NSTATE
Definition: RBDState.h:33
~FloatingBaseRobotState()
destructor
Definition: FloatingBaseRobotState.h:70
const RBDState_t & rbdState() const
accessor to base class RBDState
Definition: FloatingBaseRobotState.h:74
ct::core::StateVector< NSTATE, SCALAR > state_vector_euler_t
Definition: RBDState.h:39
void fromStateVectorEulerXyz(const state_vector_euler_t &state)
Definition: RBDState.h:180
static const size_t NDOF
Definition: FloatingBaseRobotState.h:38
const actuator_state_vector_t & actuatorState() const
accessor to actuator state
Definition: FloatingBaseRobotState.h:78
FloatingBaseRobotState(const STORAGE_TYPE storage=STORAGE_TYPE::EULER)
default constructor
Definition: FloatingBaseRobotState.h:47
State (pose and velocities) of a single rigid body.
Definition: RigidBodyState.h:22
void fromStateVectorQuaternion(const state_vector_quat_t &state)
Definition: RBDState.h:170
state_vector_quat_t toStateVectorQuaternion() const
Definition: RBDState.h:115
whole robot state, i.e. RBDState and Actuator Dynamics
Definition: FloatingBaseRobotState.h:24
std::enable_if<(ACT_STATE_DIM==0), T >::type toStateVectorEulerXyz() const
Definition: FloatingBaseRobotState.h:121
typename RigidBodyPose_t::STORAGE_TYPE STORAGE_TYPE
Definition: FloatingBaseRobotState.h:35
actuator_state_vector_t act_state_
Definition: FloatingBaseRobotState.h:173
RBDState_t & rbdState()
accessor to base class RBDState
Definition: FloatingBaseRobotState.h:72
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t NDOF
Definition: RBDState.h:32
std::enable_if<(ACT_STATE_DIM==0), T >::type toStateVectorQuaternion() const
Definition: FloatingBaseRobotState.h:89
state_vector_euler_t toStateVectorEulerXyzUnique() const
Definition: RBDState.h:152
void setZero()
Definition: RBDState.h:198
coordinate_vector_t toCoordinateVelocity() const
Definition: RBDState.h:144