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

#include <TensegrityModelController.h>

Inheritance diagram for TensegrityModelController:
Collaboration diagram for TensegrityModelController:

Public Member Functions

 TensegrityModelController ()
 
virtual ~TensegrityModelController ()
 
virtual void onSetup (TensegrityModel &subject)
 
virtual void onStep (TensegrityModel &subject, double dt)
 
virtual void onAttach (TensegrityModel &subject)
 
virtual void onTeardown (TensegrityModel &subject)
 
void attach (tgObserver< TensegrityModelController > *pObserver)
 
void notifyStep (double dt)
 
void notifySetup ()
 
void notifyTeardown ()
 

Detailed Description

A controller to apply uniform rest length offset to all cables in a TensegrityModel. Does a one-time adjust of all cable rest lengths, thereby tightening up the structure and keeping it held together without further control input.

Definition at line 46 of file TensegrityModelController.h.

Constructor & Destructor Documentation

TensegrityModelController::TensegrityModelController ( )

Construct a TensegrityRestLengthController.

Parameters
[in]restLengthDiff,theamount of cable retraction to enact. This length will be subtracted from the geometric length of each cable in the structure.

Definition at line 44 of file TensegrityModelController.cpp.

virtual TensegrityModelController::~TensegrityModelController ( )
inlinevirtual

Nothing to delete, destructor must be virtual

Definition at line 63 of file TensegrityModelController.h.

Member Function Documentation

void tgSubject< TensegrityModelController >::attach ( tgObserver< TensegrityModelController > *  pObserver)
inherited

Attach an observer to the subject of the observer.

Parameters
[in,out]pObservera pointer to an observer for the subject; do nothing if the pointer is NULL
void tgSubject< TensegrityModelController >::notifySetup ( )
inherited

Call tgObserver<T>::onSetup() on all observers in the order in which they were attached.

void tgSubject< TensegrityModelController >::notifyStep ( double  dt)
inherited

Call tgObserver<T>::onStep() on all observers in the order in which they were attached.

Parameters
[in]dtthe number of seconds since the previous call; do nothing if not positive
void tgSubject< TensegrityModelController >::notifyTeardown ( )
inherited

Call tgObserver<T>::onTeardown() on all observers in the order in which they were attached.

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

Apply the controller. On setup, adjust the cable lengths one time.

Parameters
[in]subject- the TensegrityModel that is being controlled. Must have a list of allMuscles populated

Reimplemented from tgObserver< TensegrityModel >.

Definition at line 49 of file TensegrityModelController.cpp.

void TensegrityModelController::onStep ( TensegrityModel subject,
double  dt 
)
virtual

The onStep method is not used for this controller.

Parameters
[in]subject- the TensegrityModel that is being controlled. Must have a list of allMuscles populated
[in]dt,currenttimestep must be positive

Implements tgObserver< TensegrityModel >.

Definition at line 67 of file TensegrityModelController.cpp.

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


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