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

#include <SuperBallLearningController.h>

Inheritance diagram for SuperBallPrefLengthController:
Collaboration diagram for SuperBallPrefLengthController:

Public Member Functions

 SuperBallPrefLengthController (const double prefLength=5)
 
virtual ~SuperBallPrefLengthController ()
 
virtual void onSetup (SuperBallModel &subject)
 
virtual void onStep (SuperBallModel &subject, double dt)
 
virtual void onTeardown (SuperBallModel &subject)
 
 SuperBallPrefLengthController (const double prefLength=5)
 
virtual ~SuperBallPrefLengthController ()
 
virtual void onSetup (T12SuperBallPayload &subject)
 
virtual void onStep (T12SuperBallPayload &subject, double dt)
 
virtual void onAttach (T12SuperBallPayload &subject)
 
virtual void onTeardown (T12SuperBallPayload &subject)
 
virtual void onAttach (SuperBallModel &subject)
 

Protected Member Functions

vector< vector< double > > receiveActionsFromEvolution ()
 
virtual vector< vector< double > > transformActions (vector< vector< double > > act)
 
virtual void applyActions (SuperBallModel &subject, vector< vector< double > > act, vector< double > state)
 
double calculateDistanceMoved ()
 
virtual vector< vector< double > > transformActions (vector< vector< double > > act)
 
virtual void applyActions (T12SuperBallPayload &subject, vector< vector< double > > act)
 

Detailed Description

Preferred Length Controller for T6. This controllers sets a preferred rest length for the muscles. Constant speed motors are used in muscles to move the rest length to the preffered length over time. The assumption here is that motors are constant speed independent of the tension of the muscles. motorspeed and movemotors are defined at the tgBasicActuator class.

Definition at line 48 of file SuperBallLearningController.h.

Constructor & Destructor Documentation

SuperBallPrefLengthController::SuperBallPrefLengthController ( const double  prefLength = 5)

Construct a T6PrefLengthController with the initial preferred length.

Definition at line 41 of file SuperBallLearningController.cpp.

virtual SuperBallPrefLengthController::~SuperBallPrefLengthController ( )
inlinevirtual

Nothing to delete, destructor must be virtual

Definition at line 63 of file SuperBallLearningController.h.

SuperBallPrefLengthController::SuperBallPrefLengthController ( const double  prefLength = 5)

Construct a T6PrefLengthController with the initial preferred length.

virtual SuperBallPrefLengthController::~SuperBallPrefLengthController ( )
inlinevirtual

Nothing to delete, destructor must be virtual

Definition at line 62 of file T12SuperBallPayloadController.h.

Member Function Documentation

virtual void tgObserver< T12SuperBallPayload >::onAttach ( T12SuperBallPayload 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< SuperBallModel >::onAttach ( SuperBallModel 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 SuperBallPrefLengthController::onSetup ( T12SuperBallPayload subject)
virtual

Notify the observers when a setup action has occurred.

Parameters
[in,out]subjectthe subject being observed

Reimplemented from tgObserver< T12SuperBallPayload >.

Definition at line 48 of file T12SuperBallPayloadController.cpp.

Here is the call graph for this function:

void SuperBallPrefLengthController::onSetup ( SuperBallModel subject)
virtual

Notify the observers when a setup action has occurred.

Parameters
[in,out]subjectthe subject being observed

Reimplemented from tgObserver< SuperBallModel >.

Definition at line 51 of file SuperBallLearningController.cpp.

Here is the call graph for this function:

void SuperBallPrefLengthController::onStep ( T12SuperBallPayload 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< T12SuperBallPayload >.

Definition at line 59 of file T12SuperBallPayloadController.cpp.

Here is the call graph for this function:

void SuperBallPrefLengthController::onStep ( SuperBallModel 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< SuperBallModel >.

Definition at line 86 of file SuperBallLearningController.cpp.

virtual void tgObserver< T12SuperBallPayload >::onTeardown ( T12SuperBallPayload 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.

void SuperBallPrefLengthController::onTeardown ( SuperBallModel subject)
virtual

Notify the observers when a teardown action has occurred.

Parameters
[in,out]subjectthe subject being observed

Reimplemented from tgObserver< SuperBallModel >.

Definition at line 350 of file SuperBallLearningController.cpp.


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