From ad6a598de4025321a5227edf2a676c0f3397927c Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 5 Dec 2012 21:14:14 +0100 Subject: Basic infrastructure to read muscle activation profiles from CSV --- LocomotorPrimitives.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'LocomotorPrimitives.cpp') diff --git a/LocomotorPrimitives.cpp b/LocomotorPrimitives.cpp index 341fa74..ea5f247 100644 --- a/LocomotorPrimitives.cpp +++ b/LocomotorPrimitives.cpp @@ -14,7 +14,6 @@ #define NO_SIM 0 static const std::string MODEL_NAME = "LocomotorPrimitives"; - // Define the initial and final simulation time static const double initialTime = 0.0; static const double finalTime = 2.0; @@ -25,6 +24,7 @@ static void constructModel(OpenSim::Model &model) // Define controller for the model LocomotorPrimitivesController *control = new LocomotorPrimitivesController(0.01); + control->loadCsvData("es_r", "../../adults_es_r.csv"); control->setActuators(model.updActuators()); model.addController(control); @@ -37,8 +37,8 @@ static void constructModel(OpenSim::Model &model) for (int i = 0; i < sz; i++) { OpenSim::ActivationFiberLengthMuscle *m = dynamic_cast(&actSet.get(i)); std::cout << " " << m->getName() << std::endl; - m->setDefaultActivation(0.01); - m->setDefaultFiberLength(0.1); +// m->setDefaultActivation(0.5); +// m->setDefaultFiberLength(0.1); } // Create the force reporter for obtaining the forces applied to the model -- cgit v1.2.3-54-g00ecf