A collection of ready-to-use PyChrono examples, targeting
PyChrono 10.0. This is the 10.0 line of pychrono-examples-9.0: the curated examples
were ported from 9.0 to the 10.0 API and verified by running them against a real PyChrono 10.0
install.
Each top-level folder focuses on one class of models (e.g. vehicle, mbs, fea, sensor,
robotics, ros); a misc subfolder holds assorted models.
Every example in the main tree has been verified on PyChrono 10.0 (imports, constructs, and
advances the simulation a few steps headless without error). Examples that still need updating for
10.0 live under wip/. See STATUS.md for the full list and the reason each wip/
example is pending (most are FEA demos affected by the 10.0 visualization API change).
# In a PyChrono 10.0 environment, e.g.:
# conda create -n pychrono -c conda-forge python=3.12
# conda install -n pychrono -c projectchrono -c conda-forge pychrono
conda run -n pychrono python vehicle/hmmwv/hmmwv.pyMost examples open an Irrlicht visualization window. They use the Chrono data shipped with PyChrono, so no extra assets are required beyond what each example folder contains.
tools/ holds the machinery used to produce and check this repo, so it can be re-run against
future PyChrono releases:
tools/migrate.py- the 9.0 -> 10.0 mechanical migration porter.tools/verify_runner.py/tools/verify_all.py- run examples headless (visualization stubbed, a few steps) and report pass/fail.tools/_verify_report.json- the latest verification results.
conda run -n pychrono python tools/verify_all.py # verify everything
conda run -n pychrono python tools/verify_all.py vehicle # verify one folderPull requests that fix a wip/ example for 10.0 (move it into the main tree, verified) or add new
models are very welcome.
BSD-style, same as Project Chrono. See LICENSE.