pyorerun

Rerun c3d files, biorbd, OpenSim models from python.

https://github.com/pyomeca/pyorerun

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary

Keywords

biomechanics bioptim biorbd c3d msk-modelling multibody-dynamics rerun visualization
Last synced: 10 months ago · JSON representation

Repository

Rerun c3d files, biorbd, OpenSim models from python.

Basic Info
  • Host: GitHub
  • Owner: pyomeca
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 23.7 MB
Statistics
  • Stars: 16
  • Watchers: 1
  • Forks: 4
  • Open Issues: 5
  • Releases: 20
Topics
biomechanics bioptim biorbd c3d msk-modelling multibody-dynamics rerun visualization
Created over 2 years ago · Last pushed 12 months ago
Metadata Files
Readme License Citation

README.md

Pyorerun

Maintainability Maintainability Conda Version

We can rerun c3d files and display their original content. And also animate biorbd models from the pyomeca organization.

conda install -c conda-forge pyorerun rerun-sdk=0.21

conda install opensim-org::opensim # not a mandatory dependency

Rerun .c3d - As simple as that

``` python3 import pyorerun as prr

prr.c3d("example.c3d") ```

https://github.com/pyomeca/pyorerun/assets/40755537/3cdd39f6-d88d-4891-8ffd-d14c93a9c94e

NOTE: Only handle markers, force plates, floor for now

Notebook demo

https://github.com/pyomeca/pyorerun/assets/40755537/c9448d69-c891-4362-821b-68449684eb64

Rerun Biorbd Models

``` python3 from pyorerun import BiorbdModel, PhaseRerun

nbframes = 10 nbseconds = 0.1 tspan = np.linspace(0, nbseconds, nb_frames)

model = BiorbdModel("models/WuShoulderModelkinovascaledadjusted2.bioMod") q = np.zeros((model.model.nbQ(), nb_frames))

viz = PhaseRerun(tspan) viz.addanimatedmodel(model, q) viz.rerun("mskmodel") ```

https://github.com/pyomeca/pyorerun/assets/40755537/9341707a-4f44-4dbd-8ece-9a16e1500e9a

Play with joint DoFs q, Live.

``` python3 from pyorerun import LiveModelAnimation

modelpath = "models/WuShoulderModelkinovascaledadjusted2.bioMod" animation = LiveModelAnimation(modelpath, withqcharts=True) animation.rerun() ```

From source

conda install -c conda-forge ezc3d rerun-sdk=0.21 trimesh numpy biorbd pyomeca tk imageio imageio-ffmpeg

if you want to use the OpenSim, you also need to install separately: conda install -c opensim-org::opensim

Then, ensure it is accessible in your Python environment by installing the package:

pip install . or python setup.py install

On Linux

Rerun should work out-of-the-box on Mac and Windows, but on Linux, you need first to run:

sudo apt-get -y install \ libclang-dev \ libatk-bridge2.0 \ libfontconfig1-dev \ libfreetype6-dev \ libglib2.0-dev \ libgtk-3-dev \ libssl-dev \ libxcb-render0-dev \ libxcb-shape0-dev \ libxcb-xfixes0-dev \ libxkbcommon-dev \ patchelf

Citing

@software{pierre_puchaud_2024_11449215, author = {Pierre Puchaud, Mickael Begon}, title = {pyomeca/pyorerun: CaffeineStrips}, month = jun, year = 2024, publisher = {Zenodo}, version = {1.2.4}, doi = {10.5281/zenodo.11449215}, url = {https://doi.org/10.5281/zenodo.11449215} }

Contributing

Contributions are welcome. I will be happy to review and help you to improve the code.

Owner

  • Name: pyomeca
  • Login: pyomeca
  • Kind: organization
  • Location: Montréal

Biomechanics library

GitHub Events

Total
  • Create event: 10
  • Issues event: 8
  • Release event: 12
  • Watch event: 6
  • Member event: 1
  • Issue comment event: 88
  • Push event: 27
  • Pull request review event: 24
  • Pull request review comment event: 13
  • Pull request event: 39
  • Fork event: 2
Last Year
  • Create event: 10
  • Issues event: 8
  • Release event: 12
  • Watch event: 6
  • Member event: 1
  • Issue comment event: 88
  • Push event: 27
  • Pull request review event: 24
  • Pull request review comment event: 13
  • Pull request event: 39
  • Fork event: 2

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 5
  • Total pull requests: 20
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 1 month
  • Total issue authors: 2
  • Total pull request authors: 4
  • Average comments per issue: 0.4
  • Average comments per pull request: 1.0
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 5
  • Pull requests: 19
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 9 days
  • Issue authors: 2
  • Pull request authors: 4
  • Average comments per issue: 0.4
  • Average comments per pull request: 1.0
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Ipuch (6)
  • EveCharbie (3)
  • aaa34169 (1)
  • mickaelbegon (1)
Pull Request Authors
  • Ipuch (45)
  • EveCharbie (8)
  • aceglia (1)
  • Copilot (1)
Top Labels
Issue Labels
enhancement (4) bug (2) good first issue (1) question (1)
Pull Request Labels

Dependencies

pyproject.toml pypi
  • numpy *
  • pyomeca *
  • rerun-sdk *
  • trimesh *
setup.py pypi
  • biorbd *
  • ezc3d *
  • numpy *
  • pyomeca *
  • rerun-sdk *
  • trimesh *
environment.yml pypi