NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
SerializedSineWaves Class Reference

#include <SerializedSineWaves.h>

Inheritance diagram for SerializedSineWaves:
Collaboration diagram for SerializedSineWaves:

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)
 

Detailed Description

Control the TetraSpineLearningModel with a series of sine waves and local impedance controllers

Definition at line 46 of file SerializedSineWaves.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

Parameters
[in]stringLista 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.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
[in]stringLista 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.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void tgObserver< BaseSpineModelLearning >::onAttach ( BaseSpineModelLearning subject)
inlinevirtualinherited

Notify the observers when an attach action has occurred. Will only occur once, typically before setup

Parameters
[in,out]subjectthe subject being observed

Definition at line 55 of file tgObserver.h.

void SerializedSineWaves::onStep ( BaseSpineModelLearning subject,
double  dt 
)
virtual

Apply the sineWave controller. Called my notifyStep(dt) of its subject. Calls the applyImpedanceControl functions of this class

Parameters
[in]subject- the TetraSpineLearningModel that is being Subject must have a MuscleMap populated
[in]dt,currenttimestep must be positive

Implements tgObserver< BaseSpineModelLearning >.

Definition at line 170 of file SerializedSineWaves.cpp.

Here is the call graph for this function:


The documentation for this class was generated from the following files: