Skip to main content

How To Use GCP

Check that you have all the necessary inputs

Scaled OpenSim Model
You will need to have a scaled OpenSim model. Preferably one that has already been run through JMP to have accurate joint geometries.

NMSM Pipeline Model File (Optional)
If you ran MTP or NCP before GCP, you may input your .osimx file to GCP, and GCP will concatenate its results to the end of the input .osimx file.

Processed Data
You need a data folder with all your preprocessed data. It is recommended to do this through the data preprocessing tool. Ground reaction forces must be included as part of this data set, and moments should be reported about a fixed point on the forceplate.

Create your XML settings file and modify necessary parameters

You can create a GCP settings file using the NMSM Pipeline GUI plugin in OpenSim. Alternatively, you may use the GCPReference to build a settings file from scratch. This file contains an exhaustive list of all GCP settings file elements.

If creating a GCP settings file in the GUI, 3 tasks will automatically be created that target different components of the ground reactions:

  • Task 1: Calibrate vertical ground reaction forces

  • Task 2: Calibrate horizontal ground reaction forces

  • Task 3: Calibrate ground reaction moments

Create your MATLAB file to run GCP

You may now create a MATLAB script to run GCP. This file should call the function GroundContactPersonalizationTool("settingsFileName.xml") Make sure that your MATLAB parallel computing toolbox is configured to use a "processes" profile.

Make sure the nmsm-core project is running in MATLAB

If it is not already running, double click on ‘Project.prj’ in the root of the nmsm-core folder to open it up.

Press run in MATLAB

Analyze your results

The key output to a GCP optimization is the .osimx file. This file contains all of the information about your calibrated ground contact model that Treatment Optimization will use later.

GCP generates numerous output files for analyzing ground reactions and kinematics in different formats. You can plot these files using the function plotGcpResultsFromSettingsFile("settingsFileName.xml"). This function generates plots for:

  • Ground reaction force tracking
  • Foot kinematics tracking
  • Contact surface spring stiffness grid

The files used in these plots are described below:

For each contact surface:

  • Foot_x_experimentalFootKinematics: Experimental 3D position and orientation values of the hindfoot body, along with the toe joint angle
  • Foot_x_optimizedFootKinematics: The same quantities as above, but changed by GCP
  • Foot_x_optimizedGroundReactions: Ground reaction forces and moments produced by the calibrated ground contact model. Moments are calculated about the midfoot superior marker projected onto the ground.
  • Foot_x_replacedExperimentalGroundReactions: Experimental ground reaction forces with moments reported about the midfoot superior marker projected onto the ground using experimental kinematics.

Additional Files

  • GRFData
    • gcp_modeled_GRFFileName: All Foot_x_optimizedGroundReactions.sto concatenated together. This file should only be used for visualization. You should not use it as an input to subsequent tools.
    • gcp_modeled_GRFFileName_CoP: All Foot_x_optimizedGroundReactions.sto concatenated together, but reported in center of pressure format for visualization in the OpenSim GUI. This file should only be used for visualization. You should not use it as an input to subsequent tools.
    • gcp_adjusted_GRFFileName: Experimental ground reaction forces and moments reported with GCP adjusted electrical centers and force plate rotations. We recommend using this file for the remainder of the model personalization and treatment optimization process.
    • gcp_adjusted_GRFFileName_CoP: Experimental ground reaction forces and moments reported with GCP adjusted electrical centers and force plate rotations, reported in center of pressure format for visualization in the OpenSim GUI. This file should only be used for visualization. You should not use it as an input to subsequent tools.
  • IKData
    • gcp_modeled_GRFFileName: Full body kinematics using the foot kinematics in Foot_x_optimizedFootKinematics.sto. This file should only be used for visualization. You should not use it as an input to subsequent tools.

You can visualize your GCP results using the function plotGcpResultsFromSettingsFile("settingsFileName.xml"). This function generates plots for:

  • Ground reaction force tracking
  • Foot kinematics tracking
  • Contact surface spring stiffness grid

For more detail on how to use GCP, visit the hands-on GCP Tutorial.