1#include "dynamical_systems/IDynamicalSystem.hpp"
3#include "dynamical_systems/exceptions/EmptyBaseFrameException.hpp"
4#include "dynamical_systems/exceptions/NotImplementedException.hpp"
6#include "state_representation/exceptions/IncompatibleReferenceFramesException.hpp"
7#include "state_representation/exceptions/IncompatibleStatesException.hpp"
8#include "state_representation/space/joint/JointState.hpp"
9#include "state_representation/space/cartesian/CartesianState.hpp"
21 return !(state.get_reference_frame() != this->get_base_frame().get_name()
22 && state.get_reference_frame() != this->get_base_frame().get_reference_frame());
32 return this->compute_dynamics(state);
37 if (this->get_base_frame().is_empty()) {
40 if (state.get_reference_frame() != this->get_base_frame().get_name()) {
41 if (state.get_reference_frame() != this->get_base_frame().get_reference_frame()) {
43 "The evaluated state " + state.get_name() +
" in frame " + state.get_reference_frame()
44 +
" is incompatible with the base frame of the dynamical system " + this->get_base_frame().get_name()
45 +
" in frame " + this->get_base_frame().get_reference_frame() +
"."
49 result = this->compute_dynamics(result);
50 return result.
is_empty() ? result : this->get_base_frame() * result;
52 return this->compute_dynamics(state);
58 if (!this->is_compatible(state)) {
60 "The attractor and the provided state are not compatible."
63 return this->compute_dynamics(state);
virtual bool is_compatible(const S &state) const
Check compatibility between a state and the dynamical system.
S evaluate(const S &state) const
Evaluate the value of the dynamical system at a given state.
Class to represent a state in Cartesian space.
CartesianState inverse() const
Compute the inverse of the current CartesianState.
Class to define a state in joint space.
bool is_empty() const
Getter of the empty attribute.
Systems of equations relating state variables to their derivatives.
Core state variables and objects.