Page 1 of 1

casVector error thrown in exampleMocoTrack.py

Posted: Mon Sep 27, 2021 8:17 am
by rileye
Hi there,

When trying to run the Moco example script, exampleMocoTrack.py included in the OpenSim docker container (https://hub.docker.com/r/stanfordnmbl/o ... st_updated) it seems to throw an error stating:

```std::exception in 'OpenSim::MocoSolution OpenSim::MocoTrack::solveAndVisualize()': casVector should be 1-dimensional, but has size 0 x 0.
Thrown at MocoCasOCProblem.h:108 in convertToSimTKVector().```

I am unsure why this is being thrown and/or how to correct it, especially since this is in an example script. I would appreciate any feedback on the issue.

Cheers,

Riley

Re: casVector error thrown in exampleMocoTrack.py

Posted: Mon Sep 27, 2021 1:37 pm
by nbianco
Hi Riley,

Thanks for pointing out this issue. I've seen this issue before (usually has something to do with the initial guess not being compatible with the problem), but I'm not sure why it's happening in this example. Does this example work when running it from the normal SimTK OpenSim download?

Best,
-Nick

Re: casVector error thrown in exampleMocoTrack.py

Posted: Tue Sep 28, 2021 8:22 am
by rileye
Hi Nick,

Thanks for your input. I have not tried it any other way besides via the docker container using Moco.

Cheers,

Riley