Hi everyone,
first of all thank you for the great work you did!
I was trying to follow the example "sit-to-stand " with some little variations. In particular, I'd like to use the results from the torque-driven predictive problem (in terms of coordinates and speeds) as initial guesses for the muscle-driven predictive problem.
The file "predictedSolution.sto" obviously does not contain values for muscle controls, but only for the controls of the torque actuators. If I use it as guess file in this form, I get the error "Java.lang.RuntimeException: Iterate and provided problem are not compatible" (which I expected).
I tried to manually modify the .sto file by removing labels for actuators controls or, alternatively, to add labels for muscle controls making sure that the numbers of states and controls matches between the .sto file and the model. It doesn't work either. (error: "java.lang.RuntimeException: Datatype 'double' is not supported.Thrown at STOFileAdapter.cpp:77 in createSTOFileAdapterForReading().").
Wrapping up I'd like to know:
1) what kind of file structure does the "setGuessFile()" accepts, and is there a way to properly obtain it?
2) if it's possible to pass through the "setGuessFile()" just coordinates and speed values and no muscle controls. In this case, would the solver automatically assigns initial guesses for muscle controls?
Thank you very much,
Matilde
Moco Prediction
- Christopher Dembia
- Posts: 506
- Joined: Fri Oct 12, 2012 4:09 pm
Re: Moco Prediction
The way we currently designed the setting of guesses is that we require strict compatibility. The guess must have a column for every variable in the problem. To help with this, we allow you to obtain a guess "template" by calling `solver.createGuess()`. This function also takes some arguments to choose the kind of guess you want, including a random guess. Then you can modify the guess returned by this function, using the variety of methods on MocoTrajectory such as setState() and insertStatesTrajectory().
- Matilde Tomasi
- Posts: 4
- Joined: Thu Jul 07, 2016 1:18 pm
Re: Moco Prediction
Thank you very much Christopher, I followed your instructions and it worked!
Matilde
Matilde