opensim-moco
opensim-moco copied to clipboard
MATLAB example fixes
Tested on Windows 10, MATLAB R2019a
exampleMarkerTracking10DOF
: set_weight doesn't exist for scripting
https://github.com/opensim-org/opensim-moco/blob/master/Moco/Bindings/Java/Matlab/Examples/exampleMarkerTracking10DOF/exampleMarkerTracking10DOF.m#L108
exampleSitToStand
: as noted in #481
exampleMocoTrack
: issue with muscleDrivenStateTracking()
with unseal()
, possibly related to #494? Error below:
MocoCasADiSolver did NOT succeed:
Invalid_Number_Detected
===============================================================================
Error using exampleMocoTrack>muscleDrivenStateTracking (line 194)
Java exception occurred:
java.lang.RuntimeException: This iterate is sealed, to force you to acknowledge the
solver failed; call unseal() to gain access.
Thrown at MocoTrajectory.cpp:1302 in ensureUnsealed().
at org.opensim.modeling.opensimMocoJNI.MocoStudy_visualize(Native Method)
at org.opensim.modeling.MocoStudy.visualize(MocoStudy.java:129)
Error in exampleMocoTrack (line 54)
muscleDrivenStateTracking();
I can definitely make quick fixes to the first two. Likely would need some direction about the third issue.
@carmichaelong just to clarify, you are calling unseal()
, as in study.solve().unseal()
? Per #494, it would be good to try both that and
solution = study.solve()
solutionUnsealed = solution.unseal()
study.visualize(solutionUnsealed)
@chrisdembia we should update that message to say This trajectory is sealed, to force you...
.
I didn't explicitly call unseal()
from MATLAB. I was running exampleMocoTrack
as is, and that error occurs, pointing at https://github.com/opensim-org/opensim-moco/blob/master/Moco/Bindings/Java/Matlab/Examples/exampleMocoTrack/exampleMocoTrack.m#L194
Maybe an unseal()
call needs to be added to the example then?
I think we shouldn't add unseal()
to any examples unless we are demonstrating unseal()
.
Invalid_Number_Detected
also occurred for me in the C++ example for the muscle driven part of ExampleMocoTrack
We need to disable tendon compliance for that example
Sorry I didn’t realize you were working on exampleMocoTrack. Use ModOpIgnoreTendonCompliance.