diff --git a/.gitignore b/.gitignore index d57816736c..cc69ad9da8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ # Ignore cmake files. *CMakeCache.txt *CMakeFiles +CMakeLists.txt.user* # Ignore tmp directory/file. We use it sometimes to write debug information. tmp # Ignore build trees. diff --git a/CHANGELOG.md b/CHANGELOG.md index 162cb05a8d..69a2a49ae0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -390,6 +390,7 @@ programmatically in MATLAB or python. variable `OPENSIM_HOME`. OpenSim uses `PATH` instead. - The Thelen2003Muscle now depend on separate components for modeling pennation, and activation dynamics. +- Static optimization now solves for muscle equilibrium. Documentation ------------- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8e1a6fa153..6f9b3a454e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ Contents: Thank you for contributing! -Ways to Contribute +Ways to Contribute ------------------ There are lots of ways to contribute to the OpenSim project, and people with widely varying skill sets can make meaningful contributions. Please don't think your contribution has to be momentous to be appreciated. See a typo? Tell us about it or fix it! Here are some contribution ideas: diff --git a/OpenSim/Analyses/StaticOptimization.cpp b/OpenSim/Analyses/StaticOptimization.cpp index d4911ee4a6..22a35bf08e 100644 --- a/OpenSim/Analyses/StaticOptimization.cpp +++ b/OpenSim/Analyses/StaticOptimization.cpp @@ -376,11 +376,9 @@ record(const SimTK::State& s) target.setParameterLimits(lowerBounds, upperBounds); - _parameters = 0; // Set initial guess to zeros - // Static optimization _modelWorkingCopy->getMultibodySystem().realize(sWorkingCopy,SimTK::Stage::Velocity); - target.prepareToOptimize(sWorkingCopy, &_parameters[0]); + target.prepareToOptimize(sWorkingCopy, &_parameters[0]); // Use previous solution as initial guess //LARGE_INTEGER start; //LARGE_INTEGER stop; @@ -447,7 +445,7 @@ record(const SimTK::State& s) double tolConstraints = 1e-6; bool incompleteModel = false; string msgIncomplete = "The model appears unsuitable for static optimization.\nTry appending the model with additional force(s) or locking joint(s) to reduce the following acceleration constraint violation(s):\n"; - SimTK::Vector constraints; + SimTK::Vector constraints(target.getNumConstraints()); target.constraintFunc(_parameters,true,constraints); auto coordinates = _modelWorkingCopy->getCoordinatesInMultibodyTreeOrder(); @@ -588,8 +586,20 @@ int StaticOptimization::begin(const SimTK::State& s ) _forceReporter->begin(sWorkingCopy); _forceReporter->updForceStorage().reset(); + // Set initial guess to highest activation + // This is necessary because previous activation is used for determining + // the force of the muscle (therefore cannot be zero) _parameters.resize(_modelWorkingCopy->getNumControls()); - _parameters = 0; + const Set& fs = _modelWorkingCopy->getActuators(); + for(int i=0,j=0;i(&fs.get(i)); + if (act) { + if (act->getMinControl() != -INFINITY) + _parameters[j++] = act->getMaxControl(); + else + _parameters[j++] = 1.; + } + } } _statesSplineSet=GCVSplineSet(5,_statesStore); diff --git a/OpenSim/Analyses/StaticOptimizationTarget.cpp b/OpenSim/Analyses/StaticOptimizationTarget.cpp index 7383ed5810..c0c8c395f2 100644 --- a/OpenSim/Analyses/StaticOptimizationTarget.cpp +++ b/OpenSim/Analyses/StaticOptimizationTarget.cpp @@ -89,10 +89,116 @@ StaticOptimizationTarget(const SimTK::State& s, Model *aModel,int aNP,int aNC, b bool StaticOptimizationTarget:: prepareToOptimize(SimTK::State& s, double *x) { - // COMPUTE MAX ISOMETRIC FORCE + int np = getNumParameters(); + int nc = getNumConstraints(); + + // Compute the target acceleration + _targetAcceleration.resize(nc); + auto coordinates = _model->getCoordinatesInMultibodyTreeOrder(); + for(int i=0; i(_accelerationIndices[i])]; + int ind = _statesStore->getStateIndex(coord.getSpeedName(), 0); + if (ind < 0){ + // get the full coordinate speed state variable path name + string fullname = coord.getStateVariableNames()[1]; + ind = _statesStore->getStateIndex(fullname, 0); + if (ind < 0){ + string msg = "StaticOptimizationTarget::computeConstraintVector: \n"; + msg+= "target motion for coordinate '"; + msg += coord.getName() + "' not found."; + throw Exception(msg); + } + } + Function& targetFunc = _statesSplineSet.get(ind); + std::vector derivComponents(1,0); //take first derivative + _targetAcceleration[i] = targetFunc.calcDerivative(derivComponents, SimTK::Vector(1, s.getTime())); + } + + // Initialize the system at given activations and state + double modifier(0.); + int iter(0); const ForceSet& fSet = _model->getForceSet(); - - for(int i=0, j=0;i(&fSet.get(i)); + if (mus){ + mus->overrideActuation(s, false); + if (x[i] + modifier <= 1) + mus->setActivation(s, x[j] + modifier); + else + mus->setActivation(s, x[j] - modifier); + ++j; + } + CoordinateActuator* coord = dynamic_cast(&fSet.get(i)); + if (coord) + coord->setOverrideActuation(s, x[i] * coord->getOptimalForce()); + } + try { + _model->equilibrateMuscles(s); + } catch(const Exception& e) { + // If the muscle falls into some weird numerical error, try to just slightly change the activations + // and reprocess it until it works (maximum of 10 times) + modifier += 0.001; + ++iter; + if (iter >= 10) + throw e; + continue; + } + break; + } + +#ifdef USE_LINEAR_CONSTRAINT_MATRIX + // Remove residual actuator to compute sole effects of passive and active forces + for(int i=0, j=0; i(&fSet.get(i)); + if (coord) + coord->setOverrideActuation(s, 0); + } + _model->getMultibodySystem().realize(s,SimTK::Stage::Velocity); + + // Compute passive forces at state s + Vector passiveForces(np); + for(int i=0, j=0; i(&fSet.get(i)); + if( mus ) { + passiveForces[j++] = mus->getPassiveFiberForceAlongTendon(s); + } + } + + // Compute linear qqdot from the passive forces + Vector qddotPassive(nc); + for(int i=0,j=0;i(&fSet.get(i)); + if( mus ) { + mus->overrideActuation(s, true); + mus->setOverrideActuation(s, passiveForces[j]); + ++j; + } + } + // Don't reequilibrate muscle since it has the right length! + _model->getMultibodySystem().realize(s,SimTK::Stage::Acceleration); + SimTK::Vector udot = _model->getMatterSubsystem().getUDot(s); + for(int i=0; i<_accelerationIndices.getSize(); i++) + qddotPassive[i] = udot[_accelerationIndices[i]]; + + // Compute linear qqdot from the non linear effects (coriolis and gravity) + Vector qddotNonLinear(nc); + for(int i=0,j=0;i(&fSet.get(i)); + if( act ) { + act->setOverrideActuation(s, 0); + j++; + } + } + _model->getMultibodySystem().realize(s,SimTK::Stage::Acceleration); + udot = _model->getMatterSubsystem().getUDot(s); + for(int i=0; i<_accelerationIndices.getSize(); i++) + qddotNonLinear[i] = udot[_accelerationIndices[i]]; + + + + // COMPUTE MAX ISOMETRIC FORCE + for(int i=0, j=0, imus=0;i(&fSet.get(i)); if( act ) { double fOpt; @@ -101,11 +207,13 @@ prepareToOptimize(SimTK::State& s, double *x) //ActivationFiberLengthMuscle *aflmus = dynamic_cast(mus); if(mus && _useMusclePhysiology) { _model->setAllControllersEnabled(true); - fOpt = mus->calcInextensibleTendonActiveFiberForce(s, 1.0); + // compute an approximative 100% (exactly true at x[imus] = 1) + fOpt = mus->getActiveFiberForceAlongTendon(s) / x[imus]; _model->setAllControllersEnabled(false); } else { fOpt = mus->getMaxIsometricForce(); } + imus++; } else { fOpt = act->getOptimalForce(); } @@ -113,26 +221,28 @@ prepareToOptimize(SimTK::State& s, double *x) } } -#ifdef USE_LINEAR_CONSTRAINT_MATRIX - //cout<<"Computing linear constraint matrix..."<getMultibodySystem().realize(s,SimTK::Stage::Velocity); + // Set modeling options for Actuators to be overridden + for(int i=0; i(&fSet.get(i)); + if( act ) { + act->overrideActuation(s, false); + } + } + #endif // return false to indicate that we still need to proceed with optimization @@ -541,17 +651,18 @@ constraintFunc(const SimTK::Vector ¶meters, const bool new_parameters, SimTK //QueryPerformanceFrequency(&frequency); //QueryPerformanceCounter(&start); -#ifndef USE_LINEAR_CONSTRAINT_MATRIX - - // Evaluate constraint function for all constraints and pick the appropriate component - computeConstraintVector(parameters,constraints); - -#else - +#ifdef USE_LINEAR_CONSTRAINT_MATRIX // Use precomputed constraint matrix //cout<<"Computing constraints assuming linear dependence..."<getCurrentState()); + computeConstraintVector(state, parameters,constraints); #endif //QueryPerformanceCounter(&stop); @@ -584,26 +695,7 @@ computeConstraintVector(SimTK::State& s, const Vector ¶meters,Vector &constr auto coordinates = _model->getCoordinatesInMultibodyTreeOrder(); // CONSTRAINTS - for(int i=0; igetStateIndex(coord.getSpeedName(), 0); - if (ind < 0){ - // get the full coordinate speed state variable path name - string fullname = coord.getStateVariableNames()[1]; - ind = _statesStore->getStateIndex(fullname, 0); - if (ind < 0){ - string msg = "StaticOptimizationTarget::computeConstraintVector: \n"; - msg+= "target motion for coordinate '"; - msg += coord.getName() + "' not found."; - throw Exception(msg); - } - } - Function& targetFunc = _statesSplineSet.get(ind); - std::vector derivComponents(1,0); //take first derivative - double targetAcceleration = targetFunc.calcDerivative(derivComponents, SimTK::Vector(1, s.getTime())); - //std::cout << "computeConstraintVector:" << targetAcceleration << " - " << actualAcceleration[i] << endl; - constraints[i] = targetAcceleration - actualAcceleration[i]; - } + constraints = _targetAcceleration - actualAcceleration; //QueryPerformanceCounter(&stop); //double duration = (double)(stop.QuadPart-start.QuadPart)/(double)frequency.QuadPart; @@ -629,17 +721,13 @@ constraintJacobian(const SimTK::Vector ¶meters, const bool new_parameters, S //QueryPerformanceFrequency(&frequency); //QueryPerformanceCounter(&start); -#ifndef USE_LINEAR_CONSTRAINT_MATRIX - - // Compute gradient - StaticOptimizationTarget::CentralDifferencesConstraint(this,&_dx[0],parameters,jac); - -#else - +#ifdef USE_LINEAR_CONSTRAINT_MATRIX // Use precomputed constraint matrix (works if constraint is linear) //cout<<"Computing constraint gradient assuming linear dependence..."<getForceSet(); +#ifdef USE_LINEAR_CONSTRAINT_MATRIX for(int i=0,j=0;i(&fs.get(i)); if( act ) { @@ -668,12 +756,51 @@ computeAcceleration(SimTK::State& s, const SimTK::Vector ¶meters,SimTK::Vect j++; } } +#else + for(int i=0,j=0;i(&fs.get(i)); + if (mus){ + mus->setActivation(s, parameters[j]); + ++j; + } + } + // If the muscle falls into some weird numerical error, try to just slightly change the activations + // and reprocess it until it works (maximum of 10 times) + double modifier(0.); + int iter(0); + while(true){ + for(int i=0,j=0;i(&fs.get(i)); + if (mus){ + if (parameters[j]+modifier < 1) + mus->setActivation(s, parameters[j]+modifier); + else + mus->setActivation(s, parameters[j]-modifier); + ++j; + } + } + } + try { + _model->equilibrateMuscles(s); + } catch(const Exception& e) { + modifier += 0.001; + ++iter; + if (iter >= 10) + throw e; + continue; + } + break; + } +#endif _model->getMultibodySystem().realize(s,SimTK::Stage::Acceleration); SimTK::Vector udot = _model->getMatterSubsystem().getUDot(s); - for(int i=0; i<_accelerationIndices.getSize(); i++) + for(int i=0; i<_accelerationIndices.getSize(); i++) rAccel[i] = udot[_accelerationIndices[i]]; //QueryPerformanceCounter(&stop); @@ -682,3 +809,4 @@ computeAcceleration(SimTK::State& s, const SimTK::Vector ¶meters,SimTK::Vect // 1.45 ms } + diff --git a/OpenSim/Analyses/StaticOptimizationTarget.h b/OpenSim/Analyses/StaticOptimizationTarget.h index 0f1f5d75d0..d9f49e7fb1 100644 --- a/OpenSim/Analyses/StaticOptimizationTarget.h +++ b/OpenSim/Analyses/StaticOptimizationTarget.h @@ -30,6 +30,7 @@ #include "OpenSim/Common/Array.h" #include #include +#include "OpenSim/Actuators/CoordinateActuator.h" //============================================================================= //============================================================================= @@ -61,9 +62,12 @@ class OSIMANALYSES_API StaticOptimizationTarget : public SimTK::OptimizerSystem Array _recipOptForceSquared; /** Optimal force accounting for force-length curve if desired and if actuator is a muscle. */ Array _optimalForce; + /** Acceleration to target */ + SimTK::Vector _targetAcceleration; SimTK::Matrix _constraintMatrix; SimTK::Vector _constraintVector; + SimTK::Vector _qddotFromNonLinear; const Storage *_statesStore; GCVSplineSet _statesSplineSet; diff --git a/OpenSim/Examples/CMakeLists.txt b/OpenSim/Examples/CMakeLists.txt index cd62a27839..2a0e39cb5a 100644 --- a/OpenSim/Examples/CMakeLists.txt +++ b/OpenSim/Examples/CMakeLists.txt @@ -11,6 +11,7 @@ if(BUILD_API_EXAMPLES) MuscleExample CustomActuatorExample OptimizationExample_Arm26 + StaticOptimizationExample checkEnvironment SimpleOptimizationExample SymbolicExpressionReporter @@ -22,6 +23,7 @@ if(BUILD_API_EXAMPLES) add_subdirectory(SymbolicExpressionReporter) add_subdirectory(DataTable) add_subdirectory(DataAdapter) + add_subdirectory(StaticOptimizationExample) add_subdirectory(Moco) elseif() diff --git a/OpenSim/Examples/StaticOptimizationExample/CMakeLists.txt b/OpenSim/Examples/StaticOptimizationExample/CMakeLists.txt new file mode 100644 index 0000000000..c9c2655fee --- /dev/null +++ b/OpenSim/Examples/StaticOptimizationExample/CMakeLists.txt @@ -0,0 +1,32 @@ +set(EXAMPLES_TO_COMPILE StaticOptimizationExample.cpp +) + +foreach(EXAMPLE_PROG ${EXAMPLES_TO_COMPILE}) + get_filename_component(EXAMPLE_ROOT ${EXAMPLE_PROG} NAME_WE) + add_executable(${EXAMPLE_ROOT} ${EXAMPLE_PROG}) + target_link_libraries(${EXAMPLE_ROOT} ${Simbody_LIBRARIES} osimCommon osimTools) + set_target_properties(${EXAMPLE_ROOT} PROPERTIES FOLDER "Examples") + + file(GLOB ADDITIONAL_FILES *.osim *.xml *.mot) + + foreach(ADDITIONAL_FILE ${ADDITIONAL_FILES}) + get_filename_component(ADDITIONAL_FILE_NAME ${ADDITIONAL_FILE} NAME) + add_custom_command( + TARGET ${EXAMPLE_ROOT} + COMMAND ${CMAKE_COMMAND} + ARGS -E copy + ${ADDITIONAL_FILE} + ${CMAKE_BINARY_DIR}/OpenSim/Examples/${EXAMPLE_ROOT}/${ADDITIONAL_FILE_NAME}) + endforeach(ADDITIONAL_FILE) + + # Doesn't work... + add_custom_target( + TARGET ${EXAMPLE_ROOT} + COMMAND ${CMAKE_COMMAND} -E make_directory + ${CMAKE_BINARY_DIR}/OpenSim/Examples/${EXAMPLE_ROOT}/Results) +endforeach(EXAMPLE_PROG ${EXAMPLES_TO_COMPILE}) + + + + + diff --git a/OpenSim/Examples/StaticOptimizationExample/StaticOptimizationExample.cpp b/OpenSim/Examples/StaticOptimizationExample/StaticOptimizationExample.cpp new file mode 100644 index 0000000000..8994ce1b49 --- /dev/null +++ b/OpenSim/Examples/StaticOptimizationExample/StaticOptimizationExample.cpp @@ -0,0 +1,17 @@ + +// INCLUDE +#include +#include +#include +#include + +using namespace OpenSim; +using namespace std; + +int main() +{ + AnalyzeTool analyze("OpenSim/Examples/StaticOptimizationExample/arm26_Setup_StaticOptimization.xml"); + analyze.run(); + + return 0; +} diff --git a/OpenSim/Examples/StaticOptimizationExample/arm26.osim b/OpenSim/Examples/StaticOptimizationExample/arm26.osim new file mode 100644 index 0000000000..4cd2f1cc66 --- /dev/null +++ b/OpenSim/Examples/StaticOptimizationExample/arm26.osim @@ -0,0 +1,1617 @@ + + + + + + The OpenSim Development Team (Reinbolt, J; Seth, A; Habib, A; Hamner, S) adapted from a model originally created by Kate Holzbaur (11/22/04) + + License: + Creative Commons (CCBY 3.0). You are free to distribute, remix, tweak, and build upon this work, even commercially, + as long as you credit us for the original creation. + http://creativecommons.org/licenses/by/3.0/ + + + Holzbaur, K.R.S., Murray, W.M., Delp, S.L. A Model of the Upper Extremity for Simulating Musculoskeletal Surgery and Analyzing Neuromuscular Control. + Annals of Biomedical Engineering, vol 33, pp 829–840, 2005 + + meters + N + + 0 -9.8066 0 + + + + + 0 + 0 0 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + ground_ribs.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + ground_spine.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + ground_skull.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + ground_jaw.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + ground_r_clavicle.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + ground_r_scapula.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + + + 1 1 1 + + -0 0 -0 0 0 0 + + false + + 4 + + + + + 1.37532 -0.294612 2.43596 + -0.043905 -0.0039 0.1478 + true + x + + + + + + + + 1 1 1 + + 1.37532 -0.294612 2.43596 -0.043905 -0.0039 0.1478 + + false + + 4 + + 0.003 + 0.03 + + + + + + + 1.864572 + 0 -0.180496 0 + 0.01481 + 0.004551 + 0.013193 + 0 + 0 + 0 + + + + + + + + + r_shoulder_elev + + -0.05889802 0.0023 0.99826136 + + + + 1 0 + + + + + + + + 0 1 0 + + + + 0 + + + + + + + + 0.99826136 -0 0.05889802 + + + + 0 + + + + + + + + + 1 0 0 + + + + 0 + + + + + + + + 0 1 0 + + + + 0 + + + + + + + + 0 0 1 + + + + 0 + + + + + ground + -0.017545 -0.007 0.17 + 0 0 0 + 0 0 0 + 0 0 0 + + + + + + rotational + + 0 + + 0 + + -1.57079633 3.14159265 + + false + + false + + + + + + + false + + + + + + + + + arm_r_humerus.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + + + 1 1 1 + + -0 0 -0 0 0 0 + + false + + 4 + + + + + 3.00162 -0.853466 2.57419 + -0.0078 -0.0041 -0.0014 + true + z + + + + + + + + 1 1 1 + + 3.00162 -0.853466 2.57419 -0.0078 -0.0041 -0.0014 + + false + + 4 + + 0.035 0.02 0.02 + + + -2.00434 -1.00164 0.975465 + 0.0033 0.0073 0.0003 + true + -y + + + + + + + + 1 1 1 + + -2.00434 -1.00164 0.975465 0.0033 0.0073 0.0003 + + false + + 4 + + 0.025 0.02 0.02 + + + -0.14015 -0.00628319 0.154985 + 0.0028 -0.2919 -0.0069 + true + all + + + + + + + + 1 1 1 + + -0.14015 -0.00628319 0.154985 0.0028 -0.2919 -0.0069 + + false + + 4 + + 0.016 + 0.05 + + + + + + + 1.534315 + 0 -0.181479 0 + 0.019281 + 0.001571 + 0.020062 + 0 + 0 + 0 + + + + + + + + + r_elbow_flex + + 0.04940001 0.03660001 0.99810825 + + + + 1 0 + + + + + + + + 0 1 0 + + + + 0 + + + + + + + + 0.99810825 0 -0.04940001 + + + + 0 + + + + + + + + + 1 0 0 + + + + 0 + + + + + + + + 0 1 0 + + + + 0 + + + + + + + + 0 0 1 + + + + 0 + + + + + r_humerus + 0.0061 -0.2904 -0.0123 + 0 0 0 + 0 0 0 + 0 0 0 + + + + + + rotational + + 0 + + 0 + + 0 2.26892803 + + false + + false + + + + + + + false + + + + + + + + + arm_r_ulna.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_radius.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_lunate.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_scaphoid.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_pisiform.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_triquetrum.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_capitate.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_trapezium.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_trapezoid.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_hamate.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_1mc.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_2mc.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_3mc.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_4mc.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_5mc.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_thumbprox.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_thumbdist.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_2proxph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_2midph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_2distph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_3proxph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_3midph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_3distph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_4proxph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_4midph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_4distph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_5proxph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_5midph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + arm_r_5distph.vtp + + 1 1 1 + + + + -0 0 -0 0 0 0 + + 1 1 1 + + 4 + + 1 + + + + + + 1 1 1 + + -0 0 -0 0 0 0 + + false + + 4 + + + + + + + + + + + + + + + + + + + + false + + 0 + + 1 + + + + + + -0.05365 -0.01373 0.14723 + ground + + + -0.02714 -0.11441 -0.00664 + r_humerus + + + -0.03184 -0.22637 -0.01217 + r_humerus + + + -0.01743 -0.26757 -0.01208 + r_humerus + + + -0.0219 0.01046 -0.00078 + r_ulna_radius_hand + + + + + + + + + + + + 1 1 1 + + -0 0 -0 0 0 0 + + false + + 4 + + + + + TRI + hybrid + -1 -1 + + + TRIlonghh + hybrid + -1 -1 + + + TRIlongglen + hybrid + -1 -1 + + + + + + + 1 + + 798.52 + + 0.134 + + 0.143 + + 0.20943951 + + 10 + + 0.01 + + 0.04 + + 0.033 + + 0.6 + + 0.5 + + 4 + + 0.3 + + 1.8 + + + + false + + 0 + + 1 + + + + + + -0.00599 -0.12646 0.00428 + r_humerus + + + -0.02344 -0.14528 0.00928 + r_humerus + + + -0.03184 -0.22637 -0.01217 + r_humerus + + + -0.01743 -0.26757 -0.01208 + r_humerus + + + -0.0219 0.01046 -0.00078 + r_ulna_radius_hand + + + + + + + + + + + + 1 1 1 + + -0 0 -0 0 0 0 + + false + + 4 + + + + + TRI + hybrid + -1 -1 + + + + + + + 1 + + 624.3 + + 0.1138 + + 0.098 + + 0.15707963 + + 10 + + 0.01 + + 0.04 + + 0.033 + + 0.6 + + 0.5 + + 4 + + 0.3 + + 1.8 + + + + false + + 0 + + 1 + + + + + + -0.00838 -0.13695 -0.00906 + r_humerus + + + -0.02601 -0.15139 -0.0108 + r_humerus + + + -0.03184 -0.22637 -0.01217 + r_humerus + + + -0.01743 -0.26757 -0.01208 + r_humerus + + + -0.0219 0.01046 -0.00078 + r_ulna_radius_hand + + + + + + + + + + + + 1 1 1 + + -0 0 -0 0 0 0 + + false + + 4 + + + + + TRI + hybrid + -1 -1 + + + + + + + 1 + + 624.3 + + 0.1138 + + 0.0908 + + 0.15707963 + + 10 + + 0.01 + + 0.04 + + 0.033 + + 0.6 + + 0.5 + + 4 + + 0.3 + + 1.8 + + + + false + + 0 + + 1 + + + + + + -0.039235 0.00347 0.14795 + ground + + + -0.028945 0.01391 0.15639 + ground + + + 0.02131 0.01793 0.01028 + r_humerus + + + 0.02378 -0.00511 0.01201 + r_humerus + + + 0.01345 -0.02827 0.00136 + r_humerus + + + 0.01068 -0.07736 -0.00165 + r_humerus + + + 0.01703 -0.12125 0.00024 + r_humerus + + + 0.0228 -0.1754 -0.0063 + r_humerus + + + 0.00751 -0.04839 0.02179 + r_ulna_radius_hand + + + + + + + + + + + + 1 1 1 + + -0 0 -0 0 0 0 + + false + + 4 + + + + + BIClonghh + hybrid + 2 3 + + + + + + + 1 + + 624.3 + + 0.1157 + + 0.2723 + + 0 + + 10 + + 0.01 + + 0.04 + + 0.033 + + 0.6 + + 0.5 + + 4 + + 0.3 + + 1.8 + + + + false + + 0 + + 1 + + + + + + 0.004675 -0.01231 0.13475 + ground + + + -0.007075 -0.04004 0.14507 + ground + + + 0.01117 -0.07576 -0.01101 + r_humerus + + + 0.01703 -0.12125 -0.01079 + r_humerus + + + 0.0228 -0.1754 -0.0063 + r_humerus + + + 0.00751 -0.04839 0.02179 + r_ulna_radius_hand + + + + + + + + + + + + 1 1 1 + + -0 0 -0 0 0 0 + + false + + 4 + + + + + + + + 1 + + 435.56 + + 0.1321 + + 0.1923 + + 0 + + 10 + + 0.01 + + 0.04 + + 0.033 + + 0.6 + + 0.5 + + 4 + + 0.3 + + 1.8 + + + + false + + 0 + + 1 + + + + + + 0.0068 -0.1739 -0.0036 + r_humerus + + + -0.0032 -0.0239 0.0009 + r_ulna_radius_hand + + + + + + + + + + + + 1 1 1 + + -0 0 -0 0 0 0 + + false + + 4 + + + + + TRI + hybrid + -1 -1 + + + + + + + 1 + + 987.26 + + 0.0858 + + 0.0535 + + 0 + + 10 + + 0.01 + + 0.04 + + 0.033 + + 0.6 + + 0.5 + + 4 + + 0.3 + + 1.8 + + + + + + + + + + ground + + -0.01256 0.04 0.17 + + false + + + + r_humerus + + 0.005 -0.2904 0.03 + + false + + + + r_ulna_radius_hand + + -0.0011 -0.23559 0.0943 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OpenSim/Examples/StaticOptimizationExample/arm26_InverseKinematics.mot b/OpenSim/Examples/StaticOptimizationExample/arm26_InverseKinematics.mot new file mode 100644 index 0000000000..4482dc0d80 --- /dev/null +++ b/OpenSim/Examples/StaticOptimizationExample/arm26_InverseKinematics.mot @@ -0,0 +1,133 @@ +inverse kinematics +nRows=121 +nColumns=12 + +# SIMM Motion File Header: +name inverse kinematics +datacolumns 12 +datarows 121 +otherdata 1 +range 0.000000 1.000000 +endheader +time r_shoulder_elev r_elbow_flex r_acromion_tx r_acromion_ty r_acromion_tz r_humerus_epicondyle_tx r_humerus_epicondyle_ty r_humerus_epicondyle_tz r_radius_styloid_tx r_radius_styloid_ty r_radius_styloid_tz + 0.00000000 -0.36571172 0.89932091 -0.01305452 0.03950548 0.16950548 -0.01255938 -0.29741438 0.19998562 -0.01312468 -0.53356968 0.25142032 + 0.00833333 -0.34635835 0.92606446 -0.01296065 0.03959935 0.16959935 -0.01256732 -0.29742232 0.19997768 -0.01286702 -0.53360038 0.25138255 + 0.01666667 -0.33196550 0.95466896 -0.01285343 0.03970657 0.16970657 -0.01257439 -0.29742939 0.19997061 -0.01258261 -0.53362982 0.25134502 + 0.02500000 -0.31486548 0.98516023 -0.01273643 0.03982357 0.16982357 -0.01258031 -0.29743531 0.19996469 -0.01224700 -0.53365833 0.25130658 + 0.03333333 -0.34958635 1.16797448 -0.01261356 0.03994644 0.16994644 -0.01258485 -0.29743985 0.19996015 -0.01183747 -0.53368607 0.25126617 + 0.04166667 -0.32091242 1.18102966 -0.01248890 0.04007110 0.17007110 -0.01258782 -0.29744282 0.19995718 -0.01133375 -0.53371292 0.25122284 + 0.05000000 -0.27147880 1.21348294 -0.01236661 0.04019339 0.17019339 -0.01258911 -0.29744411 0.19995589 -0.01071857 -0.53373847 0.25117577 + 0.05833333 -0.29593672 1.45165354 -0.01225076 0.04030924 0.17030924 -0.01258868 -0.29744368 0.19995632 -0.00997806 -0.53376194 0.25112427 + 0.06666667 -0.23255294 1.48542215 -0.01214522 0.04041478 0.17041478 -0.01258653 -0.29744153 0.19995847 -0.00910189 -0.53378220 0.25106785 + 0.07500000 -0.24906631 1.77076571 -0.01205349 0.04050651 0.17050651 -0.01258276 -0.29743776 0.19996224 -0.00808330 -0.53379774 0.25100613 + 0.08333333 -0.16473664 1.81603600 -0.01197863 0.04058137 0.17058137 -0.01257751 -0.29743251 0.19996749 -0.00691885 -0.53380669 0.25093892 + 0.09166667 -0.20303900 2.23239981 -0.01192314 0.04063686 0.17063686 -0.01257098 -0.29742598 0.19997402 -0.00560804 -0.53380691 0.25086614 + 0.10000000 -0.09914484 2.30366584 -0.01188886 0.04067114 0.17067114 -0.01256343 -0.29741843 0.19998157 -0.00415286 -0.53379600 0.25078780 + 0.10833333 -0.16279847 2.84960286 -0.01187693 0.04068307 0.17068307 -0.01255517 -0.29741017 0.19998983 -0.00255714 -0.53377143 0.25070403 + 0.11666667 -0.14515615 3.21583550 -0.01188776 0.04067224 0.17067224 -0.01254650 -0.29740150 0.19999850 -0.00082605 -0.53373051 0.25061499 + 0.12500000 -0.12953200 3.61836241 -0.01192099 0.04063901 0.17063901 -0.01253778 -0.29739278 0.20000722 0.00103459 -0.53367055 0.25052087 + 0.13333333 -0.11559872 4.05556346 -0.01197549 0.04058451 0.17058451 -0.01252933 -0.29738433 0.20001567 0.00301876 -0.53358881 0.25042188 + 0.14166667 -0.10321086 4.52565937 -0.01204947 0.04051053 0.17051053 -0.01252151 -0.29737651 0.20002349 0.00512072 -0.53348253 0.25031818 + 0.15000000 -0.09222400 5.02703208 -0.01214045 0.04041955 0.17041955 -0.01251460 -0.29736960 0.20003040 0.00733533 -0.53334896 0.25020993 + 0.15833333 -0.08250693 5.55831114 -0.01224541 0.04031459 0.17031459 -0.01250888 -0.29736388 0.20003612 0.00965821 -0.53318529 0.25009722 + 0.16666667 -0.07394526 6.11840519 -0.01236085 0.04019915 0.17019915 -0.01250458 -0.29735958 0.20004042 0.01208588 -0.53298865 0.24998010 + 0.17500000 -0.06643992 6.70649281 -0.01248292 0.04007708 0.17007708 -0.01250187 -0.29735687 0.20004313 0.01461569 -0.53275611 0.24985856 + 0.18333333 -0.05990367 7.32198529 -0.01260756 0.03995244 0.16995244 -0.01250084 -0.29735584 0.20004416 0.01724570 -0.53248458 0.24973256 + 0.19166667 -0.05425688 7.96447193 -0.01273061 0.03982939 0.16982939 -0.01250154 -0.29735654 0.20004346 0.01997452 -0.53217087 0.24960202 + 0.20000000 -0.04942385 8.63365713 -0.01284798 0.03971202 0.16971202 -0.01250395 -0.29735895 0.20004105 0.02280103 -0.53181166 0.24946683 + 0.20833333 -0.04532973 9.32929686 -0.01295576 0.03960424 0.16960424 -0.01250797 -0.29736297 0.20003703 0.02572420 -0.53140351 0.24932687 + 0.21666667 -0.04189845 10.05114077 -0.01305036 0.03950964 0.16950964 -0.01251344 -0.29736844 0.20003156 0.02874286 -0.53094288 0.24918203 + 0.22500000 -0.03905156 10.79888459 -0.01312862 0.03943138 0.16943138 -0.01252014 -0.29737514 0.20002486 0.03185548 -0.53042620 0.24903219 + 0.23333333 -0.03670794 11.57213586 -0.01318794 0.03937206 0.16937206 -0.01252782 -0.29738282 0.20001718 0.03506007 -0.52984985 0.24887726 + 0.24166667 -0.03478428 12.37039415 -0.01322634 0.03933366 0.16933366 -0.01253617 -0.29739117 0.20000883 0.03835410 -0.52921028 0.24871718 + 0.25000000 -0.03319728 13.19304609 -0.01324255 0.03931745 0.16931745 -0.01254487 -0.29739987 0.20000013 0.04173442 -0.52850399 0.24855191 + 0.25833333 -0.03185968 14.03936873 -0.01323603 0.03932397 0.16932397 -0.01255357 -0.29740857 0.19999143 0.04519735 -0.52772763 0.24838144 + 0.26666667 -0.03069339 14.90855355 -0.01320698 0.03935302 0.16935302 -0.01256194 -0.29741694 0.19998306 0.04873870 -0.52687796 0.24820580 + 0.27500000 -0.02962037 15.79972240 -0.01315638 0.03940362 0.16940362 -0.01256964 -0.29742464 0.19997536 0.05235386 -0.52595193 0.24802501 + 0.28333333 -0.02857033 16.71195763 -0.01308592 0.03947408 0.16947408 -0.01257638 -0.29743138 0.19996862 0.05603789 -0.52494667 0.24783914 + 0.29166667 -0.02748165 17.64432766 -0.01299794 0.03956206 0.16956206 -0.01258189 -0.29743689 0.19996311 0.05978563 -0.52385949 0.24764827 + 0.30000000 -0.02630303 18.59591055 -0.01289537 0.03966463 0.16966463 -0.01258595 -0.29744095 0.19995905 0.06359178 -0.52268789 0.24745248 + 0.30833333 -0.02499484 19.56581269 -0.01278164 0.03977836 0.16977836 -0.01258841 -0.29744341 0.19995659 0.06745099 -0.52142956 0.24725187 + 0.31666667 -0.02352997 20.55318161 -0.01266051 0.03989949 0.16989949 -0.01258916 -0.29744416 0.19995584 0.07135787 -0.52008236 0.24704652 + 0.32500000 -0.02189415 21.55721255 -0.01253604 0.04002396 0.17002396 -0.01258819 -0.29744319 0.19995681 0.07530707 -0.51864431 0.24683656 + 0.33333333 -0.02008570 22.57714903 -0.01241237 0.04014763 0.17014763 -0.01258552 -0.29744052 0.19995948 0.07929325 -0.51711365 0.24662207 + 0.34166667 -0.01811476 23.61227859 -0.01229362 0.04026638 0.17026638 -0.01258127 -0.29743627 0.19996373 0.08331112 -0.51548874 0.24640318 + 0.35000000 -0.01600203 24.66192465 -0.01218374 0.04037626 0.17037626 -0.01257559 -0.29743059 0.19996941 0.08735537 -0.51376820 0.24617999 + 0.35833333 -0.01377704 25.72543625 -0.01208639 0.04047361 0.17047361 -0.01256872 -0.29742372 0.19997628 0.09142070 -0.51195081 0.24595261 + 0.36666667 -0.01147607 26.80217652 -0.01200482 0.04055518 0.17055518 -0.01256091 -0.29741591 0.19998409 0.09550181 -0.51003558 0.24572119 + 0.37500000 -0.00913992 27.89151149 -0.01194174 0.04061826 0.17061826 -0.01255249 -0.29740749 0.19999251 0.09959332 -0.50802176 0.24548586 + 0.38333333 -0.00681148 28.99279965 -0.01189925 0.04066075 0.17066075 -0.01254376 -0.29739876 0.20000124 0.10368986 -0.50590888 0.24524677 + 0.39166667 -0.00453331 30.10538322 -0.01187878 0.04068122 0.17068122 -0.01253509 -0.29739009 0.20000991 0.10778597 -0.50369672 0.24500407 + 0.40000000 -0.00234534 31.22858097 -0.01188099 0.04067901 0.17067901 -0.01252681 -0.29738181 0.20001819 0.11187620 -0.50138532 0.24475794 + 0.40833333 -0.00028285 32.36168290 -0.01190583 0.04065417 0.17065417 -0.01251923 -0.29737423 0.20002577 0.11595504 -0.49897507 0.24450857 + 0.41666667 0.00162535 33.50394664 -0.01195245 0.04060755 0.17060755 -0.01251267 -0.29736767 0.20003233 0.12001699 -0.49646663 0.24425615 + 0.42500000 0.00335832 34.65459541 -0.01201931 0.04054069 0.17054069 -0.01250738 -0.29736238 0.20003762 0.12405656 -0.49386096 0.24400089 + 0.43333333 0.00490388 35.81282221 -0.01210419 0.04045581 0.17045581 -0.01250356 -0.29735856 0.20004144 0.12806829 -0.49115935 0.24374301 + 0.44166667 0.00625921 36.97779498 -0.01220424 0.04035576 0.17035576 -0.01250136 -0.29735636 0.20004364 0.13204683 -0.48836337 0.24348273 + 0.45000000 0.00743086 38.14865791 -0.01231615 0.04024385 0.17024385 -0.01250087 -0.29735587 0.20004413 0.13598691 -0.48547488 0.24322029 + 0.45833333 0.00843440 39.32453349 -0.01243617 0.04012383 0.17012383 -0.01250212 -0.29735712 0.20004288 0.13988337 -0.48249601 0.24295593 + 0.46666667 0.00929366 40.50452568 -0.01256033 0.03999967 0.16999967 -0.01250504 -0.29736004 0.20003996 0.14373121 -0.47942919 0.24268989 + 0.47500000 0.01003957 41.68772348 -0.01268447 0.03987553 0.16987553 -0.01250953 -0.29736453 0.20003547 0.14752556 -0.47627713 0.24242242 + 0.48333333 0.01070875 42.87320520 -0.01280446 0.03975554 0.16975554 -0.01251541 -0.29737041 0.20002959 0.15126172 -0.47304280 0.24215378 + 0.49166667 0.01134191 44.06004303 -0.01291632 0.03964368 0.16964368 -0.01252245 -0.29737745 0.20002255 0.15493517 -0.46972942 0.24188421 + 0.50000000 0.01198206 45.24730749 -0.01301630 0.03954370 0.16954370 -0.01253037 -0.29738537 0.20001463 0.15854159 -0.46634048 0.24161399 + 0.50833333 0.01267270 46.43407232 -0.01310109 0.03945891 0.16945891 -0.01253887 -0.29739387 0.20000613 0.16207688 -0.46287969 0.24134337 + 0.51666667 0.01345596 47.61941862 -0.01316785 0.03939215 0.16939215 -0.01254760 -0.29740260 0.19999740 0.16553716 -0.45935101 0.24107261 + 0.52500000 0.01437089 48.80243902 -0.01321436 0.03934564 0.16934564 -0.01255624 -0.29741124 0.19998876 0.16891877 -0.45575859 0.24080197 + 0.53333333 0.01545184 49.98224116 -0.01323908 0.03932092 0.16932092 -0.01256443 -0.29741943 0.19998057 0.17221831 -0.45210681 0.24053171 + 0.54166667 0.01672706 51.15795063 -0.01324117 0.03931883 0.16931883 -0.01257186 -0.29742686 0.19997314 0.17543264 -0.44840022 0.24026209 + 0.55000000 0.01821759 52.32871326 -0.01322058 0.03933942 0.16933942 -0.01257824 -0.29743324 0.19996676 0.17855889 -0.44464355 0.23999336 + 0.55833333 0.01993625 53.49369685 -0.01317798 0.03938202 0.16938202 -0.01258332 -0.29743832 0.19996168 0.18159446 -0.44084166 0.23972577 + 0.56666667 0.02188715 54.65209201 -0.01311480 0.03944520 0.16944520 -0.01258690 -0.29744190 0.19995810 0.18453702 -0.43699960 0.23945956 + 0.57500000 0.02406536 55.80311241 -0.01303314 0.03952686 0.16952686 -0.01258883 -0.29744383 0.19995617 0.18738455 -0.43312250 0.23919498 + 0.58333333 0.02645693 56.94599452 -0.01293572 0.03962428 0.16962428 -0.01258904 -0.29744405 0.19995595 0.19013529 -0.42921562 0.23893226 + 0.59166667 0.02903926 58.07999661 -0.01282578 0.03973422 0.16973422 -0.01258753 -0.29744253 0.19995747 0.19278781 -0.42528429 0.23867162 + 0.60000000 0.03178161 59.20440250 -0.01270699 0.03985301 0.16985301 -0.01258436 -0.29743936 0.19996064 0.19534094 -0.42133392 0.23841329 + 0.60833333 0.03464610 60.31852459 -0.01258330 0.03997670 0.16997670 -0.01257964 -0.29743464 0.19996536 0.19779387 -0.41736991 0.23815746 + 0.61666667 0.03758875 61.42170168 -0.01245884 0.04010116 0.17010116 -0.01257356 -0.29742856 0.19997144 0.20014607 -0.41339769 0.23790435 + 0.62500000 0.04056077 62.51329589 -0.01233775 0.04022225 0.17022225 -0.01256636 -0.29742136 0.19997864 0.20239731 -0.40942265 0.23765413 + 0.63333333 0.04350995 63.59268878 -0.01222406 0.04033594 0.17033594 -0.01255833 -0.29741333 0.19998667 0.20454767 -0.40545016 0.23740699 + 0.64166667 0.04638226 64.65927586 -0.01212156 0.04043844 0.17043844 -0.01254978 -0.29740478 0.19999522 0.20659748 -0.40148555 0.23716308 + 0.65000000 0.04912336 65.71246042 -0.01203366 0.04052634 0.17052634 -0.01254103 -0.29739603 0.20000397 0.20854735 -0.39753414 0.23692258 + 0.65833333 0.05168016 66.75164583 -0.01196330 0.04059670 0.17059670 -0.01253244 -0.29738744 0.20001256 0.21039814 -0.39360118 0.23668561 + 0.66666667 0.05400236 67.77622719 -0.01191281 0.04064719 0.17064719 -0.01252435 -0.29737935 0.20002065 0.21215091 -0.38969195 0.23645234 + 0.67500000 0.05604381 68.78558259 -0.01188388 0.04067612 0.17067612 -0.01251706 -0.29737206 0.20002794 0.21380696 -0.38581170 0.23622289 + 0.68333333 0.06979236 69.77100245 -0.01187747 0.04068253 0.17068253 -0.01251087 -0.29736587 0.20003413 0.21536776 -0.38196571 0.23599740 + 0.69166667 0.06806868 70.75126662 -0.01189380 0.04066620 0.17066620 -0.01250602 -0.29736102 0.20003898 0.21683498 -0.37815928 0.23577600 + 0.70000000 0.06770480 71.71218515 -0.01193232 0.04062768 0.17062768 -0.01250269 -0.29735769 0.20004231 0.21821046 -0.37439776 0.23555882 + 0.70833333 0.06690687 72.65507471 -0.01199174 0.04056826 0.17056826 -0.01250102 -0.29735602 0.20004398 0.21949622 -0.37068650 0.23534597 + 0.71666667 0.06584502 73.57897612 -0.01207010 0.04048990 0.17048990 -0.01250108 -0.29735608 0.20004392 0.22069445 -0.36703086 0.23513758 + 0.72500000 0.06449404 74.48314039 -0.01216477 0.04039523 0.17039523 -0.01250285 -0.29735785 0.20004215 0.22180755 -0.36343612 0.23493376 + 0.73333333 0.06285762 75.36679895 -0.01227261 0.04028739 0.17028739 -0.01250628 -0.29736128 0.20003872 0.22283809 -0.35990746 0.23473462 + 0.74166667 0.06094491 76.22920866 -0.01239002 0.04016998 0.17016998 -0.01251123 -0.29736623 0.20003377 0.22378885 -0.35644981 0.23454024 + 0.75000000 0.05877203 77.06967336 -0.01251309 0.04004691 0.17004691 -0.01251750 -0.29737250 0.20002750 0.22466280 -0.35306781 0.23435070 + 0.75833333 0.05636103 77.88756761 -0.01263773 0.03992227 0.16992227 -0.01252484 -0.29737984 0.20002016 0.22546310 -0.34976566 0.23416605 + 0.76666667 0.05373876 78.68235732 -0.01275978 0.03980022 0.16980022 -0.01253298 -0.29738798 0.20001202 0.22619307 -0.34654709 0.23398632 + 0.77500000 0.05093576 79.45361444 -0.01287517 0.03968483 0.16968483 -0.01254159 -0.29739659 0.20000341 0.22685619 -0.34341525 0.23381151 + 0.78333333 0.04798497 80.20102266 -0.01298006 0.03957994 0.16957994 -0.01255033 -0.29740533 0.19999467 0.22745603 -0.34037273 0.23364162 + 0.79166667 0.04492049 80.92437184 -0.01307096 0.03948904 0.16948904 -0.01255886 -0.29741386 0.19998614 0.22799621 -0.33742155 0.23347660 + 0.80000000 0.04177628 81.62353969 -0.01314484 0.03941516 0.16941516 -0.01256685 -0.29742185 0.19997815 0.22848037 -0.33456327 0.23331641 + 0.80833333 0.03858497 82.29846098 -0.01319924 0.03936076 0.16936076 -0.01257398 -0.29742898 0.19997102 0.22891211 -0.33179911 0.23316099 + 0.81666667 0.03537668 82.94908527 -0.01323235 0.03932765 0.16932765 -0.01257998 -0.29743498 0.19996502 0.22929492 -0.32913014 0.23301028 + 0.82500000 0.03217802 83.57532672 -0.01324306 0.03931694 0.16931694 -0.01258461 -0.29743961 0.19996039 0.22963221 -0.32655748 0.23286425 + 0.83333333 0.02901118 84.17701009 -0.01323102 0.03932898 0.16932898 -0.01258768 -0.29744268 0.19995732 0.22992720 -0.32408258 0.23272287 + 0.84166667 0.02589322 84.75381918 -0.01319663 0.03936337 0.16936337 -0.01258908 -0.29744408 0.19995592 0.23018300 -0.32170738 0.23258614 + 0.85000000 0.02283563 85.30525356 -0.01314103 0.03941897 0.16941897 -0.01258876 -0.29744376 0.19995624 0.23040254 -0.31943456 0.23245411 + 0.85833333 0.01984394 85.83060080 -0.01306607 0.03949393 0.16949393 -0.01258672 -0.29744172 0.19995828 0.23058864 -0.31726762 0.23232686 + 0.86666667 0.01691778 86.32892998 -0.01297426 0.03958574 0.16958574 -0.01258304 -0.29743804 0.19996196 0.23074402 -0.31521095 0.23220452 + 0.87500000 0.01405106 86.79911086 -0.01286865 0.03969135 0.16969135 -0.01257787 -0.29743287 0.19996713 0.23087130 -0.31326970 0.23208723 + 0.88333333 0.01123241 87.23986240 -0.01275276 0.03980724 0.16980724 -0.01257142 -0.29742642 0.19997358 0.23097310 -0.31144964 0.23197518 + 0.89166667 0.00844590 87.64983004 -0.01263045 0.03992955 0.16992955 -0.01256393 -0.29741893 0.19998107 0.23105197 -0.30975681 0.23186856 + 0.90000000 0.00567191 88.02769033 -0.01250579 0.04005421 0.17005421 -0.01255570 -0.29741070 0.19998930 0.23111047 -0.30819707 0.23176755 + 0.90833333 0.00288819 88.37227703 -0.01238294 0.04017706 0.17017706 -0.01254705 -0.29740205 0.19999795 0.23115111 -0.30677559 0.23167233 + 0.91666667 0.00007104 88.68272162 -0.01226599 0.04029401 0.17029401 -0.01253832 -0.29739332 0.20000668 0.23117637 -0.30549626 0.23158301 + 0.92500000 -0.00280345 88.95859798 -0.01215882 0.04040118 0.17040118 -0.01252985 -0.29738485 0.20001515 0.23118860 -0.30436106 0.23149965 + 0.93333333 -0.00575814 89.20006062 -0.01206503 0.04049497 0.17049497 -0.01252197 -0.29737697 0.20002303 0.23119006 -0.30336953 0.23142223 + 0.94166667 -0.00881334 89.40796412 -0.01198771 0.04057229 0.17057229 -0.01251500 -0.29737000 0.20003000 0.23118280 -0.30251825 0.23135060 + 0.95000000 -0.01198637 89.58395452 -0.01192947 0.04063053 0.17063053 -0.01250920 -0.29736420 0.20003580 0.23116869 -0.30180044 0.23128455 + 0.95833333 0.01890233 89.64605129 -0.01189222 0.04066778 0.17066778 -0.01250481 -0.29735981 0.20004019 0.23114936 -0.30120580 0.23122369 + 0.96666667 -0.02746879 89.85716098 -0.01187722 0.04068278 0.17068278 -0.01250199 -0.29735699 0.20004301 0.23112621 -0.30072042 0.23116756 + 0.97500000 -0.00118994 89.89484427 -0.01188496 0.04067504 0.17067504 -0.01250085 -0.29735585 0.20004415 0.23110044 -0.30032702 0.23111556 + 0.98333333 -0.00677497 89.99446345 -0.01191519 0.04064481 0.17064481 -0.01250145 -0.29735645 0.20004355 0.23107306 -0.30000530 0.23106698 + 0.99166667 -0.02953557 90.10080868 -0.01196690 0.04059310 0.17059310 -0.01250375 -0.29735875 0.20004125 0.23104492 -0.29973250 0.23102105 + 1.00000000 -0.02356660 90.10762135 -0.01203836 0.04052164 0.17052164 -0.01250767 -0.29736267 0.20003733 0.23101676 -0.29948414 0.23097691 diff --git a/OpenSim/Examples/StaticOptimizationExample/arm26_Setup_StaticOptimization.xml b/OpenSim/Examples/StaticOptimizationExample/arm26_Setup_StaticOptimization.xml new file mode 100644 index 0000000000..595973176e --- /dev/null +++ b/OpenSim/Examples/StaticOptimizationExample/arm26_Setup_StaticOptimization.xml @@ -0,0 +1,100 @@ + + + + + arm26.osim + + false + + + + Results + + 20 + + 0.0000000 + + 1.0000000 + + false + + 20000 + + 1.00000000 + + 0.00000001 + + 0.00001000 + + + + + + true + + 0.00000000 + + 1.00000000 + + 1 + + true + + true + + 2.00000000 + + true + + + + + + + + + + + + + + + arm26_InverseKinematics.mot + + + + 6.00000000 + + +