Not Obtaining New Mass Distribution When Scaling

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Stephen Riutta
Posts: 20
Joined: Wed May 23, 2012 3:55 pm

Not Obtaining New Mass Distribution When Scaling

Post by Stephen Riutta » Wed Feb 20, 2013 4:25 pm

Hello,

Because of a subject's unique anthropometry, I would like to scale Sam Hamner's running model with a new mass distribution. I set the new subject mass and new scale factors with the scale tool (Version 3.0). However, the resulting scaled model has the same mass distribution as the original model regardless of whether the "Preserve mass distribution during scale" box is checked or unchecked. The geometry of the segments does scale correctly.

I've also tested this with large (non-physical) scale factors such as 1.5, and the mass distribution is still unchanged.

Does anyone else get a new mass distribution with new scale factors? If so, any ideas on what I'm doing wrong?

Thanks,

Stephen

User avatar
David John Saxby
Posts: 83
Joined: Mon May 09, 2011 8:39 pm

Re: Not Obtaining New Mass Distribution When Scaling

Post by David John Saxby » Mon Feb 25, 2013 11:27 pm

Hey,

May be a bug. Are you in v3.0 or the beta?
Either way, you can load the Osim model into a Mat structure and edit the inertia manually or through a function. A bit annoying though.

DJS

User avatar
Stephen Riutta
Posts: 20
Joined: Wed May 23, 2012 3:55 pm

Re: Not Obtaining New Mass Distribution When Scaling

Post by Stephen Riutta » Tue Feb 26, 2013 2:03 pm

Hi,

Thanks for the response. I'm using the standard (non-beta) version of 3.0. I've also tried doing the scaling via the command prompt, but got the same results.

I've been modifying the mass and inertia through the XML file and through the GUI. I'm interested in modifying the mass and inertia through the Mat structure though. Do I obtain this through the API?

Regards,

Stephen

User avatar
Ayman Habib
Posts: 2252
Joined: Fri Apr 01, 2005 12:24 pm

Re: Not Obtaining New Mass Distribution When Scaling

Post by Ayman Habib » Tue Feb 26, 2013 4:56 pm

Thanks Stephen,

Indeed the bug has been found and fixed and will show in the next release. For now you'll need to edit the scaled model in the GUI and update mass properties. There're helper methods to get/setInertia using an "ArrayDouble" that you can use for now.

Best regards,
-Ayman

User avatar
David John Saxby
Posts: 83
Joined: Mon May 09, 2011 8:39 pm

Re: Not Obtaining New Mass Distribution When Scaling

Post by David John Saxby » Tue Feb 26, 2013 5:02 pm

Stephen,

If you go the link below you'll find code developed by Tim Dorn (maybe extended based on other work, don't know the legacy of the code).

https://simtk.org/project/xml/downloads ... kage_id851

These functions allow you to read in Osim models into Matlab and edit the components of the model, including features such as inertia. You can then write the Mat structures back to Osim and then bob's your uncle.

Best,

David

User avatar
Stephen Riutta
Posts: 20
Joined: Wed May 23, 2012 3:55 pm

Re: Not Obtaining New Mass Distribution When Scaling

Post by Stephen Riutta » Wed Feb 27, 2013 9:09 am

Hello,

David, thanks for letting me know about that toolbox. I'll certainly try that out.

Ayman, I'm looking forward to trying out the scaling tool when the next version is released. It's great to hear the bug has been fixed.

Regards,

Stephen

POST REPLY