The Inverse Kinematics (IK) Tool steps through each time frame of experimental data and positions the model in a pose that "best matches" experimental marker and coordinate data for that time step. This "best match" is the pose that minimizes a sum of weighted squared errors of markers and/or coordinates. Obtaining accurate results from the IK Tool is essential for using later tools like Static Optimization, Residual Reduction Algorithm, and Computed Muscle Control.
To launch the IK Tool, select Tools → Inverse Kinematics from the OpenSim main menu bar.
Inverse Kinematics (IK) Tool Overview. Experimental markers are matched by model markers throughout the motion by varying the joint angles (generalized coordinates) through time.
Inputs and Outputs of the IK Tool. Experimental data are shown in green; OpenSim files (.osim) are shown in red; settings files are shown in blue.
The file names are examples that can be found in the Models/Gait2354_Simbody directory installed with the OpenSim distribution.
The primary inputs to IK are the following files:
- subject01_simbody.osim: A subject-specific OpenSim model generated by scaling a generic model with the Scale Tool or by other means, along with an associated marker set containing adjusted virtual markers.
- subject01_walk1.trc: Experimental marker trajectories for a trial obtained from a motion capture system, along with the time range of interest.
- gait2354_Setup_IK.xml: A file containing all the settings information for the IK tool, including marker weightings (IK tasks). As in the Scale Tool, marker weights are relative and determine how "well" the virtual markers track experimental markers (a larger weight for a given marker will mean less error–the distance between the virtual and experimental representations of a marker–for that marker).
- subject01_coords.mot (optional): Experimental generalized coordinate values (joint angles) for a trial obtained from alternative motion capture devices or other specialized algorithms. You can optionally specify relative coordinate weights in the Tasks file, if joint angles are known a priori.
- subject01_walk1_ik.mot: A motion file containing the generalized coordinate trajectories (joint angles and/or translations) computed by IK.
Best Practices and Troubleshooting