|
NTRT Simulator
v1.1
|
#include <SerializedSineWaves.h>


Classes | |
| struct | Config |
Public Member Functions | |
| SerializedSineWaves (std::string fileName) | |
| ~SerializedSineWaves () | |
| void | applyImpedanceControlInside (const std::vector< tgSpringCableActuator * > stringList, double dt, std::size_t phase) |
| void | applyImpedanceControlOutside (const std::vector< tgSpringCableActuator * > stringList, double dt, std::size_t phase) |
| virtual void | onStep (BaseSpineModelLearning &subject, double dt) |
| virtual void | onAttach (BaseSpineModelLearning &subject) |
| virtual void | onSetup (BaseSpineModelLearning &subject) |
| virtual void | onTeardown (BaseSpineModelLearning &subject) |
Control the TetraSpineLearningModel with a series of sine waves and local impedance controllers
Definition at line 46 of file SerializedSineWaves.h.
| SerializedSineWaves::SerializedSineWaves | ( | std::string | fileName | ) |
Construct the controller. Typically occurs in the main function. The controller will need to be attached to a subject (model) Parameters are currently set in the initalizer lists.
Definition at line 104 of file SerializedSineWaves.cpp.
| SerializedSineWaves::~SerializedSineWaves | ( | ) |
Destructor. Frees the tgImpedanceController pointers
Definition at line 115 of file SerializedSineWaves.cpp.
| void SerializedSineWaves::applyImpedanceControlInside | ( | const std::vector< tgSpringCableActuator * > | stringList, |
| double | dt, | ||
| std::size_t | phase | ||
| ) |
Applies the impedance controllers using a velocity setpoint of 0. Called during this classes onStep function.
| [in] | stringList | a std::vector of strings taken from the subject's MuscleMap |
| [in] | dt | - a timestep. Must be positive. |
| [in] | phase | - reads the index out of the phaseOffsets vector |
Definition at line 119 of file SerializedSineWaves.cpp.


| void SerializedSineWaves::applyImpedanceControlOutside | ( | const std::vector< tgSpringCableActuator * > | stringList, |
| double | dt, | ||
| std::size_t | phase | ||
| ) |
Applies the impedance controllers using a velocity setpoint determined. by the phase parameter and Called during this classes onStep function.
| [in] | stringList | a std::vector of strings taken from the subject's MuscleMap |
| [in] | dt | - a timestep. Must be positive. |
| [in] | phase | - reads the index out of the phaseOffsets vector |
Definition at line 145 of file SerializedSineWaves.cpp.


|
inlinevirtualinherited |
Notify the observers when an attach action has occurred. Will only occur once, typically before setup
| [in,out] | subject | the subject being observed |
Definition at line 55 of file tgObserver.h.
|
inlinevirtualinherited |
Notify the observers when a setup action has occurred.
| [in,out] | subject | the subject being observed |
Reimplemented in SerializedSpineControl, BaseSpineCPGControl, SpineFeedbackControl, OctaCLSine, LearningSpineSine, colSpineSine, and htSpineSine.
Definition at line 61 of file tgObserver.h.
|
virtual |
Apply the sineWave controller. Called my notifyStep(dt) of its subject. Calls the applyImpedanceControl functions of this class
| [in] | subject | - the TetraSpineLearningModel that is being Subject must have a MuscleMap populated |
| [in] | dt,current | timestep must be positive |
Implements tgObserver< BaseSpineModelLearning >.
Definition at line 170 of file SerializedSineWaves.cpp.

|
inlinevirtualinherited |
Notify the observers when a teardown action has occurred.
| [in,out] | subject | the subject being observed |
Reimplemented in BaseSpineCPGControl, SpineFeedbackControl, OctaCLSine, LearningSpineSine, colSpineSine, and htSpineSine.
Definition at line 67 of file tgObserver.h.