- 3.0.2 rigid body dynamics module.
ActuatorDynamicsSymplectic.h
Go to the documentation of this file.
1 /**********************************************************************************************************************
2 This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich.
3 Licensed under the BSD-2 license (see LICENSE file in main directory)
4 **********************************************************************************************************************/
5 
6 #pragma once
7 
9 
10 namespace ct {
11 namespace rbd {
12 
13 
19 template <size_t NJOINTS, size_t ACT_STATE_DIMS = 2 * NJOINTS, typename SCALAR = double>
21 {
22 public:
23  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
24 
25  static const size_t ACT_STATE_DIM = ACT_STATE_DIMS;
26  static const size_t ACT_POS_DIM = ACT_STATE_DIMS / 2;
27  static const size_t ACT_VEL_DIM = ACT_STATE_DIMS / 2;
28 
32 
33 
35 
37 
39 
40  virtual void computePdot(const JointState<NJOINTS, SCALAR>& robotJointState,
41  const act_state_vector_t& x,
42  const act_vel_vector_t& v,
44  act_pos_vector_t& pDot) = 0;
45 
46 
47  virtual void computeVdot(const JointState<NJOINTS, SCALAR>& robotJointState,
48  const act_state_vector_t& x,
49  const act_pos_vector_t& p,
51  act_vel_vector_t& vDot) = 0;
52 
53 
55 
64  const JointState<NJOINTS, SCALAR>& robotJointState,
65  const act_state_vector_t& actState) = 0;
66 
72  const JointState<NJOINTS, SCALAR>& refRobotJointState,
73  const core::ControlVector<NJOINTS, SCALAR>& refControl) = 0;
74 };
75 
76 
77 } // namespace rbd
78 } // namespace ct
virtual core::ControlVector< NJOINTS, SCALAR > computeControlOutput(const JointState< NJOINTS, SCALAR > &robotJointState, const act_state_vector_t &actState)=0
output equation of the actuator
virtual ActuatorDynamicsSymplectic< NJOINTS, ACT_STATE_DIMS, SCALAR > * clone() const override=0
joint state and joint velocity
Definition: JointState.h:21
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const size_t ACT_STATE_DIM
Definition: ActuatorDynamicsSymplectic.h:25
static const size_t ACT_POS_DIM
Definition: ActuatorDynamicsSymplectic.h:26
Definition: ActuatorDynamicsSymplectic.h:20
static const size_t ACT_VEL_DIM
Definition: ActuatorDynamicsSymplectic.h:27
virtual void computePdot(const JointState< NJOINTS, SCALAR > &robotJointState, const act_state_vector_t &x, const act_vel_vector_t &v, const core::ControlVector< NJOINTS, SCALAR > &control, act_pos_vector_t &pDot)=0
ct::core::StateVector< state_dim > x
ct::core::StateVector< ACT_POS_DIM, SCALAR > act_pos_vector_t
Definition: ActuatorDynamicsSymplectic.h:30
ActuatorDynamicsSymplectic()
Definition: ActuatorDynamicsSymplectic.h:34
ct::core::StateVector< ACT_STATE_DIMS, SCALAR > act_state_vector_t
Definition: ActuatorDynamicsSymplectic.h:29
virtual ~ActuatorDynamicsSymplectic()
Definition: ActuatorDynamicsSymplectic.h:36
ct::core::StateVector< ACT_VEL_DIM, SCALAR > act_vel_vector_t
Definition: ActuatorDynamicsSymplectic.h:31
virtual void computeVdot(const JointState< NJOINTS, SCALAR > &robotJointState, const act_state_vector_t &x, const act_pos_vector_t &p, const core::ControlVector< NJOINTS, SCALAR > &control, act_vel_vector_t &vDot)=0
virtual ct::core::StateVector< ACT_STATE_DIMS, SCALAR > computeStateFromOutput(const JointState< NJOINTS, SCALAR > &refRobotJointState, const core::ControlVector< NJOINTS, SCALAR > &refControl)=0
reconstruct actuator state from a desired control output and robot joint state (e.g. for initialization)