NTRT Simulator  v1.1
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
NestedStructureSineWaves Class Reference

#include <NestedStructureSineWaves.h>

Inheritance diagram for NestedStructureSineWaves:
Collaboration diagram for NestedStructureSineWaves:

Public Member Functions

 NestedStructureSineWaves ()
 
 ~NestedStructureSineWaves ()
 
void applyImpedanceControlInside (const std::vector< tgBasicActuator * > stringList, double dt)
 
void applyImpedanceControlOutside (const std::vector< tgBasicActuator * > stringList, double dt, std::size_t phase)
 
virtual void onStep (NestedStructureTestModel &subject, double dt)
 
virtual void onAttach (NestedStructureTestModel &subject)
 
virtual void onSetup (NestedStructureTestModel &subject)
 
virtual void onTeardown (NestedStructureTestModel &subject)
 

Detailed Description

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

Definition at line 45 of file NestedStructureSineWaves.h.

Constructor & Destructor Documentation

NestedStructureSineWaves::NestedStructureSineWaves ( )

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 38 of file NestedStructureSineWaves.cpp.

NestedStructureSineWaves::~NestedStructureSineWaves ( )

Destructor. Frees the tgImpedanceController pointers

Definition at line 58 of file NestedStructureSineWaves.cpp.

Member Function Documentation

void NestedStructureSineWaves::applyImpedanceControlInside ( const std::vector< tgBasicActuator * >  stringList,
double  dt 
)

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.

Definition at line 64 of file NestedStructureSineWaves.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void NestedStructureSineWaves::applyImpedanceControlOutside ( const std::vector< tgBasicActuator * >  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 80 of file NestedStructureSineWaves.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void tgObserver< NestedStructureTestModel >::onAttach ( NestedStructureTestModel 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.

virtual void tgObserver< NestedStructureTestModel >::onSetup ( NestedStructureTestModel subject)
inlinevirtualinherited

Notify the observers when a setup action has occurred.

Parameters
[in,out]subjectthe subject being observed

Definition at line 61 of file tgObserver.h.

void NestedStructureSineWaves::onStep ( NestedStructureTestModel 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 NestedStructureTestModel that is being Subject must have a MuscleMap populated
[in]dt,currenttimestep must be positive

Implements tgObserver< NestedStructureTestModel >.

Definition at line 102 of file NestedStructureSineWaves.cpp.

virtual void tgObserver< NestedStructureTestModel >::onTeardown ( NestedStructureTestModel subject)
inlinevirtualinherited

Notify the observers when a teardown action has occurred.

Parameters
[in,out]subjectthe subject being observed

Definition at line 67 of file tgObserver.h.


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