46 int main(
int argc,
char** argv)
48 std::cout <<
"AppNestedStructureTest" << std::endl;
55 const double stepSize = 1.0/1000.0;
56 const double renderRate = 1.0/60.0;
57 tgSimView view(world, stepSize, renderRate);
64 const int segments = 12;
69 const std::string suffix((argc > 1) ? argv[1] :
"default");
71 const int segmentSpan = 3;
72 const int numMuscles = 4;
73 const int numParams = 2;
74 const int segNumber = 0;
76 const double controlTime = 0.1;
77 const double lowPhase = -1 * M_PI;
78 const double highPhase = M_PI;
79 const double lowAmplitude = 0.0;
80 const double highAmplitude = 30.0;
82 const double tension = 0.0;
83 const double kPosition = 400.0;
84 const double kVelocity = 40.0;
86 JSONCPGControl::Config control_config(segmentSpan, numMuscles, numMuscles, numParams, segNumber, controlTime,
87 lowAmplitude, highAmplitude, lowPhase, highPhase,
88 tension, kPosition, kVelocity);
90 new JSONCPGControl(control_config, suffix,
"learningSpines/OctahedralComplex/");
91 myModel->
attach(myControl);
93 simulation.addModel(myModel);
98 simulation.run(60000);
100 std::cout <<
"Dist:" << myControl->getScore() << std::endl;
int main(int argc, char **argv)
Implementing the cross-linked octahedral complex spine inspired by Tom Flemons.
An adaptation of JSONCPGControl that utilizes JSON for parameters.
Contains the definition of class tgSimulation.
Contains the definition of class tgModel.
Contains the definition of class tgSimViewGraphics.
Contains the definition of class tgWorld $Id$.
Contains the definition of class tgSimView.
void attach(tgObserver< T > *pObserver)