21 template <
class RBDContainer,
size_t NUM_CONTACTPOINTS,
typename SCALAR =
double>
23 :
public OperationalModelBase<RBDContainer::NJOINTS + 6, RBDContainer::NJOINTS, NUM_CONTACTPOINTS>
26 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
37 typedef std::shared_ptr<OperationalModelRBD<RBDContainer, NUM_CONTACTPOINTS>>
ptr;
43 : rbdContainerPtr_(rbdContainerPtr), endEffectorArray_(endEffectorArray)
52 void update(
const state_t& state)
override 63 rbdContainerPtr_->inverseDynamics().setJointStatus(state.
jointPositions());
64 Eigen::Matrix<SCALAR, 6, 1> baseWrench;
65 Eigen::Matrix<SCALAR, 12, 1> jointForces;
68 Eigen::Matrix<SCALAR, 6, 1> trunkVel;
70 rbdContainerPtr_->inverseDynamics().C_terms_fully_actuated(
75 rbdContainerPtr_->inverseDynamics().G_terms_fully_actuated(
80 Base::S_ << Eigen::MatrixXd::Zero(12, 6), Eigen::MatrixXd::Identity(12, 12);
83 for (
size_t j = 0; j < NUM_CONTACTPOINTS; j++)
85 Vector3s b_r_f = rbdContainerPtr_->getEEPositionInBase(j, state.
jointPositions()).toImplementation();
86 Eigen::Matrix<SCALAR, 3, NUM_JOINTS> b_J_f =
87 rbdContainerPtr_->getJacobianBaseEEbyId(j, state.
jointPositions()).
template bottomRows<3>();
94 typename RBDContainer::Ptr_t rbdContainerPtr_;
95 std::array<EndEffector<NUM_JOINTS>, NUM_CONTACTPOINTS> endEffectorArray_;
100 template <
class RBDContainer,
size_t NUM_CONTACTPOINTS>
This is a class for expressing the RBD equations of an articulated robot as an operational model...
Definition: OperationalModelRBD.h:22
Eigen::Matrix< SCALAR, 3, 1 > Vector3s
Definition: OperationalModelRBD.h:29
Eigen::Matrix< SCALAR, 6, 1 > computeGravityB6D(const Vector3Tpl &gravityW=gravity3DW()) const
This methods returns the 6D gravity vector expressed in the Base frame.
Definition: RigidBodyPose.h:380
state_t state_
Definition: OperationalModelBase.h:105
RigidBodyPose_t & basePose()
get base pose
Definition: RBDState.h:67
OperationalModelRBD(const typename RBDContainer::Ptr_t &rbdContainerPtr, const std::array< EndEffector< NUM_JOINTS >, NUM_CONTACTPOINTS > &endEffectorArray)
Definition: OperationalModelRBD.h:41
JointState< NJOINTS, SCALAR >::JointPositionBlock jointPositions()
get joint positions
Definition: RBDState.h:99
~OperationalModelRBD()
Definition: OperationalModelRBD.h:47
S_t S_
Definition: OperationalModelBase.h:111
joint states and base states
Definition: RBDState.h:27
Definition: OperationalModelRBD.h:33
void update(const state_t &state) override
Definition: OperationalModelRBD.h:52
M_t MInverse_
Definition: OperationalModelBase.h:108
G_t G_
Definition: OperationalModelBase.h:110
M_t M_
Definition: OperationalModelBase.h:107
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Eigen::Matrix< SCALAR, 3, 3 > Matrix3s
Definition: OperationalModelRBD.h:28
kindr::Velocity< SCALAR, 3 > & baseLinearVelocity()
get base linear velocity
Definition: RBDState.h:86
C_t C_
Definition: OperationalModelBase.h:109
OperationalModelBase< NUM_OUTPUTS, NUM_JOINTS, NUM_CONTACTPOINTS > Base
Definition: OperationalModelRBD.h:38
kindr::LocalAngularVelocity< SCALAR > & baseLocalAngularVelocity()
get base local angular velocity
Definition: RBDState.h:75
static void FromBaseJacToInertiaJacTranslation(const Matrix3s &i_R_b, const Vector3s &b_r_point, const Eigen::Matrix< SCALAR, 3, NUM_JOINTS > &b_J_point, Eigen::Matrix< SCALAR, 3, NUM_JOINTS+6 > &i_J_point)
Definition: FrameJacobian.h:77
JointState< NJOINTS, SCALAR >::JointPositionBlock jointVelocities()
get joint velocities
Definition: RBDState.h:108
Definition: OperationalModelBase.h:29
kindr::RotationMatrix< SCALAR > getRotationMatrix() const
This method returns the rotation matrix from base to inertia frame. This method returns which is the...
Definition: RigidBodyPose.h:150
Definition: OperationalModelRBD.h:34
std::shared_ptr< OperationalModelRBD< RBDContainer, NUM_CONTACTPOINTS > > ptr
Definition: OperationalModelRBD.h:37
Definition: EndEffector.h:15
std::array< Jc_t, NUM_CONTACTPOINTS > AllJc_
Definition: OperationalModelBase.h:112
Base::state_t state_t
Definition: OperationalModelRBD.h:39