template<class _Derived>
BipedalLocomotion::ContinuousDynamicalSystem::Integrator class

Integrator base class.

f$. Please inherit publicly from this class in order to define your custom integrator. Just be sure to call after your class definition BLF_DEFINE_INTEGRATOR_STRUCTURE()

Derived classes

template<class _Derived>
class FixedStepIntegrator
Fixed step integrator base class.
template<class _Derived>
class FixedStepIntegrator
Fixed step integrator base class.

Public types

using DynamicalSystem = typename internal::traits<Integrator<_Derived>>::DynamicalSystem
using State = typename internal::traits<Integrator<_Derived>>::State
using StateDerivative = typename internal::traits<Integrator<_Derived>>::StateDerivative

Public functions

auto setDynamicalSystem(std::shared_ptr<DynamicalSystem> dynamicalSystem) -> bool
Set the DynamicalSystem to be considered.
auto dynamicalSystem() const -> std::weak_ptr<DynamicalSystem>
Get the dynamical system.
auto getSolution() const -> const State&
Retrieve the solution.
auto integrate(const std::chrono::nanoseconds& initialTime, const std::chrono::nanoseconds& finalTime) -> bool
Integrate the dynamical system from initialTime to finalTime.

Protected variables

std::shared_ptr<DynamicalSystem> m_dynamicalSystem
Pointer to a dynamical system.

Function documentation

template<class _Derived>
bool BipedalLocomotion::ContinuousDynamicalSystem::Integrator<_Derived>::setDynamicalSystem(std::shared_ptr<DynamicalSystem> dynamicalSystem)

Set the DynamicalSystem to be considered.

Parameters
dynamicalSystem Pointer to a dynamical system.
Returns true in case of success, false otherwise.

template<class _Derived>
std::weak_ptr<DynamicalSystem> BipedalLocomotion::ContinuousDynamicalSystem::Integrator<_Derived>::dynamicalSystem() const

Get the dynamical system.

Returns a weak pointer to a dynamical system.

template<class _Derived>
const State& BipedalLocomotion::ContinuousDynamicalSystem::Integrator<_Derived>::getSolution() const

Retrieve the solution.

Returns a const reference to the solution.

template<class _Derived>
bool BipedalLocomotion::ContinuousDynamicalSystem::Integrator<_Derived>::integrate(const std::chrono::nanoseconds& initialTime, const std::chrono::nanoseconds& finalTime)

Integrate the dynamical system from initialTime to finalTime.

Parameters
initialTime initial time of the integration.
finalTime final time of the integration.
Returns true in case of success, false otherwise.