RRA in 2.4

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
David John Saxby
Posts: 83
Joined: Mon May 09, 2011 8:39 pm

RRA in 2.4

Post by David John Saxby » Wed Sep 21, 2011 10:02 pm

Hi All,

I'm wondering if anyone else is having this same error. I have adapted the example .xml setting files provided with version 2.4's to my model objects, DOFs, etc...

When I run the RRA tool I receive the error: "ArrayPtrs.get(aName): No object with name Unassigned"

I'm not sure what to do with this. Any advice from the development team or any other kind soul, would be greatly appreciated.

Thanks so much,

David Saxby

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

Re: RRA in 2.4

Post by Ayman Habib » Wed Sep 21, 2011 10:27 pm

Hi David,

The likely reason for this error is that you had old files for applying ExternalLoads and the automatic converter couldn't convert them to the latest format (for example because old files didn't have unique labels so force specification was ambiguous or for any other reason) this results in the new ExternalForces being applied to undefined body (Unassigned) and hence the error.

You can check if this is the case by editing the ExternalLoads file in the GUI and making sure that each Force has correct body and column names assigned/selected.

If that's not the source of the problem I'd suggest you search the directory that has the setup files and ExternalLoads file for the string "Unassigned" and then fix it there.

If neither of these approaches work, please file a bug report and attach all the files necessary to reproduce the problem and we'll investigate further.

Best of luck,
-Ayman

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

Re: RRA in 2.4

Post by David John Saxby » Thu Sep 22, 2011 1:17 am

Hi Aymanh,

Thank you for replying so quickly!

So I implemented your suggestions as follows:
1) I tried editing the external loads files in the GUI, and while that allowed me to apply forces to the left and right calcanius as the subject walks across the force plates, it DID NOT resolve the "unassigned object" issue. Note: I ensured the force/columns were selected for both left and right footstrikes. I saved to overwrite my previous external loads file.

2) I navigated directly to the external loads .xml file and examined the language for "unassigned". The only tag with an unassigned result was <data_source_name> which I understand by the comments in the .xml file that this should be superseded by the specification of the _grf.mot file. Nonetheless, I specified the full path of the _grf.mot file for the <data_source_name> tag.

Result:
Still the RRA tool throws the low level error of "ArrayPtrs.get(aName): No object with name Unassigned".

The only other location of "unassigned" is in the default tags for the setup and external loads file.


Is this bug worthy?

David

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

Re: RRA in 2.4

Post by David John Saxby » Thu Sep 22, 2011 8:36 pm

Hi Aymanh,

I received your email regarding my bug log. Thank you for the tip regarding file conversion. I fixed my setting files. I re-ran IK and ID, and it works. Now I will proceed with RRA and see what happens!

David

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

Re: RRA in 2.4

Post by David John Saxby » Mon Sep 26, 2011 5:34 pm

Hi Aymanh,

RRA is now working. The only issue is that the feet are not constrained appropriately. They slide over the ground during stance, and in fact they are translating in 3D throughout the stance phase, with medial lateral slide and movement up and down through the plates. There may be an issue with some of our force plate data in the medial-lateral directions so I will reprocess with our 'correct' raw data. However, the vertical forces are correct, so the vertical displacement is confusing. Note, I ensured time frame for RRA runs only during force plate support, and not in region where the foot is on an non gauged surface.

In previous versions of the RRA operation, in our Tasks file we employed 'point kinematics' from the feet markers (RCAL, RMT1, RMT5 for example). The tag for the right calcaneus was structured as follows.

<rdCMC_Point name="RCAL">
<wrt_body> calcn_r </wrt_body>
<express_body> ground </express_body>
<on> true </on>
<active> true true true </active>
<weight> 100 100 100 </weight>
<kp> 100.0 </kp>
<kv> 20.0 </kv>
<ka> 1.0 </ka>
<r0> 1.0 0.0 0.0 </r0>
<r1> 0.0 1.0 0.0 </r1>
<r2> 0.0 0.0 1.0 </r2>
<point> -0.03037269 -0.00650781 -0.01610940 </point>
</rdCMC_Point>

Now, when I leave this and the other corresponding point kinematic tags in the new Task file for version 2.4, the tool crashes. No error, just falls down. Can I constrain the feet kinematics so they are not modified by the RRA tool in 2.4? If so, how? Can I modify the existing point kinematics to work in 2.4?


Best regards from down under!

David

User avatar
Nur Adila Faruk Senan
Posts: 75
Joined: Tue Apr 06, 2010 8:20 pm

Re: RRA in 2.4

Post by Nur Adila Faruk Senan » Mon Sep 26, 2011 5:53 pm

Hey David,
Not sure if I'm off the mark here, but your Tasks file has:
<kp> 100.0 </kp>
<kv> 20.0 </kv>
<ka> 1.0 </ka>
for point tracking which *might* be the problem...maybe try change that to
<kp> 100.0 100.0 100.0</kp>
<kv> 20.0 20.0 20.0 </kv>
<ka> 1.0 1.0 1.0 </ka>
(...and cross your fingers) :)

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

Re: RRA in 2.4

Post by David John Saxby » Tue Sep 27, 2011 6:05 pm

Hi Nur Adila Faruk Senan,

(sorry wasn't sure how to shorten your name ;), I will definitely give that a try.

Looking at the documentation on RRA, as I understand it, kp and ka terms are involved in tracking experimental coordinates in the IK solution. What is odd is that in version 1.9 RRA runs with my single kp and kv terms, but in 2.4 the routine crashes the application. Intuitively it makes sense that 3 coordinates must be indexed in the tag for 3d motion, so I'll try this out.

Any ideas about the effects of increasing 'kp' and/or 'ka' arbitrarily. In a sense I want to penalize RRA solutions which involve deviation from the experimental foot markers. Do you think boosting the stiffness gain (kp) on the position error would achieve this. And regarding damping, I would like to critically damp the solution for the feet markers. Ideas about kv?

Thanks for posting mate, I really appreciate it.

David

User avatar
Nur Adila Faruk Senan
Posts: 75
Joined: Tue Apr 06, 2010 8:20 pm

Re: RRA in 2.4

Post by Nur Adila Faruk Senan » Wed Sep 28, 2011 10:51 am

Hey David,

you can call me adila (and/or 'mate') :)

I haven't run any RRA to be honest, but from my understanding of CMC (which I *think* uses the same algorithm for tracking), it tries to solve the following equation:

ddot(dq) + kv* dot(dq) + kp * dq = 0, ...... (1)
where dq is the difference between the 'q' OpenSim computes, and the 'q_{exp}' obtained experimentally.

If you solve the ODE given by (1))
(i.e.
omega^2 - kv*omega + kp) * dq(t) = 0.
omega = ( kv +/- sqrt(kv^2 - 4*kp) ) / 2

)
then, the critically damped solution is when
kv^2 = 4*kp, or kv = 2*sqrt(kp).

Or at least, that's my understanding of it (based on just reading the User Guide, with nooo testing whatsoever!)

The guide doesn't really have a "ka" described in the equation (under "How It Works, CMC Section) but I'm assuming it'd just change (1) into

ka * ddot(dq) + kv * dot(dq) + kp * dq = 0,

Based on my limited understanding (which, again, could be completely off track!), it's not so much the parameters of kp, kv and ka that matter, but the combination of them. I.e.,
(a) you always want
kv = 2*sqrt(kp * ka)
or it won't be critically damped.
(b) If that's satisfied, then
omega = kv/(2*ka)
and the larger this ratio is, the quicker the solution should converge
(dq = exp(-omega * t) --> larger omega = quicker convergence).

hope this helps (and that i'm not spreading false information~!) :)

adila

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

Re: RRA in 2.4

Post by David John Saxby » Wed Sep 28, 2011 11:42 pm

Hi All,

Still crashes! No error message, just death.

The tool runs initially, it doesn't log process though, but with the message window open you can see the tool is being executed. Then it crashes and OpenSim closes.

So I assume there is some critical violation in my .xml file set. Are there any new conditions placed on the RRA tool in 2.4? In the past, you had to ensure that your time interval was exclusive to a region where there is ground reaction forces. I have adhered to this rule, and I set the RRA tool to run from well into foot strike, through double support, and finishes during single leg support.

Any ideas?

David

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

Re: RRA in 2.4

Post by Ayman Habib » Tue Oct 04, 2011 11:28 am

Hi David,

If running from the GUI you can set Edit->Preferences->Debug to 3 and this will allow the code to run in guarded mode where more exceptions are caught (at the expense of slower run time). Try that and let me know if you get a stack trace and maybe this can point us to the problem, in the meantime it would be good for us to make sure we don't crash even if your setting file has unexpected contents so please file a bug report and attach all the model/setup/data files needed to reproduce the crash.

Thanks,
-Ayman
saxbyd wrote:Hi All,

Still crashes! No error message, just death.

The tool runs initially, it doesn't log process though, but with the message window open you can see the tool is being executed. Then it crashes and OpenSim closes.

So I assume there is some critical violation in my .xml file set. Are there any new conditions placed on the RRA tool in 2.4? In the past, you had to ensure that your time interval was exclusive to a region where there is ground reaction forces. I have adhered to this rule, and I set the RRA tool to run from well into foot strike, through double support, and finishes during single leg support.

Any ideas?

David

POST REPLY