NTRT Simulator
 All Classes Files Functions Variables Typedefs Friends Pages
tgCPGStringControl Class Reference
Inheritance diagram for tgCPGStringControl:
Collaboration diagram for tgCPGStringControl:

Public Member Functions

 tgCPGStringControl (const double controlStep=1.0/10000.0)
 
virtual void onAttach (tgLinearString &subject)
 
virtual void onStep (tgLinearString &subject, double dt)
 
void assignNodeNumber (CPGEquations &CPGSys, array_2D nodeParams)
 
void setConnectivity (const std::vector< tgCPGStringControl * > &allStrings, array_4D edgeParams)
 
const int getNodeNumber () const
 
const CPGEquationsgetCPGSys () const
 
const double getCommandedTension () const
 
virtual void setupControl (ImpedanceControl &ipc)
 
void setupControl (ImpedanceControl &ipc, double controlLength)
 
const btRigidBody * getFromBody () const
 
const btRigidBody * getToBody () const
 
virtual void onSetup (tgLinearString &subject)
 
virtual void onTeardown (tgLinearString &subject)
 
virtual double getCPGValue () const
 

Protected Member Functions

ImpedanceControlmotorControl () const
 
double controlLength () const
 

Protected Attributes

CPGEquationsm_pCPGSystem
 
int m_nodeNumber
 
double m_controlLength
 

Detailed Description

Definition at line 35 of file tgCPGStringControl.h.

Member Function Documentation

void tgCPGStringControl::assignNodeNumber ( CPGEquations CPGSys,
array_2D  nodeParams 
)

Can call these any time, but they'll only have the intended effect after all of the strings have been constructed.

Definition at line 68 of file tgCPGStringControl.cpp.

const CPGEquations* tgCPGStringControl::getCPGSys ( ) const
inline

Pointer to the CPG system. Owned by the higher level controller

Definition at line 70 of file tgCPGStringControl.h.

Here is the caller graph for this function:

void tgCPGStringControl::onAttach ( tgLinearString subject)
virtual

Notify the observers when an attach action has occurred. Will only occur once, typically before setup

Parameters
[in,out]subjectthe subject being observed

Reimplemented from tgObserver< tgLinearString >.

Definition at line 48 of file tgCPGStringControl.cpp.

Here is the call graph for this function:

virtual void tgObserver< tgLinearString >::onSetup ( tgLinearString subject)
inlinevirtualinherited

Notify the observers when a setup action has occurred.

Parameters
[in,out]subjectthe subject being observed

Definition at line 60 of file tgObserver.h.

void tgCPGStringControl::onStep ( tgLinearString 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
Todo:
this fails if its attached to multiple controllers! is there a way to track global time at this level

Implements tgObserver< tgLinearString >.

Definition at line 55 of file tgCPGStringControl.cpp.

Here is the call graph for this function:

virtual void tgObserver< tgLinearString >::onTeardown ( tgLinearString subject)
inlinevirtualinherited

Notify the observers when a teardown action has occurred.

Parameters
[in,out]subjectthe subject being observed

Definition at line 66 of file tgObserver.h.

void tgCPGStringControl::setConnectivity ( const std::vector< tgCPGStringControl * > &  allStrings,
array_4D  edgeParams 
)

Iterate through all other tgLinearStringCPGInfos, and determine CPG network by rigid body connectivity

Definition at line 88 of file tgCPGStringControl.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


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