|
NTRT Simulator
|
#include <tgBaseString.h>
Inherits tgModel.
Inherited by tgLinearString, and tgRBString.

Classes | |
| struct | BaseStringHistory |
| struct | Config |
Public Member Functions | |
| virtual | ~tgBaseString () |
| virtual void | setup (tgWorld &wdorld) |
| virtual void | teardown () |
| virtual void | step (double dt) |
| virtual void | moveMotors (double dt)=0 |
| virtual void | tensionMinLengthController (const double targetTension, float dt)=0 |
| virtual void | setRestLength (double newLength, float dt) |
| virtual const double | getStartLength () const =0 |
| virtual const double | getCurrentLength () const =0 |
| virtual const double | getTension () const =0 |
| virtual const double | getRestLength () const =0 |
| virtual const double | getVelocity () const =0 |
| virtual void | onVisit (const tgModelVisitor &r) const |
| void | addChild (tgModel *pChild) |
| virtual std::string | toString (std::string prefix="") const |
| template<typename T > | |
| std::vector< T * > | find (const tgTagSearch &tagSearch) |
| template<typename T > | |
| std::vector< T * > | find (const std::string &tagSearch) |
| std::vector< tgModel * > | getDescendants () const |
| void | addTags (const std::string &space_separated_tags) |
| void | addTags (const tgTags &tags) |
| bool | hasTag (const std::string tag) const |
| bool | hasAllTags (std::string tags) |
| bool | hasAnyTags (const std::string tags) |
| bool | hasNoTags () |
| tgTags & | getTags () |
| const tgTags & | getTags () const |
| void | setTags (tgTags tags) |
| std::string | getTagStr (std::string delim=" ") const |
Protected Member Functions | |
| tgBaseString (const tgTags &tags, tgBaseString::Config &config, double restLength, double actualLength) | |
| tgBaseString (std::string space_separated_tags, tgBaseString::Config &config, double restLength, double actualLength) | |
Protected Attributes | |
| Config | m_config |
| BaseStringHistory *const | m_pHistory |
| double | m_restLength |
| double | m_preferredLength |
| double | m_startLength |
| double | m_prevVelocity |
Sets a basic API for string models, so controllers can interface with all of them the same way
Definition at line 42 of file tgBaseString.h.
|
virtual |
Deletes history
Definition at line 150 of file tgBaseString.cpp.
|
protected |
Need to pass tags down to tgModel, but these should only be called by sub classes
Definition at line 112 of file tgBaseString.cpp.
|
inherited |
Add a sub-model to this model. The model takes ownership of the child sub-model and is responsible for deallocating it.
| [in,out] | pChild | a pointer to a sub-model |
| std::invalid_argument | is pChild is NULL, this object, or already a descendant |
Definition at line 126 of file tgModel.cpp.


|
inlineinherited |
Get a vector of descendants sorted by type and a tagsearch. Useful for pulling out muscle groups, or similar.
| [in] | tagSearch,a | tagSearch that contains the desired tags |
Definition at line 129 of file tgModel.h.

|
inlineinherited |
Get a vector of descendants sorted by type and a tagsearch. Useful for pulling out muscle groups, or similar.
| [in] | tagSearch,a | std::string& that contains the desired tags |
Definition at line 142 of file tgModel.h.

|
inherited |
Return a std::vector of const pointers to all sub-models.
Definition at line 174 of file tgModel.cpp.

|
pure virtual |
Functions for interfacing with muscle2P, and higher level controllers
Implemented in tgLinearString, and tgRBString.
|
virtualinherited |
Call tgModelVisitor::render() on self and all descendants.
| [in,out] | r | a reference to a tgModelVisitor |
Reimplemented in ConnectorTestModel, BuildTestModel, tgLinearString, and tgRod.
Definition at line 109 of file tgModel.cpp.

|
virtual |
Setup takes a tgWorld and passes it to any children for their own setup functions. All subclasses should call this at the appropriate time (usually end of setup) within their own setup function.
| [in] | world | - the tgWorld the models will exist in. |
Reimplemented from tgModel.
Reimplemented in tgRBString, and tgLinearString.
Definition at line 155 of file tgBaseString.cpp.

|
virtual |
Just calls tgModel::step(dt) - steps any children
Reimplemented from tgModel.
Reimplemented in tgLinearString, and tgRBString.
Definition at line 165 of file tgBaseString.cpp.

|
virtual |
Deletes the children (undoes setup)
Reimplemented from tgModel.
Reimplemented in tgRBString, and tgLinearString.
Definition at line 160 of file tgBaseString.cpp.

|
virtualinherited |
Returns the tag names of this model and its children
| [in] | prefix | a string to append to |
Definition at line 156 of file tgModel.cpp.

|
protected |
A copy of the configuration POD supplied at constuction. This is not const.
Definition at line 223 of file tgBaseString.h.
|
protected |
All history sequences.
Definition at line 226 of file tgBaseString.h.
|
protected |
Tracking the most recent velocity to avoid using deques.
Definition at line 245 of file tgBaseString.h.
|
protected |
Motor Model Parameters
Definition at line 233 of file tgBaseString.h.
|
protected |
Tracking the start length to avoid using deques.
Definition at line 240 of file tgBaseString.h.