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

Re: RRA in 2.4

Post by David John Saxby » Sun Oct 09, 2011 9:10 pm

Hi Ayman,

I have logged a bug with all the necessary files to run the operation.

As well, I ran the RRA tool in debug and I have also attached the error log in the bug report.

Within the OpenSim GUI, when I run RRA the message window lists:

a series of returns -- Object.RegisterType: replacing registered object of type ControlLinear with a new default object...
and this repeats for CoordinateActuator, PointActuator, TorqueActuator, default models (Thelen2003Muscle, Schutte1993Muscle, etc...)

Then the OpenSim model is loaded successfully.

Then repeated calls for createSystem for the various joints in the model, constraints, contact geometry, coordinates, forces, controllers, etc..

Then it throws a series of warnings:
I have some of the DOF's locked so that RRA doesn't modify there coordinates (ex: knee adduction, internal rotation, subtalar joint). I repeated warnings of type:

Coordinate.setValue: WARN - coordinate Knee_adduction_r is locked, unable to change its value.

Finally,

Render time: 555.229339 ms and a series of decreasing values.

Then I presume it crashes.

I will watch the boards to see if there is a solution!

Best Regards from Down Unda!

David Saxby

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 Oct 18, 2011 3:29 pm

Hi Ayman,

I had some difficulty posting a response on the bug tracker, so I thought I would try here.

Thank you for the helpful response on the "desired_points_file". One issue I'm not sure about, the tag for the desired points asks for .mot or .sto files. The issue is that for a given trial, ex: walk1_IK.mot, the .mot does not contain feet marker trajectories (or any marker trajectories for that matter), will this be an issue as my task file has tags RCAL, RMT1, RMT5, etc...? Can I add these marker trajectories to my IK file manually? Else, can I use a .trc file with the marker trajectories instead of .mot?


Thanks for all help

David Saxby

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

Re: RRA in 2.4

Post by Ayman Habib » Wed Oct 19, 2011 10:19 am

Hi David,

The definition of Point Tracking is that you provide kinematics (in sto or mot file) of specific point(s) on the model that CMC is required to track if you don't have that then don't use point tracking.

Maybe you can step back and explain why the standard CMC doesn't do the job for you.

Best regards,
-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 » Sun Oct 23, 2011 4:01 pm

Hi Ayman,

I sorted the Point Kinematics issue out by adding some small script to the c3d to trc/mot routine in MATLAB to print a _pointkinematics.mot file for the feet markers. I will load this into the prescribed point kinematics tag.

The reason I felt I needed the point kinematics is because when I run RRA (or CMC I assume) without the feet constrained to experimental data, the model kinematics become very distant from the experimental kinematics. The feet slide all over the ground and the model is translating in the medio-lateral direction. My understanding was that the use of point kinematics with appropriate weighting would allow me to prevent these results. Is this reasonable to expect?

Best,

David

User avatar
Ajay Seth
Posts: 136
Joined: Thu Mar 15, 2007 10:39 am

Re: RRA in 2.4

Post by Ajay Seth » Sun Oct 23, 2011 10:37 pm

RRA is altering the kinematics (from IK) in order to reduce residual forces in the presence of experimental force. For good data and suitable model this typically results in small adjustments that do not lead to a noticeable floating of the model. If it does become noticeable, there is a more significant mismatch between the model, observed kinematics and applied forces. Was your subject walking with a cane or other assistive device?

This can also be due to measurement errors including how the COP is being resolved. It could also be that the model has a very different mass distribution (for example, subject was wearing a backpack).
In any case, if you wish the kinematics to be tracked more closely, then you can either increase the tracking weights on kinematics OR increase the optimal force of residual actuators. By making residuals "stronger" they require less control and are cheaper to use, so tracking should improve. If you increase the weightings in the kinematics you increase the cost of tracking errors - the effect should be the same.

We do not recommend changing the tracking controller gains (kp, kv, ...) and I have not seen a case where these have been an issue.

As a sanity check, have you run inverse dynamics on your model with your IK solution? If the forces on the pelvis are large (approaching body weight) it indicates a problem with the data. Preview the GRF data synchronized the IK solution to make sure they are in agreement (e.g. COP below the correct foot and up is consistent for GRF and kinematics).

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 Oct 24, 2011 4:37 pm

Hello Ajay,

Thank you for the advice on this matter, it is much appreciated.

Regarding your questions:

1) My subject was NOT using an assistance device such as cane or walker.

2) The model I am using to test the various processes (IK, ID, RRA, etc...) however does not have arms. This will effect the COM calculations, but enough to create the sliding effects I observed?

3) I will attempt to increase the tracking weights on the feet markers in particular as these seem to be a logical place to constrain as they are the first contact with the external force.

4) I have kept the controller gains consistent with the example in the user manual, with kp and kv existing in critically damped proportions.

5) The ID solution looks reasonable, but with respect to raw data errors, I definitely agree. We recently detected some issues with our Kistler plates, but these were related to the mediolateral sensitivity values. That is, the vertical GRF should have been OK, but nonetheless I will reprocess and see if I get better results.

6) The visual inspection of the GRF and the IK solution looks quite good. The COP is below the correct foot, the GRF moves as expected with breaking and then propulsion phases during stance.

7) I will take a look at the residuals at the hip and see what the story is.


Once again thanks for the suggestions and help,

Best,

David Saxby

POST REPLY