BipedalLocomotion::ContinuousDynamicalSystem::MultiStateWeightProvider class

MultiStateWeightProvider describes the provider for a constant weight.

Base classes

struct BipedalLocomotion::System::WeightProvider
WeightProvider describes the provider for a weight.

Public functions

auto getOutput() const -> const Eigen::VectorXd& override
Get the weight associated to the provider.
auto initialize(std::weak_ptr<const ParametersHandler::IParametersHandler> handler) -> bool override
Initialize constant weight provider.
auto setState(const std::string& state) -> bool
Set the state of the provider.
auto reset(const std::string& state) -> bool
Reset the internal weight of the provider.
auto advance() -> bool override
Update the content of the weight provider.
auto isOutputValid() const -> bool final
Determines the validity of the weight.

Function documentation

const Eigen::VectorXd& BipedalLocomotion::ContinuousDynamicalSystem::MultiStateWeightProvider::getOutput() const override

Get the weight associated to the provider.

Returns A vector representing the diagonal matrix of the weight

bool BipedalLocomotion::ContinuousDynamicalSystem::MultiStateWeightProvider::initialize(std::weak_ptr<const ParametersHandler::IParametersHandler> handler) override

Initialize constant weight provider.

Parameters
handler pointer to the parameter handler.
Returns true in case of success/false otherwise.

For each state defined in states, you should define a Group called state that contains the following parameters

Parameter NameTypeDescriptionMandatory
weightvector<double>Vector representing the diagonal matrix of a constant weightYes
namestringName of the stateYes

bool BipedalLocomotion::ContinuousDynamicalSystem::MultiStateWeightProvider::setState(const std::string& state)

Set the state of the provider.

Parameters
state name of the state. Please notice that the name should be the one passed in the initialization
Returns true in case of success/false otherwise.

bool BipedalLocomotion::ContinuousDynamicalSystem::MultiStateWeightProvider::reset(const std::string& state)

Reset the internal weight of the provider.

Parameters
state name of the state. Please notice that the name should be the one passed in the initialization.
Returns true in case of success/false otherwise.

This method reset also the value of the dynamical system.

bool BipedalLocomotion::ContinuousDynamicalSystem::MultiStateWeightProvider::advance() override

Update the content of the weight provider.

Returns True in case of success and false otherwise

bool BipedalLocomotion::ContinuousDynamicalSystem::MultiStateWeightProvider::isOutputValid() const final

Determines the validity of the weight.

Returns True if the weight is valid, false otherwise.