11 #include "../coordinate/CoordinateBase.h" 28 template <
size_t NUM_OUTPUTS,
size_t NUM_JOINTS,
size_t NUM_CONTACTPOINTS>
32 typedef std::shared_ptr<OperationalModelBase<NUM_OUTPUTS, NUM_JOINTS, NUM_CONTACTPOINTS>>
ptr;
42 typedef Eigen::Matrix<double, NUM_OUTPUTS, NUM_OUTPUTS>
M_t;
43 typedef Eigen::Matrix<double, NUM_OUTPUTS, 1>
C_t;
44 typedef Eigen::Matrix<double, NUM_OUTPUTS, 1>
G_t;
45 typedef Eigen::Matrix<double, NUM_JOINTS, NUM_OUTPUTS>
S_t;
46 typedef Eigen::Matrix<double, 3, NUM_OUTPUTS>
Jc_t;
49 const coordinate_class_ptr_t& coordinatePtr =
nullptr)
55 const M_t&
M()
const {
return M_; }
59 const C_t&
C()
const {
return C_; }
61 const G_t&
G()
const {
return G_; }
63 const S_t&
S()
const {
return S_; }
65 const std::array<Jc_t, NUM_CONTACTPOINTS>&
AllJc()
const {
return AllJc_; }
67 const Jc_t&
Jc(
size_t i)
const {
return AllJc_[i]; }
87 Eigen::Matrix<double, NUM_OUTPUTS, 1>
getAccelerations(Eigen::Matrix<double, NUM_JOINTS + 6, 1> qdd)
92 return qdd.template head<NUM_OUTPUTS>();
99 virtual void update(
const state_t& state) = 0;
112 std::array<Jc_t, NUM_CONTACTPOINTS>
AllJc_;
virtual ~OperationalModelBase()
Definition: OperationalModelBase.h:52
OperationalJacobianBase< NUM_OUTPUTS, NUM_JOINTS >::ptr jacobian_class_ptr_t
Definition: OperationalModelBase.h:35
Eigen::Matrix< double, NUM_OUTPUTS, 1 > getPositions()
Get the coordinate position.
Definition: OperationalModelBase.h:69
Eigen::Matrix< double, NUM_OUTPUTS, 1 > getVelocities()
Get the coordinate velocity.
Definition: OperationalModelBase.h:78
state_t state_
Definition: OperationalModelBase.h:105
std::shared_ptr< CoordinateBase< NUM_OUTPUTS, NUM_JOINTS > > ptr
Definition: CoordinateBase.h:21
S_t S_
Definition: OperationalModelBase.h:111
Definition: OperationalJacobianBase.h:20
OperationalJacobianBase< NUM_OUTPUTS, NUM_JOINTS >::jacobian_inv_t jacobian_inv_t
Definition: OperationalModelBase.h:39
coordinate_vector_t toCoordinatePosition() const
Definition: RBDState.h:136
Eigen::Matrix< double, NUM_OUTPUTS, 1 > G_t
Definition: OperationalModelBase.h:44
coordinate_class_ptr_t coordinatePtr_
Definition: OperationalModelBase.h:103
M_t MInverse_
Definition: OperationalModelBase.h:108
G_t G_
Definition: OperationalModelBase.h:110
M_t M_
Definition: OperationalModelBase.h:107
const S_t & S() const
Get the selection matrix: S.
Definition: OperationalModelBase.h:63
C_t C_
Definition: OperationalModelBase.h:109
const M_t & MInverse() const
Get the inertia matrix inverse: M^{-1}.
Definition: OperationalModelBase.h:57
OperationalModelBase(const jacobian_class_ptr_t &jacobianPtr=nullptr, const coordinate_class_ptr_t &coordinatePtr=nullptr)
Definition: OperationalModelBase.h:48
Eigen::Matrix< double, NUM_OUTPUTS, NUM_OUTPUTS > M_t
Definition: OperationalModelBase.h:42
Eigen::Matrix< double, NUM_JOINTS, NUM_OUTPUTS > S_t
Definition: OperationalModelBase.h:45
Eigen::Matrix< double, NUM_OUTPUTS, 1 > getAccelerations(Eigen::Matrix< double, NUM_JOINTS+6, 1 > qdd)
Get the coordinate acceleration.
Definition: OperationalModelBase.h:87
const G_t & G() const
Get the gravity force vector: G.
Definition: OperationalModelBase.h:61
const C_t & C() const
Get the Coriolis force vector: C.
Definition: OperationalModelBase.h:59
const Jc_t & Jc(size_t i) const
Get the ith contact Jacobian: Jc[i].
Definition: OperationalModelBase.h:67
Definition: OperationalModelBase.h:29
virtual void update(const state_t &state)=0
OperationalJacobianBase< NUM_OUTPUTS, NUM_JOINTS >::jacobian_t jacobian_t
Definition: OperationalModelBase.h:37
Eigen::Matrix< double, 3, NUM_OUTPUTS > Jc_t
Definition: OperationalModelBase.h:46
const std::array< Jc_t, NUM_CONTACTPOINTS > & AllJc() const
Get all of the contact Jacobians: Jc.
Definition: OperationalModelBase.h:65
jacobian_class_ptr_t jacobianPtr_
Definition: OperationalModelBase.h:102
std::array< Jc_t, NUM_CONTACTPOINTS > AllJc_
Definition: OperationalModelBase.h:112
RBDState< NUM_JOINTS > state_t
Definition: OperationalModelBase.h:41
Eigen::Matrix< double, NUM_OUTPUTS, 1 > C_t
Definition: OperationalModelBase.h:43
CoordinateBase< NUM_OUTPUTS, NUM_JOINTS >::ptr coordinate_class_ptr_t
Definition: OperationalModelBase.h:34
coordinate_vector_t toCoordinateVelocity() const
Definition: RBDState.h:144
const M_t & M() const
Get the inertia matrix: M.
Definition: OperationalModelBase.h:55
std::shared_ptr< OperationalModelBase< NUM_OUTPUTS, NUM_JOINTS, NUM_CONTACTPOINTS > > ptr
Definition: OperationalModelBase.h:32