Wrapping object

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
Carlie Ede
Posts: 6
Joined: Mon Oct 01, 2018 8:48 am

Wrapping object

Post by Carlie Ede » Mon Nov 16, 2020 8:51 am

Hello,

Firstly, MOCO is a wonderful resource and thank you for all your work.

Building on some of the previous discussions on wrapping objects (apologies if this has already been noted elsewhere), it appears that ModOpReplaceMusclesWithDeGrooteFregly2016() does not carry over any wrapping object, and I was curious if there was any reason for this? When I print out a model from the ModelProcessor after replacing with the DeGrooteFregly muscle, the wrap objects are no longer in the model resulting in some strange moment arms.

When I manually include wrapping objects, as previously noted by Ross Miller, matlab stalls after the number of threads is displayed. When I set solver.set_parallel(0), my tracking problem solves with no issue, albeit a bit slower. I am using windows 10, matlab 2018a and MOCO 0.4.0.

So, my question is 1) have I missed something? 2) would you suggest not including wrapping objects in models used with MOCO or is an alternative solution?

Thank you
Carlie.

User avatar
Ross Miller
Posts: 375
Joined: Tue Sep 22, 2009 2:02 pm

Re: Wrapping object

Post by Ross Miller » Mon Nov 16, 2020 9:39 am

Hi Carlie,

I was never able to solve this issue. I ended up defining <ConditionalPathPoint> coordinates that approximate the wrapping, which seems to work well.

Are you using your own model or one of the ones I posted?

Many of the examples that come with Moco have wrapping objects and they run fine in parallel for me. It's a strange problem for sure.

Ross

User avatar
Carlie Ede
Posts: 6
Joined: Mon Oct 01, 2018 8:48 am

Re: Wrapping object

Post by Carlie Ede » Mon Nov 16, 2020 11:16 am

Hi Ross,

Currently I'm using a slightly modified planar version of the Lai et al., 2017 model, but the same behaviour has appeared with the example models as well.
When I use the model operator to replace the millard muscles with degrootefregly, The model runs fine in parallel, but the wrap objects are no longer included in the model when printed from the ModelProcessor, which then results in some strange moment arms during running. So I would suspect they are not being used in the moco problem?

maybe conditional path points are the way to go.

Thanks,
Carlie.

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

Re: Wrapping object

Post by Nicholas Bianco » Mon Nov 16, 2020 1:24 pm

Hi Carlie,

Yes, this is a known bug. After looking at some previous threads it seems like this could be a Mac specific bug. Are you using Windows or Mac? Also, you could test to see if this is a Moco issue or not by calling initSystem() on the model created after replacing the muscle set.

-Nick

User avatar
Carlie Ede
Posts: 6
Joined: Mon Oct 01, 2018 8:48 am

Re: Wrapping object

Post by Carlie Ede » Mon Nov 16, 2020 3:32 pm

Hi Nick,

I am working on windows 10.

After replacing the muscle set, an initSystem call is successful. I have previously being using the processed model to compute moment arms and have not had issues with those function.

Carlie.

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

Re: Wrapping object

Post by Nicholas Bianco » Tue Nov 17, 2020 6:21 pm

Ah, so it's not a Mac bug. Thanks for the info.

I'll need to investigate to see what the issue is here. Apologies for now, hopefully we can get this resolved soon.

POST REPLY