20 #ifndef _se3_dc_linear_first_order_motor_model_hpp_ 21 #define _se3_dc_linear_first_order_motor_model_hpp_ 24 #include "pinocchio/macros.hpp" 25 #include "pinocchio/actuators/actuator-model.hpp" 117 template<
typename Scalar_>
121 typedef Scalar_ Scalar_t;
122 typedef typename Eigen::Matrix<Scalar_, 10,1 > Parameters_t;
123 typedef typename Eigen::Matrix<Scalar_, 3,1> Observations_t;
124 typedef typename Eigen::Matrix<Scalar_, 6,1> S_t;
125 typedef typename Eigen::Matrix<Scalar_, 2,1> X_t;
126 typedef typename Eigen::Matrix<Scalar_, 2,1> dX_t;
127 typedef typename Eigen::Matrix<Scalar_, 1,1> U_t;
130 const Observations_t &
h()
const {
return h_;}
133 const Parameters_t &
c()
const {
return c_;}
136 const S_t &
S()
const {
return S_;}
171 Observations_t &
h() {
return h_;}
203 template<
typename Scalar_>
208 typedef Eigen::Matrix<Scalar_,3,1,0> Vector3Scalar;
213 void calc(
typename ActuatorDCFirstOrderMotorData<Scalar_>::dX_t & dstate,
214 typename ActuatorDCFirstOrderMotorData<Scalar_>::X_t & state,
215 typename ActuatorDCFirstOrderMotorData<Scalar_>::U_t & control,
220 dstate[0] = data.
c()[0] * control[0] + data.
c()[1] * state[0] +
224 data.
h()[0] = control[0] /data.
c()[4] - data.
c()[7] *state[1]/data.
c()[4];
226 data.
h()[1] = data.
c()[5] *data.
h()[0];
228 data.
h()[2] = data.
c()[7] * state[1];
234 aForce.
linear(Vector3Scalar::Zero(3,1));
235 aForce.
angular(Vector3Scalar(0.0,0.0,data.
h()[1]));
248 template <
typename Scalar_>
254 template <
typename Scalar_>
void backEMF(Scalar_ c)
Terminal Inductance (Henry)
void speedTorqueGrad(Scalar_ c)
Speed torque gradient (rads^-1/Nm) .
void rotorResistor(Scalar_ c)
Rotor resistor (Ohm) - .
Template implementing a first order linear DC motor model.
const Observations_t & h() const
Return observation vector.
Concreate Class representing a force.
const Vector6 & toVector() const
Return the force.
const Parameters_t & c() const
Return parameters.
void torqueConst(Scalar_ c)
Torque constant (Nm/A) - .
ConstAngular_t angular() const
Return the angular part of the force vector.
void rotorInertia(Scalar_ c)
Rotor inertia (kg/m2) - .
Observations_t h_
Observation variables.
Template for handling data related to a first order linear DC motor model.
ConstLinear_t linear() const
Return the linear part of the force vector.
void updateFirstThreeParameters()
Update the first three parameters of the actuators:
const S_t & S() const
Returns selection matrix.
Parameters_t c_
Vector parameters.