11 template <
size_t NJOINTS,
typename SCALAR>
17 template <
size_t NJOINTS,
typename SCALAR>
22 template <
size_t NJOINTS,
typename SCALAR>
28 template <
size_t NJOINTS,
typename SCALAR>
36 derivative.template head<NJOINTS>() = control.template head<NJOINTS>() / r_;
39 template <
size_t NJOINTS,
typename SCALAR>
42 const typename BASE::act_state_vector_t& actState)
45 return (actState.template topRows<NJOINTS>() - robotJointState.
getPositions()) * k_;
48 template <
size_t NJOINTS,
typename SCALAR>
virtual void computeActuatorDynamics(const JointState< NJOINTS, SCALAR > &robotJointState, const ct::core::StateVector< NJOINTS, SCALAR > &state, const SCALAR &t, const ct::core::ControlVector< NJOINTS, SCALAR > &control, ct::core::StateVector< NJOINTS, SCALAR > &derivative) override
Definition: SEADynamicsFirstOrder-impl.h:29
joint state and joint velocity
Definition: JointState.h:21
virtual ~SEADynamicsFirstOrder()
destructor
Definition: SEADynamicsFirstOrder-impl.h:18
SEADynamicsFirstOrder(double k_spring, double gear_ratio)
constructor assuming unit amplification
Definition: SEADynamicsFirstOrder-impl.h:12
CppAD::AD< CppAD::cg::CG< double > > SCALAR
virtual SEADynamicsFirstOrder< NJOINTS, SCALAR > * clone() const override
deep cloning
Definition: SEADynamicsFirstOrder-impl.h:23
Base & toImplementation()
virtual core::ControlVector< NJOINTS, SCALAR > computeControlOutput(const JointState< NJOINTS, SCALAR > &robotJointState, const typename BASE::act_state_vector_t &actState) override
Definition: SEADynamicsFirstOrder-impl.h:40
JointPositionBlock getPositions()
get joint state
Definition: JointState.h:76
virtual ct::core::StateVector< NJOINTS, SCALAR > computeStateFromOutput(const JointState< NJOINTS, SCALAR > &refRobotJointState, const core::ControlVector< NJOINTS, SCALAR > &refControl) override
reconstruct actuator state from a desired control output and robot joint state (e.g. for initialization)
Definition: SEADynamicsFirstOrder-impl.h:49
Definition: SEADynamicsFirstOrder.h:25