Skip to content

bs97/kinect_joint_angles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instructions for opensim IK from trcs and plot angles:

Requirements

Setup

  1. Create a Conda environment using the provided environment.yml file:

    conda env create -f environment.yml
  2. Activate the newly created environment:

    conda activate opensim_scripting_bradley9may24
  3. Install OpenSim within the environment:

    conda install opensim-org::opensim
  4. Install the fastdtw package:

    pip install fastdtw

Running Inverse Kinematics (IK) and Plotting Angles

  1. Navigate to the opensim_scripting_bradley9may24 environment.

  2. Run the main.py script:

    python main.py
  3. Select a Kinect TRC file and specify the start and end points of the signal. The processed angles will be plotted.

  4. Select a Motion Monitor TRC file. Plots will display synced Kinect and Motion Monitor Euler angles for shoulder and elbow. The root mean square error (RMSE) between Euler angles will be displayed in the terminal.

  5. The generated plots will be saved in the charts directory, and the motion data will be saved in /mots. Euler angles will also be saved in testmmdata.csv and testkinectdata.csv.

Upsampling Quaternions and Syncing Signals

  1. Inside the opensim_scripting_bradley9may24 environment, navigate to the upsamplekinect_and_sync_quats directory.

  2. Edit the Python file (line 4) to specify the quaternion CSV Euler angle file.

  3. Run the upsample and sync scripts:

    python upsamplekinect_and_sync_quats
    python sync_quats.py
  4. Select two CSV files for synchronization. The RMSE will be displayed in the terminal.

About

Code for generating joint angles from kinect and motion monitor trc files using the opensim API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages