NTRT Simulator
v1.1
|
#include <OctaCLSine.h>
Public Member Functions | |
OctaCLSine (BaseSpineCPGControl::Config config, std::string args, std::string resourcePath="", std::string ec="edgeConfig.ini", std::string nc="nodeConfig.ini") | |
virtual void | onSetup (BaseSpineModelLearning &subject) |
virtual void | onStep (BaseSpineModelLearning &subject, double dt) |
virtual void | onTeardown (BaseSpineModelLearning &subject) |
const double | getCPGValue (std::size_t i) const |
double | getScore () const |
virtual void | onAttach (BaseSpineModelLearning &subject) |
void | attach (tgObserver< BaseSpineCPGControl > *pObserver) |
void | notifyStep (double dt) |
void | notifySetup () |
void | notifyTeardown () |
Protected Member Functions | |
virtual void | setupWaves (BaseSpineModelLearning &subject, array_2D nodeActions, array_2D edgeActions) |
virtual array_2D | scalePhaseActions (std::vector< std::vector< double > > actions) |
virtual array_2D | scaleNodeActions (std::vector< std::vector< double > > actions) |
virtual array_4D | scaleEdgeActions (std::vector< std::vector< double > > actions) |
virtual void | setupCPGs (BaseSpineModelLearning &subject, array_2D nodeActions, array_4D edgeActions) |
Protected Attributes | |
std::vector < tgSineStringControl * > | m_sineControllers |
CPGEquations * | m_pCPGSys |
std::vector < tgCPGActuatorControl * > | m_allControllers |
BaseSpineCPGControl::Config | m_config |
std::string | edgeConfigFilename |
std::string | nodeConfigFilename |
configuration | nodeConfigData |
configuration | edgeConfigData |
AnnealEvolution | edgeEvolution |
AnnealEvolution | nodeEvolution |
AnnealAdapter | edgeAdapter |
AnnealAdapter | nodeAdapter |
bool | nodeLearning |
bool | edgeLearning |
std::vector< double > | initConditions |
std::size_t | segments |
tgDataObserver | m_dataObserver |
double | m_updateTime |
std::vector< double > | scores |
bool | bogus |
Inherits from BaseSpineCPGControl, and overrides setupCPGs so different muscle groups can have different ImpedanceControl parameters
Definition at line 39 of file OctaCLSine.h.
OctaCLSine::OctaCLSine | ( | BaseSpineCPGControl::Config | config, |
std::string | args, | ||
std::string | resourcePath = "" , |
||
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 52 of file OctaCLSine.cpp.
|
inherited |
Attach an observer to the subject of the observer.
[in,out] | pObserver | a pointer to an observer for the subject; do nothing if the pointer is NULL |
|
inherited |
Call tgObserver<T>::onSetup() on all observers in the order in which they were attached.
|
inherited |
Call tgObserver<T>::onStep() on all observers in the order in which they were attached.
[in] | dt | the number of seconds since the previous call; do nothing if not positive |
|
inherited |
Call tgObserver<T>::onTeardown() on all observers in the order in which they were attached.
|
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.
|
virtual |
Notify the observers when a setup action has occurred.
[in,out] | subject | the subject being observed |
Reimplemented from BaseSpineCPGControl.
Definition at line 62 of file OctaCLSine.cpp.
|
virtual |
Notify the observers when a step action has occurred.
[in,out] | subject | the subject being observed |
[in] | the | number of seconds since the previous call; must be positive |
Basically nothing to do. Sine controllers will take care of themselves
Reimplemented from BaseSpineCPGControl.
Definition at line 94 of file OctaCLSine.cpp.
|
virtual |
Notify the observers when a teardown action has occurred.
[in,out] | subject | the subject being observed |
Reimplemented from BaseSpineCPGControl.
Definition at line 119 of file OctaCLSine.cpp.
|
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 364 of file BaseSpineCPGControl.cpp.
|
protectedvirtual |
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 219 of file OctaCLSine.cpp.
|
protectedvirtualinherited |
Reimplemented in KinematicSpineCPGControl, LearningSpineJSON, and TetraSpineCPGControl.
Definition at line 210 of file BaseSpineCPGControl.cpp.