42 #include "tgCPGStringControl_mod.h"
60 std::vector <tgSpringCableActuator*> allMuscles = subject.getAllMuscles();
62 for (std::size_t i = 0; i < allMuscles.size(); i++)
65 allMuscles[i]->attach(pStringControl);
66 std::cout << allMuscles[i]->getTags() << std::endl;
67 m_allControllers.push_back(pStringControl);
70 assert(m_allControllers.size() == allMuscles.size());
74 for (std::size_t i = 0; i < m_allControllers.size(); i++)
76 m_allControllers[i]->assignNodeNumber(*m_pCPGSys, nodeActions);
84 for (std::size_t i = 0; i < m_allControllers.size(); i++)
87 assert(pStringInfo != NULL);
90 if (allMuscles[i]->hasTag(
"inner top"))
95 controlLength = allMuscles[i]->getStartLength();
98 else if (allMuscles[i]->hasTag(
"outer top"))
103 controlLength = 18.5;
105 else if (allMuscles[i]->hasTag(
"inner"))
110 controlLength = allMuscles[i]->getStartLength();
113 else if (allMuscles[i]->hasTag(
"outer"))
118 controlLength = 19.0 ;
122 throw std::runtime_error(
"Missing tags!");
128 pStringInfo->setupControl(*p_ipc, controlLength);
Contains the definition of class ImpedanceControl. $Id$.
LearningSpineJSON(BaseSpineCPGControl::Config config, std::string args, std::string ec="edgeConfig.ini", std::string nc="nodeConfig.ini")
void setConnectivity(const std::vector< tgCPGActuatorControl * > &allStrings, array_4D edgeParams)
A class to read a learning configuration from a .ini file.
Contains the definition of abstract base class tgSpringCableActuator. Assumes that the string is line...
Controller for TetraSpineLearningModel.
Contains the definition of class AnnealEvolution. Adapting NeuroEvolution to do Simulated Annealing...
virtual void setupCPGs(BaseSpineModelLearning &subject, array_2D nodeActions, array_4D edgeActions)