NTRT Simulator
 All Classes Files Functions Variables Typedefs Friends Pages
TetraSpineCPGControl Class Reference

#include <TetraSpineCPGControl.h>

Inheritance diagram for TetraSpineCPGControl:
Collaboration diagram for TetraSpineCPGControl:

Public Member Functions

 TetraSpineCPGControl (BaseSpineCPGControl::Config config, std::string args, std::string ec="edgeConfig.ini", std::string nc="nodeConfig.ini")
 
virtual void setupCPGs (BaseSpineModelLearning &subject, array_2D nodeActions, array_4D edgeActions)
 
virtual void onStep (BaseSpineModelLearning &subject, double dt)
 
virtual void onSetup (BaseSpineModelLearning &subject)
 
virtual void onTeardown (BaseSpineModelLearning &subject)
 
virtual void onAttach (BaseSpineModelLearning &subject)
 

Protected Member Functions

virtual array_4D scaleEdgeActions (std::vector< std::vector< double > > actions)
 
virtual array_2D scaleNodeActions (std::vector< std::vector< double > > actions)
 

Protected Attributes

CPGEquationsm_pCPGSys
 
std::vector< tgCPGStringControl * > m_allControllers
 

Detailed Description

Inherits from BaseSpineCPGControl, and overrides setupCPGs so different muscle groups can have different ImpedanceControl parameters

Definition at line 37 of file TetraSpineCPGControl.h.

Constructor & Destructor Documentation

TetraSpineCPGControl::TetraSpineCPGControl ( BaseSpineCPGControl::Config  config,
std::string  args,
std::string  ec = "edgeConfig.ini",
std::string  nc = "nodeConfig.ini" 
)

Defining the adapters here assumes the controller is around and attached for the lifecycle of the learning runs. I.E. that the setup and teardown functions are used for tgModel

Definition at line 49 of file TetraSpineCPGControl.cpp.

Member Function Documentation

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 54 of file tgObserver.h.

void BaseSpineCPGControl::onSetup ( BaseSpineModelLearning subject)
virtualinherited

Notify the observers when a setup action has occurred.

Parameters
[in,out]subjectthe subject being observed

Reimplemented from tgObserver< BaseSpineModelLearning >.

Definition at line 148 of file BaseSpineCPGControl.cpp.

void BaseSpineCPGControl::onStep ( BaseSpineModelLearning subject,
double  dt 
)
virtualinherited

Notify the observers when a step action has occurred.

Parameters
[in,out]subjectthe subject being observed
[in]thenumber of seconds since the previous call; must be positive

Implements tgObserver< BaseSpineModelLearning >.

Definition at line 223 of file BaseSpineCPGControl.cpp.

Here is the call graph for this function:

void BaseSpineCPGControl::onTeardown ( BaseSpineModelLearning subject)
virtualinherited

Notify the observers when a teardown action has occurred.

Parameters
[in,out]subjectthe subject being observed
Todo:
  • consolidate with other controller classes.
Todo:
  • return length scale as a parameter

Reimplemented from tgObserver< BaseSpineModelLearning >.

Definition at line 241 of file BaseSpineCPGControl.cpp.

array_4D BaseSpineCPGControl::scaleEdgeActions ( std::vector< std::vector< double > >  actions)
protectedvirtualinherited

Takes a vector of parameters reported by learning, and then converts it into a format used to assign to the CPGEdges Note that if the CPG edges change, this will need to change

Definition at line 297 of file BaseSpineCPGControl.cpp.

Here is the caller graph for this function:

void TetraSpineCPGControl::setupCPGs ( BaseSpineModelLearning subject,
array_2D  nodeActions,
array_4D  edgeActions 
)
virtual
Todo:
: redo with for_each

Reimplemented from BaseSpineCPGControl.

Definition at line 57 of file TetraSpineCPGControl.cpp.

Here is the call graph for this function:


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