#include <LearningSpineSine.h>
|
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) |
|
Inherits from BaseSpineCPGControl, and overrides setupCPGs so different muscle groups can have different ImpedanceControl parameters
Definition at line 39 of file LearningSpineSine.h.
LearningSpineSine::LearningSpineSine |
( |
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 LearningSpineSine.cpp.
Attach an observer to the subject of the observer.
- Parameters
-
[in,out] | pObserver | a pointer to an observer for the subject; do nothing if the pointer is NULL |
Call tgObserver<T>::onStep() on all observers in the order in which they were attached.
- Parameters
-
[in] | dt | the number of seconds since the previous call; do nothing if not positive |
Notify the observers when an attach action has occurred. Will only occur once, typically before setup
- Parameters
-
[in,out] | subject | the subject being observed |
Definition at line 55 of file tgObserver.h.
Notify the observers when a step action has occurred.
- Parameters
-
[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 92 of file LearningSpineSine.cpp.
Notify the observers when a teardown action has occurred.
- Parameters
-
[in,out] | subject | the subject being observed |
- Todo:
- consolidate with other controller classes.
- Todo:
- return length scale as a parameter
Reimplemented from BaseSpineCPGControl.
Definition at line 107 of file LearningSpineSine.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 364 of file BaseSpineCPGControl.cpp.
array_2D LearningSpineSine::scalePhaseActions |
( |
std::vector< std::vector< double > > |
actions | ) |
|
|
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 230 of file LearningSpineSine.cpp.
void BaseSpineCPGControl::setupCPGs |
( |
BaseSpineModelLearning & |
subject, |
|
|
array_2D |
nodeActions, |
|
|
array_4D |
edgeActions |
|
) |
| |
|
protectedvirtualinherited |
Handles getting parameters from and returning scores to the evolution object. Needs to persist throughout a simulation
Definition at line 175 of file BaseSpineCPGControl.h.
std::string BaseSpineCPGControl::edgeConfigFilename |
|
protectedinherited |
Hold the filename that gets passed to the respective configuration objects Having two of each of these allows for different groups of parameters to be specified
Definition at line 154 of file BaseSpineCPGControl.h.
The object that holds all of the data for the evolution run in vectors of populations. Needs to persist throughout a simulation
Definition at line 168 of file BaseSpineCPGControl.h.
A file input/output system that uses .ini files. The object converts a string to data in the filename that it has been passed.
Definition at line 161 of file BaseSpineCPGControl.h.
bool BaseSpineCPGControl::nodeLearning |
|
protectedinherited |
A booelan that indicates whether the respective group is learning this run. Is passed to the evolution adapter
Definition at line 181 of file BaseSpineCPGControl.h.
The documentation for this class was generated from the following files: