class
CentroidalDynamicsCentroidalDynamics describes the centroidal dynamics of a multi-body system.
The centroidal momentum is the aggregate linear and angular momentum of each link of the robot referred to the robot center of mass (CoM). The vectors and are the linear and angular momentum, respectively. The coordinates of are expressed w.r.t. a frame centered in the robot CoM and oriented as the inertial frame The CentroidalDynamics class describes the dynamics of the centroidal momentum and of the CoM. Indeed the time derivative of the centroidal momentum depends on the external contact wrenches acting on the system, thus leading to:
where , is the mass of the robot and the number of active contacts. The relation between the linear momentum and the robot CoM velocity is linear and depends on the robot mass , i.e. .
The CentroidalDynamics inherits from a generic DynamicalSystem where the State is described by a BipedalLocomotion::
Name | Type | Description |
---|---|---|
com_pos | Eigen::Vector3d | Position of the CoM written in the inertial frame |
com_vel | Eigen::Vector3d | Velocity of the CoM written in the inertial frame |
angular_momentum | Eigen::Vector3d | The centroidal angular momentum whose coordinates are written respect the inertial frame. |
The StateDerivative
is described by a BipedalLocomotion::
Name | Type | Description |
---|---|---|
com_vel | Eigen::Vector3d | Velocity of the CoM written in the inertial frame |
com_acc | Eigen::Vector3d | Acceleration of the CoM written in the inertial frame |
angular_momentum_rate | Eigen::Vector3d | The centroidal angular momentum rate of change written respect the inertial frame. |
The Input
is described by a BipedalLocomotion::
Name | Type | Description |
---|---|---|
contacts | std::unordered_map<std::string, BipedalLocomotion:: | List of contact where each force applied in the discrete geometry contact is expressed with respect to the inertial frame |
external_wrench | std::optional<BipedalLocomotion::Math::Wrenchd> | Optional wrench applied to the robot center of mass. The coordinates are expressed in the inertial frame |
Base classes
-
template<class _Derived>class DynamicalSystem<CentroidalDynamics>
- DynamicalSystem defines a continuous time dynamical system, i.e.
Public functions
-
auto initialize(std::weak_ptr<const ParametersHandler::
IParametersHandler> handler) -> bool - Initialize the CentroidalDynamics system.
- auto dynamics(const std::chrono::nanoseconds& time, StateDerivative& stateDerivative) -> bool
- Computes the centroidal momentum dynamics.
- auto setState(const State& state) -> bool
- Set the state of the dynamical system.
- auto getState() const -> const State&
- Get the state to the dynamical system.
- auto setControlInput(const Input& controlInput) -> bool
- Set the control input to the dynamical system.
- void setGravityVector(const Eigen::Ref<const Eigen::Vector3d>& gravity)
- Set the gravity vector of the dynamical system.
Function documentation
bool BipedalLocomotion:: ContinuousDynamicalSystem:: CentroidalDynamics:: initialize(std::weak_ptr<const ParametersHandler:: IParametersHandler> handler)
Initialize the CentroidalDynamics system.
Parameters | |
---|---|
handler | pointer to the parameter handler. |
Returns | true in case of success/false otherwise. |
bool BipedalLocomotion:: ContinuousDynamicalSystem:: CentroidalDynamics:: dynamics(const std::chrono::nanoseconds& time,
StateDerivative& stateDerivative)
Computes the centroidal momentum dynamics.
Parameters | |
---|---|
time | the time at witch the dynamics is computed. |
stateDerivative | |
Returns | true in case of success, false otherwise. |
It return .
bool BipedalLocomotion:: ContinuousDynamicalSystem:: CentroidalDynamics:: setControlInput(const Input& controlInput)
Set the control input to the dynamical system.
Parameters | |
---|---|
controlInput | the value of the control input used to compute the system dynamics. |
Returns | true in case of success, false otherwise. |
void BipedalLocomotion:: ContinuousDynamicalSystem:: CentroidalDynamics:: setGravityVector(const Eigen::Ref<const Eigen::Vector3d>& gravity)
Set the gravity vector of the dynamical system.
Parameters | |
---|---|
gravity | the value of the gravity vector used in the system dynamics. |
Returns | true in case of success, false otherwise. |