Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
Hi all,
I am experimenting with attaching IMU's to the body and then using the IMUDataReporter within the analyze tool to obtain the linear accelerations of the IMU.
To this purpose, I first attached IMU's to my model using the IMU placer with the example set-up file provided with the Rajagopal OpenSense model. This seems to work as all IMU's appear on the body.
Within the analyze tool I then load my motion (running), specify external loads and reserve actuators and I add the IMUDataReporter to obtain the linear accelerations of the IMU. Within the DataReported I can 'check' whether I want the accelerations to be computed while using or ignoring external forces. By default the external forces are used. When I run the tool in this way, I get implausible linear accelerations. For example, the vertical, AP, and ML accelerations from the tibial IMU are ~1000, -2800 and 1400 during still standing.
I thought the implausible accelerations might be related because the external forces are being used to compute the accelerations. However, when I specify to ignore the external forces, the analyze tool crashes each time. I get the following error message: . I have also tried removing the external loads and reserve actuators and then ignored the forces, but this produces the same error and crash.
Any suggestions on how to obtain realistic linear accelerations using the IMUDataReporter would be greatly appreciated. Interestingly by the way: the angular velocities do seem plausible...
I am experimenting with attaching IMU's to the body and then using the IMUDataReporter within the analyze tool to obtain the linear accelerations of the IMU.
To this purpose, I first attached IMU's to my model using the IMU placer with the example set-up file provided with the Rajagopal OpenSense model. This seems to work as all IMU's appear on the body.
Within the analyze tool I then load my motion (running), specify external loads and reserve actuators and I add the IMUDataReporter to obtain the linear accelerations of the IMU. Within the DataReported I can 'check' whether I want the accelerations to be computed while using or ignoring external forces. By default the external forces are used. When I run the tool in this way, I get implausible linear accelerations. For example, the vertical, AP, and ML accelerations from the tibial IMU are ~1000, -2800 and 1400 during still standing.
I thought the implausible accelerations might be related because the external forces are being used to compute the accelerations. However, when I specify to ignore the external forces, the analyze tool crashes each time. I get the following error message: . I have also tried removing the external loads and reserve actuators and then ignored the forces, but this produces the same error and crash.
Any suggestions on how to obtain realistic linear accelerations using the IMUDataReporter would be greatly appreciated. Interestingly by the way: the angular velocities do seem plausible...
Tags:
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
Any of the OpenSim developers any idea about the cause of the crash or implausible acceleration values?
I assume the implausible acceleration is because I am not ignoring the external load, but if this is the case it would be good to know how to prevent the tool from crashing if ignoring external loads.
I assume the implausible acceleration is because I am not ignoring the external load, but if this is the case it would be good to know how to prevent the tool from crashing if ignoring external loads.
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
Hello,
Please relax the assembly tolerance (first reported exception) to something like
and then retry.
Hope this helps,
-Ayman
Please relax the assembly tolerance (first reported exception) to something like
Code: Select all
<assembly_accuracy>1e-7</assembly_accuracy>
Hope this helps,
-Ayman
- Nicholas Bianco
- Posts: 1050
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
Hi Bas,
To add, if you specify that you want to compute accelerations without external forces, we add a PositionMotion to the model which applies the set of forces to the model required to produce the motion. This is necessary because OpenSim needs forces in order to compute the correct accelerations.
PositionMotion splines the input data in order to prescribe the kinematics to the model. The splined kinematics might be slightly different from your input kinematics, which then might slightly violate the model's kinematic constraint errors -- hence the assembly errors you are seeing.
-Nick
To add, if you specify that you want to compute accelerations without external forces, we add a PositionMotion to the model which applies the set of forces to the model required to produce the motion. This is necessary because OpenSim needs forces in order to compute the correct accelerations.
PositionMotion splines the input data in order to prescribe the kinematics to the model. The splined kinematics might be slightly different from your input kinematics, which then might slightly violate the model's kinematic constraint errors -- hence the assembly errors you are seeing.
-Nick
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
Thank you both for your replies!
I have tried changing the tolerance limit in the .xml file (<integrator_error_tolerance>1.0000000000000001e-5</integrator_error_tolerance>) but this did not solve the issue unfortunately.
I also tried the adjustment regarding the assembly accuracy in Matlab (<assembly_accuracy>1e-7</assembly_accuracy>), but it also did not work. In fact, when I run the ImuDataReporter in Matlab, I get the following error:
Any other suggestions that I might try?
I have tried changing the tolerance limit in the .xml file (<integrator_error_tolerance>1.0000000000000001e-5</integrator_error_tolerance>) but this did not solve the issue unfortunately.
I also tried the adjustment regarding the assembly accuracy in Matlab (<assembly_accuracy>1e-7</assembly_accuracy>), but it also did not work. In fact, when I run the ImuDataReporter in Matlab, I get the following error:
Any other suggestions that I might try?
- Nicholas Bianco
- Posts: 1050
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
Hi Bas,
Could you try removing the ExternalLoads from the model and set property 'compute_accelerations_without_forces' to true? That should give you reasonable IMU signals provided there's no issues with the model or data. If that works, then we could try to reintroduce the external loads.
-Nick
Could you try removing the ExternalLoads from the model and set property 'compute_accelerations_without_forces' to true? That should give you reasonable IMU signals provided there's no issues with the model or data. If that works, then we could try to reintroduce the external loads.
-Nick
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
Thanks for your suggestion Nicholas.
When I don't specify any external loads and set compute_acceleration_without_forces to true Opensim crashes.
If instead I remove the external loads and set compute_acceleration_without_forces to false, the tool runs, but again produces an output that seems implausible given the high accelerations during still standing.
I have also tried the following:
Add external loads, but add not reserve actuators --> this results in OpenSim 'Executing analyses...' without any results
Add NO external loads, but add reserve actuators --> the output from this seems implausible given the high accelerations during still standing (output is similar to the second option above).
Can I conclude based on your model that the issue would therefore need to be in the GRF data or model? I use the Catelli-Rajagopal-Ulrich model, with IMUs added using the example file provided with OpenSim version 4.5. Therefore it seems unlikely that the model is the issue.
It also seems unlikely that the GRF are incorrect as we have used these successfully in a previous version of OpenSim 3.3 and when I compared them to the example files provided with the new version I believe no modifications to this file was required.
Any further suggestions would be very much appreciated.
When I don't specify any external loads and set compute_acceleration_without_forces to true Opensim crashes.
If instead I remove the external loads and set compute_acceleration_without_forces to false, the tool runs, but again produces an output that seems implausible given the high accelerations during still standing.
I have also tried the following:
Add external loads, but add not reserve actuators --> this results in OpenSim 'Executing analyses...' without any results
Add NO external loads, but add reserve actuators --> the output from this seems implausible given the high accelerations during still standing (output is similar to the second option above).
Can I conclude based on your model that the issue would therefore need to be in the GRF data or model? I use the Catelli-Rajagopal-Ulrich model, with IMUs added using the example file provided with OpenSim version 4.5. Therefore it seems unlikely that the model is the issue.
It also seems unlikely that the GRF are incorrect as we have used these successfully in a previous version of OpenSim 3.3 and when I compared them to the example files provided with the new version I believe no modifications to this file was required.
Any further suggestions would be very much appreciated.
- Nicholas Bianco
- Posts: 1050
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
This result makes sense to me: if there are no forces in the model to match the motion, then the accelerations will be incorrect. Remember that OpenSim calculates accelerations based on both the current kinematic state and the applied forces.If instead I remove the external loads and set compute_acceleration_without_forces to false, the tool runs, but again produces an output that seems implausible given the high accelerations during still standing.
I'm not quite sure what the issue is yet. Could you try one thing: run inverse dynamics with the current model, kinematics, and external loads and see what it produces?Can I conclude based on your model that the issue would therefore need to be in the GRF data or model?
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
I really appreciate your continuous suggestions Nicholas.
I have ran the inverse dynamics and it produces results consistent with what I obtained in OpenSim version 3.3 for the same participant, and also in line with the literature (although my ankle joint moment is a little higher [~3 Nm/kg for the specific participant I'm using for testing vs 2.5 Nm/kg in some other studies at the same speed]).
I would assume this means that the ID/GRF/IK input/output are valid?
I have ran the inverse dynamics and it produces results consistent with what I obtained in OpenSim version 3.3 for the same participant, and also in line with the literature (although my ankle joint moment is a little higher [~3 Nm/kg for the specific participant I'm using for testing vs 2.5 Nm/kg in some other studies at the same speed]).
I would assume this means that the ID/GRF/IK input/output are valid?
- Bas Van Hooren
- Posts: 30
- Joined: Fri Jan 29, 2016 10:59 am
Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load
I have also just ran the same analysis using the Rajagopal model and experimental data provided with the OpenSim installation. There I also get values for the tibial acceleration that are very different from the literature and the pattern of the acceleration is also different.
For example, the figure below (Milner et al. 2020) shows tibial acceleration during treadmill running as measured using a real accelerometer. The peak positive vertical acceleration would be expected to be around 6-10 g around initial contact, with values close to zero during the remaining stance phase. Similar values are reported in other papers. The figure below shows the acceleration obtained from the tibial IMU with the DataReporterTool using the Rajagopal model and experimental running data provided with the OpenSim installation. I assume the values are in m/s2, but even if I would express this in g, they would be very different, and the pattern is also very different.
Could it be that the IMUDataReporter output is not reporting in the IMU reference frame as a real accelerometer would?
For example, the figure below (Milner et al. 2020) shows tibial acceleration during treadmill running as measured using a real accelerometer. The peak positive vertical acceleration would be expected to be around 6-10 g around initial contact, with values close to zero during the remaining stance phase. Similar values are reported in other papers. The figure below shows the acceleration obtained from the tibial IMU with the DataReporterTool using the Rajagopal model and experimental running data provided with the OpenSim installation. I assume the values are in m/s2, but even if I would express this in g, they would be very different, and the pattern is also very different.
Could it be that the IMUDataReporter output is not reporting in the IMU reference frame as a real accelerometer would?