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 right foot.
Unfortunately, we do not have good ground reaction force and moment data for this trial, so we need to be creative.
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.
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.
- Processed IK data using
Setting up a GCP settings file.
Activate the NMSM GUI in OpenSim by navigating to Tools>User Plugins, and click
rcnlPlugin.dll.With
Walking_Model_jmp.osimselected in the OpenSim GUI, navigate toTools>Model Personalization>Ground Contact Personalization.Leave the Osimx file field empty.
Set the Motion file to
Trial12_Gait_IK_results_filtered.mot.Set the ground reactions file to
Trial12_Gait_forces_filtered.mot.Set the results directory to
GCPResults.Add a new contact surface
- Set the name to "Left Foot"
- Check Left Foot
- Set the time range to 1.5 - 2.56
- Set the belt speed to 1.2
- 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_r - Set the markers as follows:
- Toe Marker: R_Toe
- Medial Marker: R_Toe_Medial
- Heel Marker: R_Heel
- Lateral Marker: R_Toe_Lateral
- Midfoot Superior Marker: R_Midfoot_Superior
Save the settings file as
GCPSettings.xmlOpen up
GCPSettings.xmlin a text editor of your choice and explore the settings file.With a text editor, scroll to the bottom of the settings file, and change
<max_iterations>to20.With the text editor, change the
<grid_width>and<grid_height>to 3 and 8, respectively.- To make the GCP run faster, we use a less dense grid of contact elements.
Running GCP
Open runGCPTool.m in Matlab and click run
- Make sure the NMSM Pipeline Project file is open
This GCP run will take 58 iterations to finish.
Analyzing GCP Results
Plots should automatically be created by the runGCPTool.m script
- What were the RMS errors for the ground reactions?
- What were the RMS errors for the foot kinematics?
- Which ground reaction and which foot kinematic quantity had the worst tracking error? How are these two quantities related to each other?
- Try changing
<grid_width>to 7. How does the ground reaction force and moment tracking change? How do the individual spring stiffnesses change? Does this make sense?