casVector error thrown in exampleMocoTrack.py

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Riley Edmonds
Posts: 8
Joined: Tue May 11, 2021 10:43 am

casVector error thrown in exampleMocoTrack.py

Post by Riley Edmonds » Mon Sep 27, 2021 8:17 am

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

User avatar
Nicholas Bianco
Posts: 1056
Joined: Thu Oct 04, 2012 8:09 pm

Re: casVector error thrown in exampleMocoTrack.py

Post by Nicholas Bianco » Mon Sep 27, 2021 1:37 pm

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

User avatar
Riley Edmonds
Posts: 8
Joined: Tue May 11, 2021 10:43 am

Re: casVector error thrown in exampleMocoTrack.py

Post by Riley Edmonds » Tue Sep 28, 2021 8:22 am

Hi Nick,

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

Cheers,

Riley

POST REPLY