Tools for creating participant reports for various studies utilizing OpenSim ecosystem
You need Python 3.11+ and git.
-
Clone the repo and create a virtual environment:
git clone https://github.com/stanfordnmbl/study_reports.git cd study_reports py -3.13 -m venv .venv .venv/Scripts/activate
-
Install the requirements
pip install -r requirements.txt"
-
Add the OpenSim viewer backend, which exports the model to 3D:
git clone --depth 1 https://github.com/opensim-org/opensim-viewer-backend.git vendors\opensim-viewer-backend
-
Download viewer build
curl https://github.com/opensim-org/opensim-viewer/releases/download/headless-0.1/viewer-build.zip -OutFile "viewer-build.zip"
-
Extract viewer build
Expand-Archive -Path ".\viewer-build.zip" -DestinationPath ".\viewer-build"
6. Install playwright to drive the animation and capture movie
- At the .venv prompt, type
> playwright install
7. From here on you can run the script
> python generate_report.py <full_path_to_data_folder_eg_ID119>
8. Inspecting report
- The above script will create two subfolders under <full_path_to_data_folder_eg_ID119>
- work/*.gltf these are the gltf files that you can inspect for content using the online viewer at
https://gltf-viewer.donmccurdy.com/ or
https://opensim-viewer-git-headless-ayman-habib-s-projects.vercel.app/ (not sure if availble publicly)
- movies/*.mp4
- smart_study_report.html (intermediate report with videos external mainly for tune up/experimenting)
- smart_study_report_embedded.html finished report with embedded videos