summaryrefslogtreecommitdiff
path: root/LocomotorPrimitivesController.cpp
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-01-08 12:34:16 +0100
committerTobias Klauser <tklauser@distanz.ch>2013-01-08 12:34:16 +0100
commit369685d0dc26523d57ac71a682f046db34ba6851 (patch)
treee5f50ebb431031e55bb005245f5933b7601617c4 /LocomotorPrimitivesController.cpp
parenta2a6c67f9777c3b07535f0b401d7f6b4a122ceaa (diff)
Remove unused code in controller (and related)
Diffstat (limited to 'LocomotorPrimitivesController.cpp')
-rw-r--r--LocomotorPrimitivesController.cpp50
1 files changed, 1 insertions, 49 deletions
diff --git a/LocomotorPrimitivesController.cpp b/LocomotorPrimitivesController.cpp
index 0f57111..d22ee71 100644
--- a/LocomotorPrimitivesController.cpp
+++ b/LocomotorPrimitivesController.cpp
@@ -1,59 +1,11 @@
#include <OpenSim/OpenSim.h>
#include "LocomotorPrimitivesController.h"
-#include "MuscleEMGProfile.h"
#define VERBOSE 1
static const double TIME_DAMP = 0.1;
-#if 0
-int LocomotorPrimitivesController::loadCsvData(const std::string &muscleName, const std::string &file)
-{
- std::cout << ">> loading CSV data from " << file << std::endl;
- std::ifstream data(file);
- std::string line;
-
- std::cout << data.tellg() << std::endl;
-
- if (!data.is_open()) {
- std::cerr << "Error loading CSV data from " << file << std::endl;
- return -1;
- }
-
- MuscleEMGProfile p(muscleName, 0);
-
- while (std::getline(data, line)) {
- std::stringstream s(line);
- std::string cell;
-
- int i = 0;
- double x;
- while (std::getline(s, cell, ',')) {
- if (!isdigit(cell[0]))
- continue;
-
- std::cout << "read cell(" << (i == 0 ? "x" : "y") << ") -> " << cell << std::endl;
- double val = (double) atof(cell.c_str());
-
- if (i == 1)
- p.addData(x, val);
- else
- x = val;
-
- i = !i;
- }
- }
-
- data.close();
-
- //_act.push_back(p);
- std::cout << ">>> loaded EMG profile for " << p.getName() << ", " << p.getIdx() << "/" << p.getCapacity() << std::endl;
-
- return 0;
-}
-#endif
-
void LocomotorPrimitivesController::computeControls(const SimTK::State &s, SimTK::Vector &controls) const
{
double t = s.getTime();
@@ -96,7 +48,7 @@ void LocomotorPrimitivesController::computeControls(const SimTK::State &s, SimTK
if (act > 0.0)
last_twitch = t;
-
+
//if (VERBOSE && act > 0.0)
// std::cout << "(" << std::fixed << t << ") " << "v=" << std::fixed << v << ", act=" << std::fixed << act << std::endl;