39 #include "LinearMath/btVector3.h"
59 double triangle_length;
60 double triangle_height;
77 useKinematic(kinematic),
129 s.move(btVector3(0, 5, 0));
134 spec.addBuilder(
"rod",
new tgRodInfo(rodConfig));
135 spec.addBuilder(
"rod2",
new tgRodInfo(rodConfig2));
152 structureInfo.buildInto(*
this, world);
156 allMuscles = tgCast::filter<tgModel, tgSpringCableActuator> (
getDescendants());
173 throw std::invalid_argument(
"dt is not positive");
183 allMuscles[0]->setControlInput(-580.0);
187 allMuscles[0]->setControlInput(5.0, dt);
189 if (allMuscles[0]->getRestLength() <= 5.0 && !reached)
191 std::cout <<
"Rest length below 5.0 at: " << totalTime << std::endl;
virtual void step(double dt)
virtual void setup(tgWorld &world)
Definition of class tgRodInfo.
const std::vector< tgSpringCableActuator * > & getAllMuscles() const
virtual void step(double dt)
virtual void setup(tgWorld &world)
virtual void onVisit(tgModelVisitor &r)
tsTestRig(bool kinematic=true)
Definition of class tgBasicActuatorInfo.
virtual void onVisit(const tgModelVisitor &r) const
void addPair(int fromNodeIdx, int toNodeIdx, std::string tags="")
Contains the definition of class tgBasicActuator.
Definition of class tgStructure.
Definition of class tgStructureInfo.
Contains the definition of class tgKinematicActuator.
Definition of class tgKinematicActuatorInfo.
Contains the definition of class tgRod.
Definition of class tgBuildSpec.
Defines a 3 strut 9 string tensegrity model.
void notifyStep(double dt)
std::vector< tgModel * > getDescendants() const
void addNode(double x, double y, double z, std::string tags="")