Hey all,
While running analysis for inverse dynamics from Xsens kinematics file, I get the following errors. BVH file generated using XSens MVN Analyse 2019 and seems to be the case for all our BVH files. The demo BVH file has no issues.
I am not sure it is the cause of the problem, but i would not export the first frame as a T-pose.
This will mean that the model would have to go from t-pose to a completely different posture in one frame, this may cause problems.
Secondly i would export in m not cm.
I would have thought that both these things may have prevented you from running the kinematic analysis which you already completed?
Thanks for your response. I tried unchecking the T pose and changed cm to meters. Still have same issues. Infact, even before I run the analysis, the models created by these bvh files look monstrous ! The warning are shown below. Still have the error tolerance issues.
Updating expressions…
WARNING(OBJ.MCH.KIN7) : C:/U…s/V…i/D…s/A…x/A…o/Body/A…n/L…M/Mus.any(98) : GastrocnemiusLateralis1.SPLine : Penetration of surface : cyl : Via-point ‘GastrocnemiusLateralis1Node’ on ‘SPLine’ is located below the wrapping surface’cyl
WARNING(OBJ.MCH.KIN7) : C:/U…s/V…i/D…s/A…x/A…o/Body/A…n/L…M/Mus.any(934) :
As I mentioned, the demo file works with default setting (translationScale was 0.01). So makes we wonder if the demo bvh file is in cms.
Our files dont seem to even in cm scale. But in any case, I did change the scale to 1 and loaded a bvh file (exported in XSens in meters). I still the same error
Progressing to solve kinematic optimality conditions and hard constraints.
Failed to solve kinematic optimality conditions and hard constraints after 5 fallback attemps.
Constraint violations for study ‘Main.Studies.MarkerTracking’ :
Constraint #3 is above tolerance 1e-06, error = 0.000004, constr. #0 in ‘Main.HumanModel.BodyModel.Trunk.JointsLumbar.L5SacrumJnt.Constraints’.
Constraint #4 is above tolerance 1e-06, error = 0.000014, constr. #1 in ‘Main.HumanModel.BodyModel.Trunk.JointsLumbar.L5SacrumJnt.Constraints’.
Constraint #18 is above tolerance 1e-06, error = 0.000003, constr. #0 in ‘Main.HumanModel.BodyModel.Trunk.JointsLumbar.T12L1Jnt.Constraints’.
Is there something else I can change. Maybe increasing the tolerance? In most cases error is low except some, for e.g
Constraint #26 is above tolerance 1e-06, error = 0.083529, constr. #5 in ‘Main.HumanModel.BodyModel.Trunk.JointsLumbar.SpineRhythmDrv’.
Constraint #29 is above tolerance 1e-06, error = 0.054159, constr. #8 in ‘Main.HumanModel.BodyModel.Trunk.JointsLumbar.SpineRhythmDrv’.
Constraint #35 is above tolerance 1e-06, error = 0.100520, constr. #14 in ‘Main.HumanModel.BodyModel.Trunk.JointsLumbar.SpineRhythmDrv’.
So I looked at both the demo bvh001 file and our file. I have a few interesting updates.
Scale is definitely in cms in demo file. So that is settled.
Frame Time: 0.004167 in demo file and Frame Time: 0.016667 in our data. So it seems like our data is at 60Hz and demo file is using XSens link at 240 Hz
I thought frame rate was the main issue until I poked around more at the demo file. I found this file called Output/BVH01_BVH_Trajectories.anyset When I deleted this in the demo folder, I got the same tolerance errors for even for the demo file !!
Loading and overriding values from : ‘…Output\BVH01_BVH_Trajectories.anyset’ … ERROR(SCR.SCN1) : Cannot open file : …\MocapExamples\BVH_Xsens\Output\BVH01_BVH_Trajectories.anyset
*…Constraint violations for study ‘Main.Studies.MarkerTracking’ : * Constraint #0 is above tolerance 1e-06, error = 0.000189, constr. #0 in ‘Main.HumanModel.BodyModel.Trunk.JointsLumbar.SacrumPelvisJnt.Constraints’.
The anyset files in output folder were not being regenerated. I then downloaded AMMR v2.0 and compared with AMMR2.2.1 and went down a rabbit hole. Turns out that AnyOperationSequence BVH_PreProcess was not being loaded in RunAnalysis.
So changing
Main =
{
AnyOperationSequence BVH_PreProcess = ...
to
Main =
{
RunAnalysis.LoadParameters = {
AnyOperationSequence BVH_PreProcess = ...
in BVH_ModelPreprocess.any helped me get further.
I think thats a bug in new version.
Currently running inverse on the entirety of my file, its a slow process. Maybe this issue is solved but will know for sure in a few hours. Meanwhile, I thought I’d let you know.
I wanted to point out that in the new AMMR version 2.2.1 there was an update to the BVH MoCap example: Pre-processing the BVH data is now a separate operation which saves the virtual marker positions to a file. Thus, this step can be skipped the next time the model is reloaded.
With regards to the sampling rate, I’d be curious to see how your model runs if you collect the data at 240 Hz. Is it possible to capture one test trial at 240 Hz to see if this is the issue?