I've just started working with MOCO in OpenSim, and I'm running into an issue with a colleague's example. My colleague is using OpenSim version 4.4 and opensim-moco-4.4.1-py311np123 package.
When I tried to run her example, I encountered the following error messages:
Code: Select all
solver = helpers.configure_solver(study, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
solver = study.initCasADiSolver()
^^^^^^^^^^^^^^^^^^^^^^^^
return _moco.MocoStudy_initCasADiSolver(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: std::exception in 'OpenSim::MocoCasADiSolver & OpenSim::MocoStudy::initCasADiSolver()': Coordinate '/jointset/ground_pelvis/pelvis_tilt' is locked, but Moco does not support locked coordinates. Consider replacing the joint for this coordinate with a WeldJoint instead.
Thrown at MocoProblemRep.cpp:93 in initialize().
Process finished with exit code 1
Now, I'm considering two possible solutions:
- Package Version Issue: I attempted to install the same package as my colleague (opensim-moco-4.4.1-py311np123 package), but when I run osim.GetVersionAndDate(), I get "version 4.5-2023-11-26-efcdfd3eb, build date 23:19:12 Nov 28 2023", which is unexpected. Could this version discrepancy be causing the issue?
- Joint Type Change: Should I follow the error message's recommendation to change the PinJoints to WeldJoints? This solution would alter the model, potentially leading to different solutions.