https://github.com/csu-hmc/gait2d
A musculoskeletal dynamics model for posture and gait.
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 6 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
A musculoskeletal dynamics model for posture and gait.
Basic Info
- Host: GitHub
- Owner: csu-hmc
- License: other
- Language: C
- Default Branch: master
- Homepage: http://hmc.csuohio.edu
- Size: 141 KB
Statistics
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 11
- Releases: 0
Created over 12 years ago
· Last pushed 10 months ago
Metadata Files
Readme
License
README.rst
Introduction
============
gait2d is a dynamic model that contains the essential elements for simulating
human gait in the sagittal plane. The model has been used in earlier forms by
Ackermann and van den Bogert (2010) [Ackermann2010]_ and by Gerritsen et al.
(1998) [Gerritsen1998]_. The main features of the model are:
- Seven body segments
- Fast execution
Model dynamics and outputs are twice differentiable with respect to all inputs,
which is important for certain numerical methods for simulation and optimal
control. The model is intended for education and basic research. The model can
be used for studies such as Ackermann and van den Bogert (2010) and Geyer and
Herr (2010) [Geyer2010]_.
The included Autolev model was originally written by Ton van den Bogert and
adapted by Jason K. Moore. The SymPy Mechanics model was created by Jason to
match the Autolev model results for use with PyDy and opty.
Speed
=====
The cythonized Autolev C code takes about 5 micro seconds per rhs eval and the
PyDy Cython version takes about 15 microseconds (the PyDy version is slower
because of the Python level linear solve on the full mass matrix, but only for
forward dynamics).
Install
=======
This package has not yet been released to PyPi, so install from the development
source::
git clone https://github.com/csu-hmc/gait2d
cd gait2d
conda env create -f gait2d-dev.yml
conda activate gait2d-dev
python -m pip install --no-deps --no-build-isolation --editable .
Usage
=====
pygait2d
--------
See ``examples/run.py``.
algait2de
---------
To manually build the Autolev model and make use of it in Python::
$ cd algait2d
$ al gait2de.al
$ python autolevclean.py
$ cd ..
$ python setup.py build_ext --inplace
$ python
>>> from algait2de import gait2de
>>> gait2de.evaluate_autolev_rhs(...)
Model Description
=================
The model is planar (xy plane) and there are seven rigid bodies. All rotations
are defined to be about the z axis. When all configuration variables are set to
zero, the model is standing upright and the trunk's hip joint is at the
inertial origin with the human facing in the positive x direction.
Rigid bodies and constants
--------------------------
- Trunk (A):
- ``ma``: mass [kg]
- ``ia``: moment of inertia about mass center wrt to the trunk reference
frame [kg*m^2]
- ``xa``: local x location of mass center wrt to the hip joint [m]
- ``ya``: local y location of mass center wrt to the hip joint [m]
- Right Thigh (B)
- ``mb``: mass [kg]
- ``ib``: moment of inertia about mass center wrt to right thigh reference
frame [kg*m^2]
- ``xb``: local x location of mass center wrt to the hip joint [m]
- ``yb``: local y location of mass center wrt to the hip joint [m]
- ``lb``: joint to joint segment length [m]
- Right Shank (C)
- ``mc``: mass [kg]
- ``ic``: moment of inertia about mass center wrt to right shank reference
frame [kg*m^2]
- ``xc``: x location of mass center wrt to the knee joint [m]
- ``yc``: y location of mass center wrt to the knee joint [m]
- ``lc``: joint to joint segment length [m]
- Right Foot (D)
- ``md``: mass [kg]
- ``id``: moment of inertia about mass center wrt to right foot reference
frame [kg*m^2]
- ``xd``: local x location of mass center wrt to the ankle joint [m]
- ``yd``: local y location of mass center wrt to the ankle joint [m]
- ``hxd``: local x location of heel wrt to the ankle joint [m]
- ``txd``: local x location of toe wrt to the ankle joint [m]
- ``fyd``: local y location of heel and toe relative to ankle joint [m]
- Left Thigh (E)
- ``me``: mass [kg]
- ``ie``: moment of inertia about mass center wrt to left thigh reference
frame [kg*m^2]
- ``xe``: local x location of mass center wrt to the hip joint [m]
- ``ye``: local y location of mass center wrt to the hip joint [m]
- ``le``: joint to joint segment length [m]
- Left Shank (F)
- ``mf``: mass [kg]
- ``if``: moment of inertia about mass center wrt to left shank reference
frame [kg*m^2]
- ``xf``: x location of mass center wrt to the knee joint [m]
- ``yf``: y location of mass center wrt to the knee joint [m]
- ``lf``: joint to joint segment length [m]
- Left Foot (G)
- ``mg``: mass [kg]
- ``ig``: moment of inertia about mass center wrt to left foot reference
frame [kg*m^2]
- ``xg``: local x location of mass center wrt to the ankle joint [m]
- ``yg``: local y location of mass center wrt to the ankle joint [m]
- ``hxg``: local x location of heel wrt to the ankle joint [m]
- ``txg``: local x location of toe wrt to the ankle joint [m]
- ``fyg``: local y location of heel and toe relative to ankle joint [m]
- Other constants
- ``kc``: ground contact stiffness [N/m^3]
- ``cc``: ground contact damping [s/m]
- ``mu``: friction coefficient
- ``vs``: velocity constant [m/s]
- ``g``: acceleration due to gravity [m/s^2]
Generalized coordinates
-----------------------
- ``qax, qay``: location of trunk hip joint relative to inertial origin
- ``qa``: angle of trunk relative to inertial reference frame, ``qa=0`` makes
trunk standing upright and ``qa>0`` leans trunk backwards
- ``qb``: angle of right thigh relative to trunk (hip), ``qb=0`` makes thigh
aligned with trunk and ``qb>0`` abducts the hip
- ``qc``: angle of right shank relative to right thigh (knee), ``qc=0`` makes
shank aligned with thigh and ``qc>0`` extends the knee
- ``qd``: angle of right foot relative to right shank (ankle), ``qd=0`` makes
foot 90 deg to shank and ``qd>0`` dorsiflexes the foot
- ``qe``: angle of left thigh relative to trunk (hip), ``qe=0`` makes thigh
aligned with trunk and ``qe>0`` abducts the hip
- ``qf``: angle of left shank relative to left thigh (knee), ``qf=0`` makes
shank aligned with thigh and ``qf>0`` extends the knee
- ``qg``: angle of left foot relative to left shank (ankle), ``qg=0`` makes
foot 90 deg to shank and ``qg>0`` dorsiflexes the foot
Specified inputs
----------------
- ``Fax, Fay``: "hand of god", forces acting on the trunk mass center relative
to inertial origin
- ``Ta``: "hand of god", torque acting on trunk relative to inertial frame
- ``Tb``: hip joint torque, ``Tb>0`` extends the hip
- ``Tc``: knee joint torque, ``Tc>0`` abducts the knee
- ``Td``: ankle joint torque, ``Td>0`` plantarflexes the foot
- ``Te``: hip joint torque, ``Te>0`` extends the hip
- ``Tf``: knee joint torque, ``Tf>0`` abducts the knee
- ``Tg``: ankle joint torque, ``Tg>0`` plantarflexes the foot
References
==========
.. [Gerritsen1998] Gerritsen, K. G. M., Bogert, A. J. van den, Hulliger, M., &
Zernicke, R. F. (1998). Intrinsic Muscle Properties Facilitate Locomotor
Control—A Computer Simulation Study. Motor Control, 2(3), 206–220.
https://doi.org/10.1123/mcj.2.3.206
.. [Ackermann2010] Ackermann, M., & van den Bogert, A. J. (2010). Optimality
principles for model-based prediction of human gait. Journal of
Biomechanics, 43(6), 1055–1060.
https://doi.org/10.1016/j.jbiomech.2009.12.012
.. [Geyer2010] Geyer, H., & Herr, H. (2010). A Muscle-Reflex Model that Encodes
Principles of Legged Mechanics Produces Human Walking Dynamics and Muscle
Activities. Neural Systems and Rehabilitation Engineering, IEEE Transactions
On, 18(3). https://doi.org/10.1109/TNSRE.2010.2047592
Owner
- Name: CSU Human Motion and Control Lab
- Login: csu-hmc
- Kind: organization
- Location: Cleveland, Ohio, USA
- Website: http://hmc.csuohio.edu
- Repositories: 30
- Profile: https://github.com/csu-hmc
GitHub Events
Total
- Issues event: 13
- Delete event: 1
- Issue comment event: 23
- Push event: 31
- Pull request event: 4
- Create event: 2
Last Year
- Issues event: 13
- Delete event: 1
- Issue comment event: 23
- Push event: 31
- Pull request event: 4
- Create event: 2
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 10
- Total pull requests: 2
- Average time to close issues: 3 months
- Average time to close pull requests: about 7 hours
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.7
- Average comments per pull request: 0.5
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 9
- Pull requests: 2
- Average time to close issues: 4 days
- Average time to close pull requests: about 7 hours
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.56
- Average comments per pull request: 0.5
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- moorepants (11)
Pull Request Authors
- moorepants (4)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
setup.py
pypi
- pydy *
- pyyaml *
- sympy *
.github/workflows/test.yml
actions
- actions/checkout v4 composite
- conda-incubator/setup-miniconda v3 composite