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

#include <EscapeController.h>

Inheritance diagram for EscapeController:
Collaboration diagram for EscapeController:

Public Member Functions

 EscapeController (const double prefLength=5.0, std::string args="_Escape", std::string resourcePath="", std::string config="Config.ini")
 
virtual ~EscapeController ()
 
virtual void onSetup (EscapeModel &subject)
 
virtual void onStep (EscapeModel &subject, double dt)
 
virtual void onTeardown (EscapeModel &subject)
 
virtual void onAttach (EscapeModel &subject)
 

Protected Member Functions

virtual std::vector
< std::vector< double > > 
transformActions (std::vector< std::vector< double > > act)
 
virtual void applyActions (EscapeModel &subject, std::vector< std::vector< double > > act)
 

Detailed Description

Escape Controller for T6

Definition at line 42 of file EscapeController.h.

Constructor & Destructor Documentation

virtual EscapeController::~EscapeController ( )
inlinevirtual

Nothing to delete, destructor must be virtual

Definition at line 52 of file EscapeController.h.

Member Function Documentation

void EscapeController::applyActions ( EscapeModel subject,
std::vector< std::vector< double > >  actions 
)
protectedvirtual

Defines each cluster's sine wave according to actions

Definition at line 182 of file EscapeController.cpp.

Here is the caller graph for this function:

virtual void tgObserver< EscapeModel >::onAttach ( EscapeModel 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 EscapeController::onSetup ( EscapeModel subject)
virtual

Set the lengths of the muscles and initialize the learning adapter

Reimplemented from tgObserver< EscapeModel >.

Definition at line 70 of file EscapeController.cpp.

void EscapeController::onStep ( EscapeModel subject,
double  dt 
)
virtual

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< EscapeModel >.

Definition at line 100 of file EscapeController.cpp.

Here is the call graph for this function:

void EscapeController::onTeardown ( EscapeModel subject)
virtual

Notify the observers when a teardown action has occurred.

Parameters
[in,out]subjectthe subject being observed

Reimplemented from tgObserver< EscapeModel >.

Definition at line 121 of file EscapeController.cpp.

std::vector< std::vector< double > > EscapeController::transformActions ( std::vector< std::vector< double > >  actions)
protectedvirtual

Returns the modified actions 2D vector such that each action value is now scaled to fit the model Invariant: actions[x].size() == 4 for all legal values of x Invariant: Each actions[] contains: amplitude, angularFrequency, phaseChange, dcOffset

Definition at line 142 of file EscapeController.cpp.

Here is the caller graph for this function:


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