Skip to main content

Ground Contact Model Personalization

Tutorial Developers: Robert Salati, B.J. Fregly, Rice Computational Neuromechanics Lab, Rice University

Last Updated: 3/10/2026

In this step for the soccer kicking example, you will use the Ground Contact Model Personalization (GCP) tool to personalize a ground contact model for the subject's left foot. To perform the GCP process, you will be using the osim model Walking_Model_jmp.osim that you personalized in the previous step.

The kicking motion is cropped so that the trial starts only after the subject jumps off the ground. The kicking (right) foot is never in contact with the ground during the trial, and so we only need to a ground contact model for the left foot.

Question

Think for a few minutes how you could personalize a ground reaction model to a subject for a specific trial without ground reaction data from that trial.

The solution is to use ground reaction data from a different trial for the same subject wearing the same shoes in the same lab setup. In this case, we are using gait motion for the same subject, but in the same lab setup. Therefore, we can assume that the ground reaction models should be approximately the same between the walking and kicking motion.

Question

What are some limitations you can think of for using walking data to personalize a ground contact model for a kicking motion? Think about what the main differences are between walking and kicking. How do the speeds of the motions and the ground reaction force magnitudes compare?

The data used in this tutorial are:

  • Drive_kick1_forces_filtered.mot
    • Processed 6 degree of freedom ground reaction data in electrical center format from the kicking trial.
  • Drive_kick1_IK_results_filtered.mot
    • Processed IK data using Kicking_Model_jmp.osim.

Setting up a GCP settings file.

  1. Activate the NMSM GUI in OpenSim by navigating to Tools>User Plugins, and click rcnlPlugin.dll.

  2. With Kicking_Model_jmp.osim selected in the OpenSim GUI, navigate to Tools>Model Personalization>Ground Contact Personalization.

  3. Leave the Osimx file field empty.

  4. Set the Motion file to Drive_kick1_IK_results_filtered.mot.

  5. Set the Ground reactions file to Drive_kick1_forces_filtered.mot.

  6. Set the Results directory to GCPResultsKicking.

  7. Add a new contact surface

    • Set the name to "Left Foot"
    • Check Left Foot
    • Set the time range to 0 - 0.31
    • Set the belt speed to 0
    • Set the force columns to ground_force_1_vx ground_force_1_vy ground_force_1_vz
    • Set the moment columns to ground_moment_1_mx ground_moment_1_my ground_moment_1_mz
    • Set the electrical center columns to ground_force_1_px ground_force_1_py ground_force_1_pz
    • Set the hindfoot body to calcn_l
    • Set the markers as follows:
      - Toe Marker: L_Toe
      - Medial Marker: L_Toe_Medial
      - Heel Marker: L_Heel
      - Lateral Marker: L_Toe_Lateral
      - Midfoot Superior Marker: L_Midfoot_Superior
  8. Save the settings file as GCPSettingsKicking.xml

  9. Open up GCPSettingsKicking.xml in a text editor of your choice and explore the settings file.

  10. With a text editor, scroll to the bottom of the settings file, and change <max_iterations> to 20.

Running GCP

Open runGCPTool.m in Matlab and click run

- Make sure the NMSM Pipeline Project file is open
Runtime

This GCP run will take 53 iterations to finish.

Analyzing GCP Results

Plots should automatically be created by the runGCPTool.m script

Questions
  • What are your overall impression of the results? Did any of the kinematic tracking quantities have bad tracking? What about the ground reactions?
  • What distribution of spring stiffnesses do you see in the stiffness coefficients plot? Do you think this distribution is anatomically correct? (hint: how does the stiffness of your foot and your shoe change along your foot?)

Next GCP Run

If you did everything correctly up until now, you probably got GCP results that don't look great.

Question

Why do you think GCP struggled to calibrate a good ground contact model with the kicking motion?

Expand for answer
There could be many reasons that GCP struggled to get a good contact model. One theory is that the kicking motion includes the entire left foot contacting the ground all at once, as opposed to gait in which the foot smoothly rolls onto the ground during heel strike. This fast motion might result in GCP struggling to accurately calibrate a good stiffness distribution, which is why the spring stiffnesses vary so much.

We have a problem now. The motion that we are trying to study does not lend itself to a good ground contact model calibration.

One potential solution is to use ground reaction data from a different trial for the same subject wearing the same shoes in the same lab setup. In this case, we are using gait motion for the same subject, but in the same lab setup. Therefore, we can assume that the ground reaction models should be approximately the same between the walking and kicking motion.

Question

What are some limitations you can think of for using walking data to personalize a ground contact model for a kicking motion? Think about what the main differences are between walking and kicking. How do the speeds of the motions and the ground reaction force magnitudes compare?

The data used in this tutorial are:

  • Trial12_Gait_forces_filtered.mot
    • Processed 6 degree of freedom ground reaction data in electrical center format from a walking trial.
  • Trial12_Gait_IK_results_filtered.mot
    • Processed IK data using Walking_Model_jmp.osim.

Setting up your settings file

  1. Create a copy of GCPSettingsKicking.xml and name it GCPSettingsWalking.xml
  2. Set the Motion file to Trial12_gait_IK_results_filtered.mot.
  3. Set the Ground reactions file to Trial12_gait_forces_filtered.mot.
  4. Set the Results directory to GCPResultsWalking.
  5. Inside the left foot contact surface:
    • Set the time range to 1.5 - 2.56
    • Set the belt speed to 1.2

Running GCP

Open runGCPTool.m in Matlab and click run

- Make sure the NMSM Pipeline Project file is open
Runtime

This GCP run will take 55 iterations to finish.

Questions
  • Are these results better than the kicking results?
  • What distribution of spring stiffnesses do you see in the stiffness coefficients plot? Do you think this distribution is anatomically correct?