Distance Constraint Pairs with OMOCO files

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
Russell Johnson
Posts: 14
Joined: Sun Dec 23, 2012 5:10 pm

Distance Constraint Pairs with OMOCO files

Post by Russell Johnson » Wed Sep 06, 2023 2:38 pm

Hi All,

I'm trying to run Moco optimizations that are loaded in from an .OMOCO file for 3-D gait simulations. When I do this in MATLAB, I get a warning message that looks like the image below:
ignoring moco frame pairs 2.PNG
ignoring moco frame pairs 2.PNG (26.19 KiB) Viewed 598 times
It seems like when I run an optimization without loading the .OMOCO file - instead using MATLAB code to generate the study, these constraints are not ignored. There's no difference between the code in these two methods - in one case I save the OMOCO file before loading it to run on another computer and in the other case the code runs the study directly.

Is there any reason why the .OMOCO file won't work for the Moco distance constraint pairs?

Thanks,
Russell

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

Re: Distance Constraint Pairs with OMOCO files

Post by Nicholas Bianco » Fri Sep 08, 2023 9:23 am

Hi Russell,

Nothing is wrong on your end, it just seems that we don't support deserialization (i.e., file reading) for MocoFrameDistanceConstraintPair. I created to capture this bug: https://github.com/opensim-org/opensim-core/issues/3542.

-Nick

User avatar
Russell Johnson
Posts: 14
Joined: Sun Dec 23, 2012 5:10 pm

Re: Distance Constraint Pairs with OMOCO files

Post by Russell Johnson » Sat Sep 09, 2023 10:13 am

Thanks for the help Nick! I'll find a workaround for now.
Russell

POST REPLY