Runparameteridentification failed(AMMR.v2.1.1)

Hi everyone,

I'm trying to using the c3d file to drive the model, but the following error always appears.

0.1.0.0.0.0.2) ...Kinematic analysis completed.
0.1.0.0.0.0.3) ...Dependent variables are fully updated.
0.1.0.0.0) Kinematic analysis...
Failed to resolve kinematic constraints. Newton relaxation too small. (final kin. error = 1.964873E-005)
Optimality cond.no. 189 above error tolerance 0.000010, error = 0.000020.
Optimality cond.no. 190 above error tolerance 0.000010, error = 0.000015.
Optimality cond.no. 633 above error tolerance 0.000010, error = 0.000018.
Constraint violations for study 'Main.Studies.ParameterIdentification.KinematicStudyForParameterIdentification' : 
Constraint #404 is above tolerance 1e-005, error = 0.000018, segment constr. 'Main.HumanModel.BodyModel.Right.Leg.Seg.Foot'.
ERROR(OBJ.MCH.KIN3) :   F:/A..o/T..s/A..p/KinematicStudyForParameterIdentification.any(8)  :   KinematicStudyForParameterIdentification.Kinematics  :  Kinematic analysis failed in time step 4 : Position analysis is not completed

image

According to the error message, I found that foot segment were in an abnormal position. There are there markers in my model, Lateral ankle, Heel, Second metatarsal bone. My questions are as follows.

Q1. This phenomenon seems that algorithm tended to make foot model eversion to decrease the distance betweent markers. is it right?

Q2. Can you tell me the way to fix it :grin:. i think add more markers on the foot maybe a good choice. but the experiment finished, so it's difficult to redo the experiment. can i make it success by locking that freedom?
Q3 About CreateMarkerDriver parameters. i dont't know how to set the weight,x,y,z and opt,x,y,z, can you tell me the special meaning about these two parameters

[test_file.zip|attachment](upload://a73lQWcvVfheP0cLjy9OlLVZFwa.zip) (1.6 MB) 

Hi @Felix

Yes that issue is often seen when having only two markers on the foot segment.
The Mocap model have two switches for enabling a weak driver for the subtalar joint. Yu can find them in the ExtraDrivers.any file. Look for #define BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_RIGHT ON

That might help you overcome the issue.

For your last question the WeightX, y and z are used to construct a weight function to either increase or lower the influence of that marker direction - if you have large skin artefacts you can weigh that marker down. The OptX,y,z are used to determine which of the marker directions are to be optimized by the study and which are detemrined "good" and fixed.

Best regards,
Bjørn
AnyBody Technology

Thank you for your quick reply.

AnyFolder ExtraDrivers = {

  // --------------------------------------------------------------------------
  // The BM_MANNEQUIN drivers are used to support the degrees of freedom where
  // the markers do not provide enough information. 
  // See this file for options: #path HTML_DOC "<AMMR_PATH_DOC>/bm_config/index.html"
  // --------------------------------------------------------------------------
  
  // Mannequin drivers are off per default, but can be activated individually
  #define BM_MANNEQUIN_DRIVER_DEFAULT OFF
  
  // Weak extra drivers for the subtalar joint is often necessary 
  // when there is only two markers on the foot segment.

   #define BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_RIGHT ON
   #define BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_LEFT ON

image
I just adapted your advices and tried. but its parameters indentification still failed in the the same step. and then i took away RTOE and LTOE marker. it can run identification but it look like odd and stucked in an endless loop.
image

can you give me more detailed advice? Thank you very much!

Hi @Felix

You should not exclude the toe markers - as you see there is nothing to determine the length of the foot segment so an infinite number of solutions exist. What it further shows is a completely flat foot - which got me to think that your heel and malleolus marker have almost the same global y position (height above floor) that could be something to investigate. the optimization cannot set the foot in a neutral position if the heel and malleolus are to be at the same height. You can try and move one of the markers and see.

These ideas and others are also documented in our wiki about Mocap data. I think you can find helpful answers here as well.

Best regards,
Bjørn

Thank you very much for answering my questions, you help me a lot. And I ran parameter indentification and analysis successfully with my partner.
But I got another problem with Macro command : LoadOutputFromHDF(1:2). I saved the result by anydata.h5, but it went wrong when i operated the Main.loadandReplay while can be read by python successfully.

#### Macro command : LoadOutputFromHDF(1:2)> classoperation Main.Studies.MarkerTracking.Output"Load data"--file= "F:\AMMR.v2.1.1-Demo\Application\MocapExamples\Plug-in-gait_39\TrialName\16\FullBody_16_MarkerTracking.anydata.h5"
Main.Studies.MarkerTracking.Output :  Loading output data file...
... loading finished, but getting warnings from HDF read.
ERROR(OBJ.FILE1) :   Problem with file :  F:\AMMR.v2.1.1-Demo\Application\MocapExamples\Plug-in-gait_39\TrialName\16\FullBody_16_MarkerTracking.anydata.h5 :   has no match object in the ANYDATA file.


#### Macro command : LoadOutputFromHDF(2:2)> classoperation Main.Studies.InverseDynamicStudy.Output"Load data"--file= "F:\AMMR.v2.1.1-Demo\Application\MocapExamples\Plug-in-gait_39\TrialName\16\FullBody_16_InverseDynamicStudy.anydata.h5"
ERROR(OBJ.OperationReplay1) :   F:/AMMR.v..-Demo/T..s/A..p/AnyMoCapModel.any(106)  :   InverseDynamicStudy.Replay  :  Replaying data failed in time step 0. Data is not ready.

here is my datastorage path
F:\AMMR.v2.1.1-Demo\Application\MocapExamples\Plug-in-gait_39\TrialName\16

whar should I do to fix this problem?
Thank you in advance.
Kind regards,
Felix

Hi @Felix

Nice to hear the simulation went well!

The error you are getting is because you probably changed something in the model after saving the .h5 file. So when you try and load it the model and data file do not match. It could be you added, moved or deleted a small thing.

Best regards,
Bjørn
AnyBody Technology

Thank you Bjorn! I did make the mistake you said, and I can load and replay again now! :grin:
Best regards,
Felix