#include <DynamicalSystem.h>
Classes | |
struct | Spring |
Public Member Functions | |
DSMassSpringDamper (const Spring &attractor, const std::vector< Spring > &repellers, const double damping, const double mass=1.0) | |
virtual DynamicalSystem * | clone () const |
void | step (Eigen::VectorXd &x_ddot, const Eigen::VectorXd &x_dot, const Eigen::VectorXd &x, double dt) const |
Eigen::VectorXd | getGoal () const |
void | setGoal (const Eigen::VectorXd &x_des) |
![]() | |
virtual void | step (Eigen::VectorXd &x_dot, const Eigen::VectorXd &x, double dt) const |
![]() | |
DynamicalSystem ()=default | |
virtual | ~DynamicalSystem ()=default |
virtual double | goalDistance (const Eigen::VectorXd &x_curr) const |
unsigned int | getStateDim () const |
Protected Attributes | |
Spring | attractorSpring |
std::vector< Spring > | repellerSprings |
double | damping |
double | mass |
Additional Inherited Members | |
![]() | |
static DynamicalSystem * | create (PropertySource *properties, unsigned int innerTaskDim) |
![]() | |
Eigen::VectorXd | x_dot_des |
Mass-Spring-Damper Dynamical System
Definition at line 180 of file DynamicalSystem.h.
Rcs::DSMassSpringDamper::DSMassSpringDamper | ( | const Spring & | attractor, |
const std::vector< Spring > & | repellers, | ||
const double | damping, | ||
const double | mass = 1.0 |
||
) |
Constructor
[in] | attractor | attractor spring pulling the mass to the goal poisiton (there is only one) |
[in] | repellers | repeller springs pushing the mass away from points in space |
[in] | damping | of the dynamical system (there is only on) |
[in] | mass | mass of the particle (default: unit mass 1kg) |
Definition at line 279 of file DynamicalSystem.cpp.
|
virtual |
Create a deep copy of this DynamicalSystem.
Implements Rcs::DynamicalSystem.
Reimplemented in Rcs::DSMassSpringDamperNonlinear.
Definition at line 286 of file DynamicalSystem.cpp.
|
virtual |
Get the goal state for this dynamical system.
Implements Rcs::DynamicalSystem.
Definition at line 323 of file DynamicalSystem.cpp.
|
virtual |
Set the goal state for this dynamical system. The goal state is the system's desired equilibrium state. In the presence of repellers, this Systems without an explicit goal state do not need to override this. By default, it does othing.
[in] | x_des | desired state for the system to pursue |
Implements Rcs::DynamicalSystem.
Definition at line 328 of file DynamicalSystem.cpp.
|
virtual |
Advance the dynamical system one step in time. Compute the acceleration x_ddot given the velocity x_dot and the state x, and the time step size dt.
[out] | x_ddot | fill with desired acceleration, is not initialized |
[in] | x_dot | current velocity |
[in] | x | current state |
[in] | dt | time step size for integration |
Implements Rcs::DSSecondOrder.
Reimplemented in Rcs::DSMassSpringDamperNonlinear.
Definition at line 291 of file DynamicalSystem.cpp.
|
protected |
attractor spring pulling the mass to the goal poisiton (there is only one for every dynamical system)
Definition at line 215 of file DynamicalSystem.h.
|
protected |
daming of the dynamical system (there is only one for every dynamical system)
Definition at line 219 of file DynamicalSystem.h.
|
protected |
mass of the particle
Definition at line 221 of file DynamicalSystem.h.
|
protected |
repeller springs pushing the mass away from points in space (e.g. obstacles)
Definition at line 217 of file DynamicalSystem.h.