Skip to main content

Joint 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 Joint Model Personalization (JMP) tool to personalize the functional axis for a soccer players right knee. To perform the JMP process, you will start with a pre-scaled OpenSim model Kicking_Model_scaled.osim.

Because we are only optimizing the kicking (right) leg for this motion, we are only going to use JMP on the right leg. This JMP run will personalize two aspects of the subject's right leg: the knee functional axis, and thigh marker positions.

The marker data used in this tutorial are

  • drive_kick_markers.trc`.
Reminder

It is generally the best practice to only personalize joints that have at least 25 degrees of motion. For this kicking motion, the knee moves through more than 25 degrees and therefore can be personalized. The ankle joint however does not move much during the kick, and therefore should not be personalized.

Setting up your JMP settings file:

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

  2. Open Kicking_Model_scaled.osim in the OpenSim GUI.

  3. With Kicking_Model_scaled.osim selected in the OpenSim GUI, navigate to Tools>Model Personalization>Joint Model Personalization

  4. Create a new JMP Task:

    • Name this task RightKnee
    • Set the Markers File to drive_kick1_markers.trc.
    • Set the Markers to R_ASIS L_ASIS Sacral R_Thigh_Superior R_Thigh_Inferior R_Thigh_Lateral R_Shank_Superior R_Shank_Inferior R_Shank_Lateral
    • Set the Time Range to 0 - 0.75
    • Add a new joint to this task:
      Joint name: knee_r
      Parent frame translation: None
      Parent frame orientation: X-, Y- axes
      Child frame translation: None
      Child frame orientation: X-, Y- axes
    • Add a new body to this task:
      Body name: femur_r
      Scale body: false
      Move markers: X-, Y- axes
  5. Save this settings file as JMPSettings.xml

  6. Open JMPSettings.xml and change <max_function_evaluations> to 300

  7. Save this settings file.

Running JMP

  1. Open runJMPTool.m in Matlab and click run

    • Make sure the NMSM Pipeline Project file is open.
Runtime

This JMP run will take 10 iterations to finish.

Analyzing JMP results

Plots should automatically be created by the runJMPTool.m script.

Questions
  • What were the average and maximum marker errors before and after JMP?
  • Which markers had the worst error before JMP? Where in the kicking motion was this error the largest? How much did JMP reduce those errors?
  • At approximately t=0.5, why did JMP not reduce marker errors by very much for any of the markers?
  • Were there any markers that didn't have their error significantly reduced? Do you think you should change your JMP problem formulation to reduce these errors more? If so, how would you re-formulate your JMP problem to reduce these errors?
  • Run the OpenSim Inverse Kinematics tool on Kicking_Model_JMP.osim using drive_kick_markers.trc`. Analyzing the motion, do you think that the left leg should be personalized too? Why or why not?