diff options
Diffstat (limited to 'LocomotorPrimitives.cpp')
-rw-r--r-- | LocomotorPrimitives.cpp | 11 |
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; } |