Problem with C3D

Hello, the mocap-system what I use, creates for each bone 3 markers (one marker for one point in space) in the C3D-File. The example C3D-File form Anybody has created only one marker for each bone. Is AnyScript able to read these markers or do I need to aggregate them to one marker? Or are there any other solutions)
For example in the ART-Human C3D-File the markers are stored like this (3 markers per bone are stored with the names):

"XXmYY_0
XXmYY_1
XXmYY_2
XX: ID of the model
YY: ID of the bone

In bonecoordinates (and model units):
_0:0,0,0;_1:0,20,0;_2:0,0,20"

I have named the markers with the name of my mocap- system after an helpful thread , but still I get the same error message.

Thanks for any further help.

Hi Chris,

Basically you are doing something wrong :slight_smile: It loads everything and i see the triplets. What I do not see is the modifications in the code that would drive the model using these markers, except that you provided a list of markers in the C3D loader. Unfortunately that is not enough.

If you check the ModelSetup.any you will find the definition of markers needed by the original model. You would need to redefine these part to adjust the model to your configuration. See example below:



  CreateMarkerTD h00b00m0( 
  MarkerName=PrefixDef(h00b00m0),
  MarkerPlacement =Right.Leg.Seg.Thigh, 
  OptX="On",OptY="On",OptZ="On",
  WeightX=1.0,WeightY=1.0,WeightZ=1.0,
  
  Model1=MotionAndParameterOptimizationModel, Model2= InverseDynamicModel
  )= {
    sRelOpt = {-0.03102465, -0.2669603, 0.1139464};
  };


You would need to define the expected position of each marker on the generic human - they will be used to optimize anthropometrics and kinematics.

Hope this helps.

Kind regards,
Pavel

Hi Pavel,
I have redefine the parts, but my model doesn´t load. Would you mind look at my file? What does the problem is now?

Hi Chris,

Problem 1: You still have some code that relies on the standard markers - in this particular case the initial positions of the pelvis are computed based on iliac markers. You need to figure out yourself what you want to do in this case.

//    AnyParamFun &RASI = Main.ModelSetup.C3DFileData.Points.Markers.RASI.PosInterpol;
//    AnyParamFun &LASI = Main.ModelSetup.C3DFileData.Points.Markers.LASI.PosInterpol;
//    
//    AnyParamFun &RPSI = Main.ModelSetup.C3DFileData.Points.Markers.RPSI.PosInterpol;
//    AnyParamFun &LPSI = Main.ModelSetup.C3DFileData.Points.Markers.LPSI.PosInterpol;
    
    
    AnyVar PelvisPosX = 0;//0.25* (RASI(Main.TrialSpecificData.tStart)[0]+LASI(Main.TrialSpecificData.tStart)[0]+RPSI(Main.TrialSpecificData.tStart)[0]+LPSI(Main.TrialSpecificData.tStart)[0]);
    AnyVar PelvisPosY =  0;//0.25* (RASI(Main.TrialSpecificData.tStart)[1]+LASI(Main.TrialSpecificData.tStart)[1]+RPSI(Main.TrialSpecificData.tStart)[1]+LPSI(Main.TrialSpecificData.tStart)[1]);
    AnyVar PelvisPosZ = 0;//0.25* (RASI(Main.TrialSpecificData.tStart)[2]+LASI(Main.TrialSpecificData.tStart)[2]+RPSI(Main.TrialSpecificData.tStart)[2]+LPSI(Main.TrialSpecificData.tStart)[2]);
    

Secondly,I have removed this dependency and got the next error.

Problem 2: The force plate analog data is missing in your file - so i commented out automatic force plate detection (since you don’t have any). and this led to the last problem.

Problem 3:

    AnyFunButterworthFilter LowPassFilter = {
      FilterForwardBackwardOnOff = On;
      AutomaticInitialConditionOnOff = On;
      N = 2;
      AnyVar CutOffFrequency=12;
      AnyVar SampleFreq=.Header.VideoFrameRate* 1;//.Header.NoAnalogSamplesPer3DFrame   ;
      W = {1/(SampleFreq*0.5)*CutOffFrequency};
      Type = LowPass;
    };

This object depended on NoAnalogSamplesPer3DFrame variable, which is not defined in your case. So you might want to think how to replace expected ground reaction forces.

Kind regards,
Pavel

Hi Pavel,
I have tested some options because my model was after running always destroyed. Therefore I have changed the Pelvis Rotation. Only by Pelvis Rotation Z: 90° and X: -90° the model is not destroyed after running, but it is bottom up. I have set the Rotation of Z and X to 0° before upload.

Regards
Chris

Hi Chris,

Please try these angles

AnyVar PelvisRotZ = 90;
AnyVar PelvisRotY = 0;
AnyVar PelvisRotX = 90;

Best regards
Søren