Hi all,
I'm trying to use Moco on the upper-extremity model: https://simtk.org/frs/?group_id=657 to do a predictive simulation in Python.
However Moco does not converge and I get the error:
RuntimeError: std::exception in 'void OpenSim::MocoTrajectory::write(std::string const &) const': This trajectory is sealed, to force you to acknowledge the solver failed; call unseal() to gain access
When I change the code to unseal (i.e., predictSolution = study.solve().unseal()), I get a segmentation error.
I'm wondering if the upper-extremity model doesn't work with Moco for some reason? Also, is Ross Miller's walking code the best example of a predictive simulation with a musculoskeletal model (I haven't found other examples, so I just wanted to make sure I'm not overlooking something else).
Thanks,
Mazen
Moco with Upper-Extremity
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Moco with Upper-Extremity
Hey Mazen,
For some reason, in Python you need to call "unseal()" in a separate line:
I'm still not sure why this is the case, but an easy fix nevertheless.
In addition to Ross' stuff, you can check example2DWalking that is packaged with Moco for another predictive walking example.
Best,
Nick
For some reason, in Python you need to call "unseal()" in a separate line:
Code: Select all
solution = study.solve()
solutionUnsealed = solution.unseal()
In addition to Ross' stuff, you can check example2DWalking that is packaged with Moco for another predictive walking example.
Best,
Nick
- Mazen Al Borno
- Posts: 3
- Joined: Mon Mar 14, 2016 6:20 pm
Re: Moco with Upper-Extremity
Thanks so much. I was able to visualize my non-converged solution this way.
all the best,
Mazen
all the best,
Mazen
- Ross Miller
- Posts: 375
- Joined: Tue Sep 22, 2009 2:02 pm
Re: Moco with Upper-Extremity
My code is an elaborate version of the example2Dwalking code. I started from that and added things to it, but it's not fundamentally different from that example.
Ross
Ross