Skip to content

nickbianco/theia2opensim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

theia2opensim

A collection of Python scripts to convert raw data collected from Theia into OpenSim models and simulations.

Dependencies

Install the following dependencies with your favorite package manager on your platform (Homebrew, apt-get, etc.):

  • cmake
  • autoconf
  • automake
  • pkg-config
  • libtool
  • openblas
  • lapack
  • freeglut
  • doxygen
  • pcre
  • pcre2
  • openssl
  • gcc

Consult the OpenSim build scripts for platform-specific package installation commands.

Create the config.yaml file

Create a file named config.yaml in the root directory of the repository with the following fields: original_data_path, data_path, python_root_dir. original_data_path is the location of the original Theia sample data. data_path is the full path to a folder named data in the root directory of this repository. python_root_dir is a full path to a Python installation directory.

Here is an example:

original_data_path: '/Users/nbianco/Developer/sparc/Theia-OpenSim example data'
data_path: '/Users/nbianco/Developer/sparc/theia2opensim/data'
python_root_dir: '/Users/nbianco/miniconda3/envs/opensim_dev'

Install Python environment

Make sure the Python version you install here (e.g., 3.11) matches the Python version you point to via python_root_dir in the config.yaml file.

conda create -n theia2opensim python=3.11 numpy
conda activate theia2opensim
pip install setuptools ezc3d pyyaml casadi

Build OpenSim

Run the following command from the root directory to build OpenSim and install it into your conda environment.

python install_opensim.py

Run the pipeline

Run the data conversion pipeline. This consists of four main steps: 1) data import, 2) generic model creation, 3) model scaling, and 4) inverse kinematics.

python main.py

About

Scripts for converting raw Theia outputs to OpenSim models and motion files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages