Error when attempting parameter optimisation in Matlab
Posted: Thu Jun 11, 2020 1:52 pm
Hi,
I've set up a MocoStudy tracking prescribed kinematics and minimising muscle activations as well as penalising deviations from reference control values in the cost term. This runs fine.
However, when I try to add a MocoParameter to optimise the max isometric force value for a muscle, like so:
I no longer see the usual output to the Matlab command window, rather this message is displayed over and over:
Old version storage/motion file encountered
.. assuming rotations in Degrees.
Then, eventually I get this error message:
Cheers
I've set up a MocoStudy tracking prescribed kinematics and minimising muscle activations as well as penalising deviations from reference control values in the cost term. This runs fine.
However, when I try to add a MocoParameter to optimise the max isometric force value for a muscle, like so:
Code: Select all
param = MocoParameter('tib_force', '/forceset/tib_ant_l', 'max_isometric_force', MocoBounds(100, 905));
problem.addParameter(param);
Old version storage/motion file encountered
.. assuming rotations in Degrees.
Then, eventually I get this error message:
Just wondering if anyone has any idea how to fix this as I can't immediately see how I've differed from the examples in the MocoParameter implementation?Java exception occurred:
java.lang.RuntimeException:
D:\a\opensim-moco\opensim-moco\dependencies\casadi\casadi\core\function_internal.cpp:137: Error calling
CallbackInternal::init for 'endpoint_constraint_initial_activation_endpoint':
D:\a\opensim-moco\opensim-moco\dependencies\casadi\casadi\core\callback_internal.cpp:77: Error calling
"get_jacobian_sparsity" for object endpoint_constraint_initial_activation_endpoint:
SimTK Exception thrown at MeasureImplementation.h:860:
Error detected by Simbody method Measure::Result::markAsValid(): This Result Measure cannot be marked
valid in a State where this measure's Subsystem has been realized only to stage Model, because its
value was declared to depend on stage Velocity. To mark it valid, we require that the State have been
realized at least to the previous stage (Position in this case); that is, you must at least be
*working on* the dependsOn stage in order to claim this result is available.
(Required condition 'subsystemStage >= getDependsOnStage().prev()' was not met.)
Cheers