From 3b3211252915a22fa82a794e449d1f6000e8c5e5 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 5 Dec 2012 21:18:46 +0100 Subject: Move data files to own directory --- LocomotorPrimitives.cpp | 2 +- LocomotorPrimitivesController.cpp | 2 +- MuscleEMGProfile.h | 2 +- adults_es_r.csv | 35 ----------------------------------- data/adults_es_r.csv | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 adults_es_r.csv create mode 100644 data/adults_es_r.csv diff --git a/LocomotorPrimitives.cpp b/LocomotorPrimitives.cpp index ea5f247..af1983a 100644 --- a/LocomotorPrimitives.cpp +++ b/LocomotorPrimitives.cpp @@ -24,7 +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->loadCsvData("es_r", "../../data/adults_es_r.csv"); control->setActuators(model.updActuators()); model.addController(control); diff --git a/LocomotorPrimitivesController.cpp b/LocomotorPrimitivesController.cpp index 381e21f..84b6187 100644 --- a/LocomotorPrimitivesController.cpp +++ b/LocomotorPrimitivesController.cpp @@ -61,7 +61,7 @@ void LocomotorPrimitivesController::computeControls(const SimTK::State &s, SimTK for (std::vector::const_iterator it = _act.begin(); it != _act.end(); ++it) { MuscleEMGProfile p = *it; - std::cout << " " << p.getName() << "(" << p.getIdx() << "/" << p.getCapacity() << ")" << std::endl; + //std::cout << " " << p.getName() << "(" << p.getIdx() << "/" << p.getCapacity() << ")" << std::endl; } //const OpenSim::Muscle *rectfem = dynamic_cast(&getActuatorSet().get("bifemlh_r")); diff --git a/MuscleEMGProfile.h b/MuscleEMGProfile.h index 2d31f27..2783b26 100644 --- a/MuscleEMGProfile.h +++ b/MuscleEMGProfile.h @@ -26,7 +26,7 @@ public: } unsigned getIdx() { return _x.size(); } - unsigned getCapacity() { return _x.max_size(); } + unsigned getCapacity() { return _x.capacity(); } const std::string &getName() { return _name; } void addData(double x, double y); diff --git a/adults_es_r.csv b/adults_es_r.csv deleted file mode 100644 index 2481326..0000000 --- a/adults_es_r.csv +++ /dev/null @@ -1,35 +0,0 @@ -x,y -0.0,6.09756 -2.54237,7.31707 -4.23729,9.7561 -7.62712,9.7561 -11.0169,7.31707 -12.7119,7.31707 -14.4068,6.09756 -17.7966,6.09756 -19.4915,4.87805 -21.1864,4.87805 -22.8814,3.65854 -29.661,3.65854 -31.3559,2.43902 -35.5932,2.43902 -43.2203,2.43902 -47.4576,6.09756 -50.8475,10.9756 -55.0847,17.0732 -58.4746,17.0732 -60.1695,14.6341 -61.8644,13.4146 -65.2542,9.7561 -68.6441,8.53659 -72.0339,7.31707 -73.7288,6.09756 -77.1186,4.87805 -79.661,4.87805 -81.3559,3.65854 -85.5932,3.65854 -89.8305,3.65854 -91.5254,2.43902 -94.9153,3.65854 -98.3051,4.87805 -100,4.87805 diff --git a/data/adults_es_r.csv b/data/adults_es_r.csv new file mode 100644 index 0000000..2481326 --- /dev/null +++ b/data/adults_es_r.csv @@ -0,0 +1,35 @@ +x,y +0.0,6.09756 +2.54237,7.31707 +4.23729,9.7561 +7.62712,9.7561 +11.0169,7.31707 +12.7119,7.31707 +14.4068,6.09756 +17.7966,6.09756 +19.4915,4.87805 +21.1864,4.87805 +22.8814,3.65854 +29.661,3.65854 +31.3559,2.43902 +35.5932,2.43902 +43.2203,2.43902 +47.4576,6.09756 +50.8475,10.9756 +55.0847,17.0732 +58.4746,17.0732 +60.1695,14.6341 +61.8644,13.4146 +65.2542,9.7561 +68.6441,8.53659 +72.0339,7.31707 +73.7288,6.09756 +77.1186,4.87805 +79.661,4.87805 +81.3559,3.65854 +85.5932,3.65854 +89.8305,3.65854 +91.5254,2.43902 +94.9153,3.65854 +98.3051,4.87805 +100,4.87805 -- cgit v1.2.3-54-g00ecf