How to change C3D data files axis

I want to run the GRF prediction example with my own c3d data. However, axis of the c3d data is different from Anybody GRF program. How can I change the c3d data file axis

Hi, sankadileepa

I don't think you should change the c3d file.
You should change the initial position in TrialSpecificData_LowerExtremity.any.

  PelvisPosX = 0.55;
  PelvisPosY = 0.13;
  PelvisPosZ = 1.005;
  PelvisRotX = 93.0;
  PelvisRotY = 0.0;
  PelvisRotZ = 180.0;

And, you also should change the gravity direction in LabSpecificData.any based on the orientation of yours in c3d.

 Gravity = 9.81*{0,0,-1}; // X,Y,Z

Best Wishes,
Lee

1 Like

Hi, Nickel_lee

Thanks for your reply. Is this modification works for the GRF prediction sample ?

Hi, sankadileepa

I believe it works. The initial position setting is in TrialSpecificData_GRFPrediction.any.
And if you have trouble determining the initial position, you could just use the code below to auto-detect it.

// This class_template calculates the load time position and orientation of the pelvis based on markers.
AutoPelvisPos AutoPos(RASIS=RASI, LASIS=LASI, BACK=RPSI) = {};

Main.HumanModel.Mannequin.Posture = {
//^ The following settings define the initial posture of the
//^ model (e.g. at load time)

// This can be ommitted if AutoPelvisPos above is used.
// PelvisPosX = -0.08;
// PelvisPosY = 0.89;
// PelvisPosZ = -0.33;
//
// PelvisRotX = 0.0;
// PelvisRotY = 0.0;
// PelvisRotZ = 0.0;

Best Regards,
Lee

1 Like

Hi, Nickel_Lee

Thank you very much for your reply. I changed the gravity vector and the force plate to Z direction.`

gravity

 Gravity = 9.81*{0,0,-1};

Force plate

 FootPlateConditionalContact GRF_Prediction_Right(
  NORMAL_DIRECTION = "Z",
  NUMBER_OF_NODES = 25,
  NODES_FOLDER = FootNodes,
  SHOW_TRIGGER_VOLUME = ON,
  PLATE_BASE_FRAME = Main.EnvironmentModel.GlobalRef) =
  {
    CreateFootContactNodes25 FootNodes(foot_ref = 
    Main.HumanModel.BodyModel.Right.Leg.Seg.Foot) = {}
    

Do i have to change any other codes in GRFPrediction code to change the friction forces in the foot ?

Hi, sankadileepa

Did it run successfully?

BW,
Lee

1 Like

Hi, Nickel_Lee,

I got these error and wrong direction of Frictional force.

BR,
Sanka

Hi Sanka,

There can these reasons for this behaviour:

  1. Motion can have unrealistc accelerations meaning that subject is out of balance.

  2. Contact between foot and ground may not have been detected… try to increase height tolerance on the forceplate, visually you can see the spheres on the foto change color when contact can appear. Try running just kinematics and check the contact there before running inverse analysis.

Best regards
Søren

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.