opensim-org / opensim-moco

Solve optimal control problems for musculoskeletal models using OpenSim and direct collocation.
https://opensim.stanford.edu/moco
Apache License 2.0
58 stars 16 forks source link

Last value for gamma (velocity slack variable) may be NaN. #592

Open chrisdembia opened 4 years ago

chrisdembia commented 4 years ago

Reported by Aaron Fox; https://simtk.org/plugins/phpBB/viewtopicPhpbb.php?f=1815&t=11475&p=0&start=0&view=&sid=452a09f756d0bd25011e92d14e56da9a

aaronsfox commented 4 years ago

@chrisdembia I came across a potential factor related to this in creating a guess file (i.e. solver.createGuess()). I ran into no problems when using a mesh interval of 50 - a guess was created with the 101 nodes and the gamma values were all zeros. I ran into an error when upscaling this to a mesh interval of 100, whereby the 201 nodes were in the guess and the last gamma values were nan's. This is probably related to my solution examples as all of those where nan's occurred had a mesh interval of 100