summaryrefslogtreecommitdiff
path: root/LocomotorPrimitives.cpp
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2012-11-27 17:01:23 +0100
committerTobias Klauser <tklauser@distanz.ch>2012-11-27 17:01:23 +0100
commitedb2cdf6b9fc0c94cce910c9d488e69200402c57 (patch)
tree69416f24c73421fa5bdd235ec34f8cc2b468dd70 /LocomotorPrimitives.cpp
parent705e8f7433eedd1b7e2025ef3dcc8f4613c37e31 (diff)
Create (and use) model which is fixed in space
Diffstat (limited to 'LocomotorPrimitives.cpp')
-rw-r--r--LocomotorPrimitives.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/LocomotorPrimitives.cpp b/LocomotorPrimitives.cpp
index 7e24f08..341fa74 100644
--- a/LocomotorPrimitives.cpp
+++ b/LocomotorPrimitives.cpp
@@ -10,13 +10,14 @@
#include "LocomotorPrimitivesManager.h"
#include "LocomotorPrimitivesController.h"
-#define NO_SIM 0
+#define FIXED_IN_SPACE 1
+#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 = 5.0;
+static const double finalTime = 2.0;
static void constructModel(OpenSim::Model &model)
{
@@ -88,7 +89,8 @@ int main(void)
try {
// Create an OpenSim model and set its name
- OpenSim::Model osimModel("../../locomotor-primitives.osim");
+ std::string modelName = FIXED_IN_SPACE ? "locomotor-primitives-fixed.osim" : "locomotor-primitives.osim";
+ OpenSim::Model osimModel("../../" + modelName);
osimModel.setName(MODEL_NAME);
constructModel(osimModel);
@@ -96,12 +98,15 @@ int main(void)
simulateModel(osimModel);
} catch (OpenSim::Exception ex) {
std::cout << ex.getMessage() << std::endl;
+ std::cin.get();
return 1;
} catch (std::exception ex) {
std::cout << ex.what() << std::endl;
+ std::cin.get();
return 1;
} catch (...) {
std::cout << "UNRECOGNIZED EXCEPTION" << std::endl;
+ std::cin.get();
return 1;
}