|
DMP_BBO library
|
Implementation of Dynamical Movement Primitives. More...
#include <Dmp.hpp>


Public Types | |
| enum | DmpType { IJSPEERT_2002_MOVEMENT, KULVICIUS_2012_JOINING, COUNTDOWN_2013 } |
| Different types of DMPs that can be initialized. More... | |
| enum | ForcingTermScaling { NO_SCALING, G_MINUS_Y0_SCALING, AMPLITUDE_SCALING } |
| Different ways to scale the forcing term. More... | |
Public Types inherited from DynamicalSystem | |
| enum | IntegrationMethod { EULER, RUNGE_KUTTA } |
| The possible integration methods that can be used. More... | |
Public Member Functions | |
| Dmp (double tau, Eigen::VectorXd y_init, Eigen::VectorXd y_attr, std::vector< FunctionApproximator * > function_approximators, double alpha_spring_damper, DynamicalSystem *goal_system, DynamicalSystem *phase_system, DynamicalSystem *gating_system, ForcingTermScaling scaling=NO_SCALING) | |
| Initialization constructor. More... | |
| Dmp (int n_dims_dmp, std::vector< FunctionApproximator * > function_approximators, double alpha_spring_damper, DynamicalSystem *goal_system, DynamicalSystem *phase_system, DynamicalSystem *gating_system, ForcingTermScaling scaling=NO_SCALING) | |
| Initialization constructor for Dmps of known dimensionality, but with unknown initial and attractor states. More... | |
| Dmp (double tau, Eigen::VectorXd y_init, Eigen::VectorXd y_attr, std::vector< FunctionApproximator * > function_approximators, DmpType dmp_type=KULVICIUS_2012_JOINING, ForcingTermScaling scaling=NO_SCALING) | |
| Constructor that initializes the DMP with default dynamical systems. More... | |
| Dmp (int n_dims_dmp, std::vector< FunctionApproximator * > function_approximators, DmpType dmp_type=KULVICIUS_2012_JOINING, ForcingTermScaling scaling=NO_SCALING) | |
| Initialization constructor for Dmps of known dimensionality, but with unknown initial and attractor states. More... | |
| Dmp (double tau, Eigen::VectorXd y_init, Eigen::VectorXd y_attr, double alpha_spring_damper, DynamicalSystem *goal_system) | |
| Initialization constructor for Dmps without a forcing term. More... | |
| ~Dmp (void) | |
| Destructor. More... | |
| Dmp * | clone (void) const |
| Return a deep copy of this object. More... | |
| virtual void | integrateStart (Eigen::Ref< Eigen::VectorXd > x, Eigen::Ref< Eigen::VectorXd > xd) const |
| Start integrating the system. More... | |
| void | differentialEquation (const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::Ref< Eigen::VectorXd > xd) const |
| The differential equation which defines the system. More... | |
| void | analyticalSolution (const Eigen::VectorXd &ts, Eigen::MatrixXd &xs, Eigen::MatrixXd &xds, Eigen::MatrixXd &forcing_terms, Eigen::MatrixXd &fa_output) const |
| Return analytical solution of the system at certain times (and return forcing terms) More... | |
| void | analyticalSolution (const Eigen::VectorXd &ts, Eigen::MatrixXd &xs, Eigen::MatrixXd &xds, Eigen::MatrixXd &forcing_terms) const |
| Return analytical solution of the system at certain times (and return forcing terms) More... | |
| void | analyticalSolution (const Eigen::VectorXd &ts, Eigen::MatrixXd &xs, Eigen::MatrixXd &xds) const |
| Return analytical solution of the system at certain times. More... | |
| virtual void | analyticalSolution (const Eigen::VectorXd &ts, Trajectory &trajectory) const |
| Return analytical solution of the system at certain times. More... | |
| void | analyticalSolution (const Eigen::VectorXd &ts, Trajectory &trajectory, Eigen::MatrixXd &forcing_terms) const |
| Return analytical solution of the system at certain times. More... | |
| virtual void | statesAsTrajectory (const Eigen::MatrixXd &x_in, const Eigen::MatrixXd &xd_in, Eigen::MatrixXd &y_out, Eigen::MatrixXd &yd_out, Eigen::MatrixXd &ydd_out) const |
| Get the output of a DMP dynamical system as a trajectory. More... | |
| virtual void | statesAsTrajectory (const Eigen::VectorXd &ts, const Eigen::MatrixXd &x_in, const Eigen::MatrixXd &xd_in, Trajectory &trajectory) const |
| Get the output of a DMP dynamical system as a trajectory. More... | |
| virtual void | train (const Trajectory &trajectory) |
| Train a DMP with a trajectory. More... | |
| virtual void | train (const Trajectory &trajectory, std::string save_directory, bool overwrite=false) |
| Train a DMP with a trajectory, and write results to file. More... | |
| virtual void | set_tau (double tau) |
| Accessor function for the time constant. More... | |
| virtual void | set_initial_state (const Eigen::VectorXd &y_init) |
| Accessor function for the initial state of the system. More... | |
| virtual void | set_attractor_state (const Eigen::VectorXd &y_attr) |
| Accessor function for the attractor state of the system. More... | |
| void | set_damping_coefficient (double damping_coefficient) |
| Accessor function for damping coefficient of spring-damper system. More... | |
| void | set_spring_constant (double spring_constant) |
| Accessor function for spring constant of spring-damper system. More... | |
| std::string | toString (void) const |
| Returns a string representation of the object. More... | |
| void | getSelectableParameters (std::set< std::string > &selectable_values_labels) const |
| Return all the names of the parameter types that can be selected. More... | |
| void | setSelectedParameters (const std::set< std::string > &selected_values_labels) |
| Determine which subset of parameters is represented in the vector returned by Parameterizable::getParameterVectorSelected. More... | |
| int | getParameterVectorAllSize (void) const |
| Get the size of the parameter values vector when it contains all available parameter values. More... | |
| void | getParameterVectorAll (Eigen::VectorXd &values) const |
| Return a vector that returns all available parameter values. More... | |
| void | setParameterVectorAll (const Eigen::VectorXd &values) |
| Set all available parameter values with one vector. More... | |
| void | getParameterVectorMask (const std::set< std::string > selected_values_labels, Eigen::VectorXi &selected_mask) const |
| Get a mask for selecting parameters. More... | |
| void | computeFunctionApproximatorInputsAndTargets (const Trajectory &trajectory, Eigen::VectorXd &fa_inputs_phase, Eigen::MatrixXd &fa_targets) const |
| Given a trajectory, compute the inputs and targets for the function approximators. More... | |
| virtual void | computeFunctionApproximatorOutput (const Eigen::Ref< const Eigen::MatrixXd > &phase_state, Eigen::MatrixXd &fa_output) const |
| Compute the outputs of the function approximators. More... | |
| void | set_perturbation_analytical_solution (double perturbation_standard_deviation) |
| Add a perturbation to the forcing term when computing the analytical solution. More... | |
| double | get_perturbation_analytical_solution () const |
| Get the perturbation to the forcing term when computing the analytical solution. More... | |
Public Member Functions inherited from DynamicalSystem | |
| DynamicalSystem (int order, double tau, Eigen::VectorXd initial_state, Eigen::VectorXd attractor_state, std::string name) | |
| Initialization constructor. More... | |
| virtual | ~DynamicalSystem (void) |
| Destructor. | |
| void | integrateStart (const Eigen::VectorXd &x_init, Eigen::Ref< Eigen::VectorXd > x, Eigen::Ref< Eigen::VectorXd > xd) |
| Start integrating the system with a new initial state. More... | |
| virtual void | integrateStep (double dt, const Eigen::Ref< const Eigen::VectorXd > x, Eigen::Ref< Eigen::VectorXd > x_updated, Eigen::Ref< Eigen::VectorXd > xd_updated) const |
| Integrate the system one time step. More... | |
| void | set_integration_method (IntegrationMethod integration_method) |
| Choose the integration method. More... | |
| int | dim (void) const |
| Get the dimensionality of the dynamical system, i.e. More... | |
| int | dim_orig (void) const |
| Get the dimensionality of the dynamical system, i.e. More... | |
| double | tau (void) const |
| Accessor function for the time constant. More... | |
| Eigen::VectorXd | initial_state (void) const |
| Accessor function for the initial state of the dynamical system. More... | |
| void | initial_state (Eigen::VectorXd &initial_state) const |
| Accessor function for the initial state of the dynamical system. More... | |
| Eigen::VectorXd | attractor_state (void) const |
| Accessor function for the attractor state of the dynamical system. More... | |
| void | attractor_state (Eigen::VectorXd &attractor_state) const |
| Accessor function for the attractor state of the dynamical system. More... | |
| virtual void | set_attractor_state (const Eigen::Ref< const Eigen::VectorXd > &attractor_state) |
| Mutator function for the attractor state of the dynamical system. More... | |
| std::string | name (void) const |
| Accessor function for the name of the dynamical system. More... | |
| virtual void | set_name (std::string name) |
| Mutator function for the name of the dynamical system. More... | |
Public Member Functions inherited from Parameterizable | |
| virtual | ~Parameterizable (void) |
| Destructor. | |
| virtual int | getParameterVectorSelectedSize (void) const |
| Get the size of the vector of selected parameters, as returned by getParameterVectorSelected(. More... | |
| virtual void | getParameterVectorSelected (Eigen::VectorXd &values, bool normalized=false) const |
| Get the values of the selected parameters in one vector. More... | |
| virtual void | getParameterVectorSelectedNormalized (Eigen::VectorXd &values) const |
| Get the normalized values of the selected parameters in one vector. More... | |
| void | getParameterVectorSelectedMinMax (Eigen::VectorXd &min, Eigen::VectorXd &max) const |
| Get the minimum and maximum of the selected parameters in one vector. More... | |
| void | getParameterVectorAllMinMax (Eigen::VectorXd &min, Eigen::VectorXd &max) const |
| Get the minimum and maximum values of the current parameter vector. More... | |
| void | getParameterVectorSelectedRanges (Eigen::VectorXd &ranges) const |
| Get the ranges of the selected parameters, i.e. More... | |
| virtual void | setParameterVectorSelected (const Eigen::VectorXd &values, bool normalized=false) |
| Set all the values of the selected parameters with one vector. More... | |
| virtual void | setParameterVectorSelectedNormalized (const Eigen::VectorXd &values) |
| Set all the values of the selected parameters with one vector of normalized values. More... | |
| void | setSelectedParametersOne (std::string selected) |
| Set the parameters that are currently selected. More... | |
| void | setParameterVectorModifier (std::string modifier, bool new_value) |
| Turn certain modifiers on or off. More... | |
| void | setVectorLengthsPerDimension (const Eigen::VectorXi &lengths_per_dimension) |
| The vector (VectorXd) with parameter values can be split into different parts (as vector<VectorXd>; this function specifices the length of each sub-vector. More... | |
| Eigen::VectorXi | getVectorLengthsPerDimension (void) const |
| Get the specified length of each vector in each dimension. More... | |
| void | getParameterVectorSelected (std::vector< Eigen::VectorXd > &values, bool normalized=false) const |
| Get the values of the selected parameters in one vector. More... | |
| void | setParameterVectorSelected (const std::vector< Eigen::VectorXd > &values, bool normalized=false) |
| Set all the values of the selected parameters with a vector of vectors. More... | |
Protected Member Functions | |
| FunctionApproximator * | function_approximator (int i_dim) const |
| Get a pointer to the function approximator for a certain dimension. More... | |
Protected Member Functions inherited from DynamicalSystem | |
| DynamicalSystem (void) | |
| Default constructor. More... | |
| void | set_dim (int dim) |
| Set the dimensionality of the dynamical system, i.e. More... | |
Friends | |
| class | boost::serialization::access |
| Give boost serialization access to private members. More... | |
| enum DmpType |
| enum ForcingTermScaling |
| Dmp | ( | double | tau, |
| Eigen::VectorXd | y_init, | ||
| Eigen::VectorXd | y_attr, | ||
| std::vector< FunctionApproximator * > | function_approximators, | ||
| double | alpha_spring_damper, | ||
| DynamicalSystem * | goal_system, | ||
| DynamicalSystem * | phase_system, | ||
| DynamicalSystem * | gating_system, | ||
| ForcingTermScaling | scaling = NO_SCALING |
||
| ) |
Initialization constructor.
| tau | Time constant |
| y_init | Initial state |
| y_attr | Attractor state |
| alpha_spring_damper | in the spring-damper system of the dmp |
| goal_system | Dynamical system to compute delayed goal |
| phase_system | Dynamical system to compute the phase |
| gating_system | Dynamical system to compute the gating term |
| function_approximators | Function approximators for the forcing term |
| scaling | Which method to use for scaling the forcing term (see Dmp::ForcingTermScaling) |
Definition at line 85 of file Dmp.cpp.
| Dmp | ( | int | n_dims_dmp, |
| std::vector< FunctionApproximator * > | function_approximators, | ||
| double | alpha_spring_damper, | ||
| DynamicalSystem * | goal_system, | ||
| DynamicalSystem * | phase_system, | ||
| DynamicalSystem * | gating_system, | ||
| ForcingTermScaling | scaling = NO_SCALING |
||
| ) |
Initialization constructor for Dmps of known dimensionality, but with unknown initial and attractor states.
| n_dims_dmp | Dimensionality of the DMP |
| alpha_spring_damper | in the spring-damper system of the dmp |
| goal_system | Dynamical system to compute delayed goal |
| phase_system | Dynamical system to compute the phase |
| gating_system | Dynamical system to compute the gating term |
| function_approximators | Function approximators for the forcing term |
| scaling | Which method to use for scaling the forcing term (see Dmp::ForcingTermScaling) |
Definition at line 102 of file Dmp.cpp.
| Dmp | ( | double | tau, |
| Eigen::VectorXd | y_init, | ||
| Eigen::VectorXd | y_attr, | ||
| std::vector< FunctionApproximator * > | function_approximators, | ||
| DmpType | dmp_type = KULVICIUS_2012_JOINING, |
||
| ForcingTermScaling | scaling = NO_SCALING |
||
| ) |
Constructor that initializes the DMP with default dynamical systems.
| tau | Time constant |
| y_init | Initial state |
| y_attr | Attractor state |
| function_approximators | Function approximators for the forcing term |
| dmp_type | The type of DMP, see Dmp::DmpType |
| scaling | Which method to use for scaling the forcing term (see Dmp::ForcingTermScaling) |
Definition at line 115 of file Dmp.cpp.
| Dmp | ( | int | n_dims_dmp, |
| std::vector< FunctionApproximator * > | function_approximators, | ||
| DmpType | dmp_type = KULVICIUS_2012_JOINING, |
||
| ForcingTermScaling | scaling = NO_SCALING |
||
| ) |
Initialization constructor for Dmps of known dimensionality, but with unknown initial and attractor states.
Initializes the DMP with default dynamical systems.
| n_dims_dmp | Dimensionality of the DMP |
| function_approximators | Function approximators for the forcing term |
| dmp_type | The type of DMP, see Dmp::DmpType |
| scaling | Which method to use for scaling the forcing term (see Dmp::ForcingTermScaling) |
Definition at line 126 of file Dmp.cpp.
| Dmp | ( | double | tau, |
| Eigen::VectorXd | y_init, | ||
| Eigen::VectorXd | y_attr, | ||
| double | alpha_spring_damper, | ||
| DynamicalSystem * | goal_system | ||
| ) |
Initialization constructor for Dmps without a forcing term.
| tau | Time constant |
| y_init | Initial state |
| y_attr | Attractor state |
| alpha_spring_damper | in the spring-damper system of the dmp |
| goal_system | Dynamical system to compute delayed goal |
Definition at line 136 of file Dmp.cpp.

| ~Dmp | ( | void | ) |
|
virtual |
Return a deep copy of this object.
Implements DynamicalSystem.
Reimplemented in DmpWithGainSchedules.
Definition at line 252 of file Dmp.cpp.

|
virtual |
Start integrating the system.
| [out] | x | - The first vector of state variables |
| [out] | xd | - The first vector of rates of change of the state variables |
Reimplemented from DynamicalSystem.
Definition at line 263 of file Dmp.cpp.

|
virtual |
The differential equation which defines the system.
It relates state values to rates of change of those state values
| [in] | x | current state (column vector of size dim() X 1) |
| [out] | xd | rate of change in state (column vector of size dim() X 1) |
Implements DynamicalSystem.
Definition at line 344 of file Dmp.cpp.

| void analyticalSolution | ( | const Eigen::VectorXd & | ts, |
| Eigen::MatrixXd & | xs, | ||
| Eigen::MatrixXd & | xds, | ||
| Eigen::MatrixXd & | forcing_terms, | ||
| Eigen::MatrixXd & | fa_output | ||
| ) | const |
Return analytical solution of the system at certain times (and return forcing terms)
| [in] | ts | A vector of times for which to compute the analytical solutions |
| [out] | xs | Sequence of state vectors. T x D or D x T matrix, where T is the number of times (the length of 'ts'), and D the size of the state (i.e. dim()) |
| [out] | xds | Sequence of state vectors (rates of change). T x D or D x T matrix, where T is the number of times (the length of 'ts'), and D the size of the state (i.e. dim()) |
| [out] | forcing_terms | The forcing terms for each dimension, for debugging purposes only. |
| [out] | fa_output | The output of the function approximators, for debugging purposes only. |
Definition at line 449 of file Dmp.cpp.

|
inline |
Return analytical solution of the system at certain times (and return forcing terms)
| [in] | ts | A vector of times for which to compute the analytical solutions |
| [out] | xs | Sequence of state vectors. T x D or D x T matrix, where T is the number of times (the length of 'ts'), and D the size of the state (i.e. dim()) |
| [out] | xds | Sequence of state vectors (rates of change). T x D or D x T matrix, where T is the number of times (the length of 'ts'), and D the size of the state (i.e. dim()) |
| [out] | forcing_terms | The forcing terms for each dimension, for debugging purposes only. |
Definition at line 174 of file Dmp.hpp.

|
inlinevirtual |
Return analytical solution of the system at certain times.
| [in] | ts | A vector of times for which to compute the analytical solutions |
| [out] | xs | Sequence of state vectors. T x D or D x T matrix, where T is the number of times (the length of 'ts'), and D the size of the state (i.e. dim()) |
| [out] | xds | Sequence of state vectors (rates of change). T x D or D x T matrix, where T is the number of times (the length of 'ts'), and D the size of the state (i.e. dim()) |
Implements DynamicalSystem.
Definition at line 180 of file Dmp.hpp.

|
inlinevirtual |
Return analytical solution of the system at certain times.
| [in] | ts | A vector of times for which to compute the analytical solutions |
| [out] | trajectory | The computed states as a trajectory. |
Reimplemented in DmpWithGainSchedules.
Definition at line 192 of file Dmp.hpp.

|
inline |
Return analytical solution of the system at certain times.
| [in] | ts | A vector of times for which to compute the analytical solutions |
| [out] | trajectory | The computed states as a trajectory. |
| [out] | forcing_terms | The forcing terms |
Definition at line 206 of file Dmp.hpp.

|
virtual |
Get the output of a DMP dynamical system as a trajectory.
As a dynamical system, the state vector of a DMP contains the output of the goal, spring, phase and gating system. What we are most interested in is the output of the spring system. This function extracts that information, and also computes the accelerations of the spring system, which are only stored implicitely in xd_in because second order systems are converted to first order systems with expanded state.
| [in] | x_in | State vector over time (size n_time_steps X dim()) |
| [in] | xd_in | State vector over time (rates of change) |
| [out] | y_out | State vector over time (size n_time_steps X dim_orig()) |
| [out] | yd_out | State vector over time (rates of change) |
| [out] | ydd_out | State vector over time (rates of change of rates of change) |
Definition at line 410 of file Dmp.cpp.

|
virtual |
Get the output of a DMP dynamical system as a trajectory.
As a dynamical system, the state vector of a DMP contains the output of the goal, spring, phase and gating system. What we are most interested in is the output of the spring system. This function extracts that information, and also computes the accelerations of the spring system, which are only stored implicitely in xd_in because second order systems are converted to first order systems with expanded state.
| [in] | ts | A vector of times |
| [in] | x_in | State vector over time |
| [in] | xd_in | State vector over time (rates of change) |
| [out] | trajectory | Trajectory representation of the DMP state vector output. |
Definition at line 425 of file Dmp.cpp.

|
virtual |
Train a DMP with a trajectory.
| [in] | trajectory | The trajectory with which to train the DMP. |
Reimplemented in DmpWithGainSchedules.
Definition at line 643 of file Dmp.cpp.
|
virtual |
Train a DMP with a trajectory, and write results to file.
| [in] | trajectory | The trajectory with which to train the DMP. |
| [in] | save_directory | The directory to which to save the results. |
| [in] | overwrite | Overwrite existing files in the directory above (default: false) |
Reimplemented in DmpWithGainSchedules.
Definition at line 648 of file Dmp.cpp.

|
virtual |
Accessor function for the time constant.
| [in] | tau | Time constant We need to override DynamicalSystem::set_tau, because the DMP must also change the time constant of all of its subsystems. |
Reimplemented from DynamicalSystem.
Definition at line 853 of file Dmp.cpp.

|
virtual |
Accessor function for the initial state of the system.
| [in] | y_init | Initial state of the system. We need to override DynamicalSystem::set_initial_state, because the DMP must also change the initial state of the goal system as well. |
Reimplemented from DynamicalSystem.
Definition at line 864 of file Dmp.cpp.

|
virtual |
Accessor function for the attractor state of the system.
| [in] | y_attr | Attractor state of the system. |
Definition at line 873 of file Dmp.cpp.

| void set_damping_coefficient | ( | double | damping_coefficient | ) |
Accessor function for damping coefficient of spring-damper system.
| [in] | damping_coefficient | Damping coefficient |
Definition at line 215 of file Dmp.cpp.

| void set_spring_constant | ( | double | spring_constant | ) |
Accessor function for spring constant of spring-damper system.
| [in] | spring_constant | Spring constant |
Definition at line 219 of file Dmp.cpp.

|
virtual |
Returns a string representation of the object.
Implements DynamicalSystem.
Definition at line 893 of file Dmp.cpp.
|
virtual |
Return all the names of the parameter types that can be selected.
| [out] | selected_values_labels | Names of the parameter types that can be selected |
Implements Parameterizable.
Definition at line 708 of file Dmp.cpp.

|
virtual |
Determine which subset of parameters is represented in the vector returned by Parameterizable::getParameterVectorSelected.
Different function approximators have different types of model parameters. For instance, LWR has the centers and widths of basis functions, along with the slopes of each line segment. Parameterizable::setSelectedParameters provides a means to determine which parameters should be returned by Parameterizable::getParameterVectorSelected, i.e. by calling: std::set<std::string> selected; selected.insert("slopes"); model_parameters.setSelectedParameters(selected)
| [in] | selected_values_labels | The names of the parameters that are selected |
Reimplemented from Parameterizable.
Definition at line 731 of file Dmp.cpp.

|
virtual |
Get the size of the parameter values vector when it contains all available parameter values.
For instance, if the parameters consists of centers, widths and slopes the parameter values vector will be something like
centers widths slopes [ 100 110 120 10 10 10 0.4 0.7 0.4 ]
then getParameterVectorAllSize() will return 9
Implements Parameterizable.
Definition at line 801 of file Dmp.cpp.

|
virtual |
Return a vector that returns all available parameter values.
| [out] | values | All available parameter values in one vector. |
Implements Parameterizable.
Definition at line 813 of file Dmp.cpp.

|
virtual |
Set all available parameter values with one vector.
| [in] | values | All available parameter values in one vector. |
Implements Parameterizable.
Definition at line 830 of file Dmp.cpp.

|
virtual |
Get a mask for selecting parameters.
| [in] | selected_values_labels | Labels of the selected parameter values |
| [out] | selected_mask | A mask indicating indices of selected parameters. 0 indicates not selected, >0 indicates selected. |
For instance, if the parameters consists of centers, widths and slopes the parameter values vector will be something like
centers widths slopes [ 100 110 120 10 10 10 0.4 0.7 0.4 ]
In this case, if selected_values_labels contains "centers" and "slopes", the mask will be:
centers widths slopes [ 1 1 1 0 0 0 3 3 3 ]
The '0' indicates that these parameters are not selected. The other ones have different numbers so that they may be discerned from one another (as required in Parameterizable::getParameterVectorSelectedMinMax for instance.
Implements Parameterizable.
Definition at line 757 of file Dmp.cpp.

| void computeFunctionApproximatorInputsAndTargets | ( | const Trajectory & | trajectory, |
| Eigen::VectorXd & | fa_inputs_phase, | ||
| Eigen::MatrixXd & | fa_targets | ||
| ) | const |
Given a trajectory, compute the inputs and targets for the function approximators.
For a standard Dmp (such as the one in this class) the inputs will be the phase over time, and the targets will be the forcing term (with the gating function factored out).
| [in] | trajectory | Trajectory, e.g. a demonstration. |
| [out] | fa_inputs_phase | The inputs for the function approximators (phase signal) |
| [out] | fa_targets | The targets for the function approximators (forcing term) |
Definition at line 583 of file Dmp.cpp.

|
virtual |
Compute the outputs of the function approximators.
| [in] | phase_state | The phase states for which the outputs are computed. |
| [out] | fa_output | The outputs of the function approximators. |
Reimplemented in DmpContextual, DmpContextualTwoStep, and DmpContextualOneStep.
Definition at line 313 of file Dmp.cpp.

| void set_perturbation_analytical_solution | ( | double | perturbation_standard_deviation | ) |
Add a perturbation to the forcing term when computing the analytical solution.
This is only relevant for off-line experiments, i.e. not on a robot, for testing how the system responds to perturbations. Does not affect the output of Dmp::differentialEquation(), only of Dmp::analyticalSolution().
| [in] | perturbation_standard_deviation | Standard deviation of the normal distribution from which perturbations will be sampled. |
|
inline |
|
inlineprotected |
Get a pointer to the function approximator for a certain dimension.
| [in] | i_dim | Dimension for which to get the function approximator |
|
friend |
1.8.11