Page 1 of 1

RRA mass recomendation

Posted: Mon Jun 03, 2013 9:27 am
by andrewlapre
Hi, I am going through the tutorials for using RRA and it says "adjust the mass as recommended by the RRA Tool". I see that after I run the tool, the CoM changes, but I need to change the mass manually. The problem is that I don't know where this recommendation is. I've gone through the output files, but don't see anything. Any help would be appreciated!!

Thanks
Andy

Re: RRA mass recomendation

Posted: Mon Jun 03, 2013 12:47 pm
by brian
Hi Andy,

You should find the recommended mass changes in the Messages window in the GUI (not in the output files). I just ran RRA on a model and this is what was in the Messages window. Hope this helps,

Brian


************************************************************
* Summary of Mass Adjustments to Reduce Residuals *
************************************************************
* Body adjusted: torso
* Mass Center (COM) adjustment: dx =-0.0220163, dz =-0.0341405
* New COM location: ~[-0.0103753,0.34551,0.0341405]
************************************************************
* Recommended mass adjustments:
* Total mass change: 0.00962877
* ground: orig mass = 0, new mass = 0
* pelvis: orig mass = 11.3752, new mass = 11.3767
* femur_r: orig mass = 8.98404, new mass = 8.98523
* tibia_r: orig mass = 3.581, new mass = 3.58148
* talus_r: orig mass = 0.096588, new mass = 0.0966008
* calcn_r: orig mass = 1.20735, new mass = 1.20751
* toes_r: orig mass = 0.20921, new mass = 0.209237
* femur_l: orig mass = 8.98404, new mass = 8.98523
* tibia_l: orig mass = 3.581, new mass = 3.58148
* talus_l: orig mass = 0.096588, new mass = 0.0966008
* calcn_l: orig mass = 1.20735, new mass = 1.20751
* toes_l: orig mass = 0.20921, new mass = 0.209237
* torso: orig mass = 33.0685, new mass = 33.0728
************************************************************
* Note: Edit the model to make recommended adjustments to *
* mass properties. *
************************************************************

Re: RRA mass recomendation

Posted: Tue Jun 04, 2013 7:19 pm
by andrewlapre
Great, thanks a lot Brian!

Re: RRA mass recomendation

Posted: Wed Apr 04, 2018 11:45 am
by rosshm
Bumping this thread for a related question:

Is there a setting that can be enabled to tell RRA "Go ahead and apply these suggested mass changes to the current model" rather than the user manually entering them? I realize I could probably write a script or something to do this, but it seemed like a case where I may just not have the right flag checked.

Ross

Re: RRA mass recomendation

Posted: Wed Apr 04, 2018 1:19 pm
by baxterj
I don't think this feature has been added - at least it doesn't show up in the API docs and a recent post suggests this feature isn't available...
viewtopicPhpbb.php?f=91&t=7430&p=19634& ... 03593dc4a0

i'd recommend running the RRA tool using the command line call thru MATLAB's dos function. the returned variable is the message output which could be parsed and used to update the model... but an automatically updated model would be great in a future release.

Re: RRA mass recomendation

Posted: Wed Apr 04, 2018 4:48 pm
by rosshm
Thanks Josh. I have run quite a few simulations with the mass of the patella set to 0.97 instead of 0.097 =)

Re: RRA mass recomendation

Posted: Thu Apr 05, 2018 5:39 am
by baxterj
I just put this matlab call together. it seems to do the trick... it uses model and other files from the gait10dof folder

*edit* i'm having trouble uploading attachements. PM if you'd like these matlab scripts.

Re: RRA mass recomendation

Posted: Wed Feb 12, 2020 7:33 am
by baxterj
Here is a set of files that run rra, update the mass properties, and write a new osim model.

Main_rra.m sets up a Params structure that is passed along to runrra.m to setup and run the rratool thru the command line. Runrra also updates the model's COM position on the user defined segment. Then main_rra.m parses the rra output text and those mass values are used to update the _adjusted.osim file. The main action happens in main_rra.m lines 37 -64. This was developed for osim 3.3 but confirmed on osim 4.0.
main_rra.zip
matlab and osim files - rra auto mass adjustment
(111.09 KiB) Downloaded 68 times