jaxsim 0.2.dev400__tar.gz → 0.2.dev425__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/.github/workflows/ci_cd.yml +1 -1
  2. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/LICENSE +1 -1
  3. jaxsim-0.2.dev425/PKG-INFO +236 -0
  4. jaxsim-0.2.dev425/README.md +171 -0
  5. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/docs/conf.py +8 -17
  6. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/docs/guide/install.rst +2 -2
  7. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/docs/index.rst +58 -44
  8. jaxsim-0.2.dev425/docs/modules/api.rst +68 -0
  9. jaxsim-0.2.dev425/docs/modules/index.rst +19 -0
  10. jaxsim-0.2.dev425/docs/modules/integrators.rst +23 -0
  11. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/docs/modules/math.rst +2 -14
  12. jaxsim-0.2.dev425/docs/modules/mujoco.rst +27 -0
  13. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/docs/modules/parsers.rst +1 -1
  14. jaxsim-0.2.dev425/docs/modules/rbda.rst +59 -0
  15. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/docs/modules/typing.rst +2 -2
  16. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/docs/modules/utils.rst +1 -4
  17. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/environment.yml +3 -0
  18. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/examples/.gitattributes +0 -1
  19. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/examples/.gitignore +0 -1
  20. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/examples/README.md +3 -3
  21. jaxsim-0.2.dev425/examples/assets/cartpole.urdf +83 -0
  22. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/pyproject.toml +1 -0
  23. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/_version.py +2 -2
  24. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/model.py +2 -2
  25. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/mujoco/loaders.py +63 -6
  26. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/mujoco/model.py +38 -19
  27. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/mujoco/visualizer.py +25 -9
  28. jaxsim-0.2.dev425/src/jaxsim.egg-info/PKG-INFO +236 -0
  29. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim.egg-info/SOURCES.txt +5 -3
  30. jaxsim-0.2.dev400/PKG-INFO +0 -182
  31. jaxsim-0.2.dev400/README.md +0 -117
  32. jaxsim-0.2.dev400/docs/modules/high_level.rst +0 -30
  33. jaxsim-0.2.dev400/docs/modules/physics.rst +0 -40
  34. jaxsim-0.2.dev400/docs/modules/simulation.rst +0 -34
  35. jaxsim-0.2.dev400/examples/assets/cartpole.urdf +0 -83
  36. jaxsim-0.2.dev400/src/jaxsim.egg-info/PKG-INFO +0 -182
  37. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/.devcontainer/Dockerfile +0 -0
  38. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/.devcontainer/devcontainer.json +0 -0
  39. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/.github/CODEOWNERS +0 -0
  40. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/.github/workflows/read_the_docs.yml +0 -0
  41. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/.github/workflows/style.yml +0 -0
  42. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/.gitignore +0 -0
  43. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/.pre-commit-config.yaml +0 -0
  44. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/.readthedocs.yaml +0 -0
  45. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/CONTRIBUTING.md +0 -0
  46. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/docs/Makefile +0 -0
  47. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/docs/make.bat +0 -0
  48. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/examples/PD_controller.ipynb +0 -0
  49. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/examples/Parallel_computing.ipynb +0 -0
  50. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/examples/pixi.lock +0 -0
  51. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/examples/pixi.toml +0 -0
  52. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/setup.cfg +0 -0
  53. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/setup.py +0 -0
  54. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/__init__.py +0 -0
  55. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/__init__.py +0 -0
  56. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/com.py +0 -0
  57. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/common.py +0 -0
  58. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/contact.py +0 -0
  59. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/data.py +0 -0
  60. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/joint.py +0 -0
  61. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/kin_dyn_parameters.py +0 -0
  62. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/link.py +0 -0
  63. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/ode.py +0 -0
  64. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/ode_data.py +0 -0
  65. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/api/references.py +0 -0
  66. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/integrators/__init__.py +0 -0
  67. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/integrators/common.py +0 -0
  68. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/integrators/fixed_step.py +0 -0
  69. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/integrators/variable_step.py +0 -0
  70. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/logging.py +0 -0
  71. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/math/__init__.py +0 -0
  72. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/math/adjoint.py +0 -0
  73. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/math/cross.py +0 -0
  74. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/math/inertia.py +0 -0
  75. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/math/joint_model.py +0 -0
  76. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/math/quaternion.py +0 -0
  77. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/math/rotation.py +0 -0
  78. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/math/skew.py +0 -0
  79. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/math/transform.py +0 -0
  80. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/mujoco/__init__.py +0 -0
  81. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/mujoco/__main__.py +0 -0
  82. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/__init__.py +0 -0
  83. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/descriptions/__init__.py +0 -0
  84. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/descriptions/collision.py +0 -0
  85. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/descriptions/joint.py +0 -0
  86. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/descriptions/link.py +0 -0
  87. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/descriptions/model.py +0 -0
  88. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/kinematic_graph.py +0 -0
  89. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/rod/__init__.py +0 -0
  90. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/rod/parser.py +0 -0
  91. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/parsers/rod/utils.py +0 -0
  92. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/rbda/__init__.py +0 -0
  93. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/rbda/aba.py +0 -0
  94. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/rbda/collidable_points.py +0 -0
  95. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/rbda/crba.py +0 -0
  96. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/rbda/forward_kinematics.py +0 -0
  97. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/rbda/jacobian.py +0 -0
  98. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/rbda/rnea.py +0 -0
  99. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/rbda/soft_contacts.py +0 -0
  100. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/rbda/utils.py +0 -0
  101. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/terrain/__init__.py +0 -0
  102. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/terrain/terrain.py +0 -0
  103. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/typing.py +0 -0
  104. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/utils/__init__.py +0 -0
  105. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/utils/hashless.py +0 -0
  106. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/utils/jaxsim_dataclass.py +0 -0
  107. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim/utils/tracing.py +0 -0
  108. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim.egg-info/dependency_links.txt +0 -0
  109. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim.egg-info/not-zip-safe +0 -0
  110. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim.egg-info/requires.txt +0 -0
  111. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/src/jaxsim.egg-info/top_level.txt +0 -0
  112. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/__init__.py +0 -0
  113. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/conftest.py +0 -0
  114. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/test_api_com.py +0 -0
  115. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/test_api_data.py +0 -0
  116. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/test_api_joint.py +0 -0
  117. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/test_api_link.py +0 -0
  118. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/test_api_model.py +0 -0
  119. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/test_automatic_differentiation.py +0 -0
  120. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/test_pytree.py +0 -0
  121. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/test_simulations.py +0 -0
  122. {jaxsim-0.2.dev400 → jaxsim-0.2.dev425}/tests/utils_idyntree.py +0 -0
@@ -92,7 +92,7 @@ jobs:
92
92
  - name: Document installed pip packages
93
93
  shell: bash
94
94
  run: pip list --verbose
95
-
95
+
96
96
  - name: Import the package
97
97
  run: python -c "import jaxsim"
98
98
 
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2022, Artificial and Mechanical Intelligence
3
+ Copyright (c) 2022, Artificial and Mechanical Intelligence
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
@@ -0,0 +1,236 @@
1
+ Metadata-Version: 2.1
2
+ Name: jaxsim
3
+ Version: 0.2.dev425
4
+ Summary: A physics engine in reduced coordinates implemented with JAX.
5
+ Home-page: https://github.com/ami-iit/jaxsim
6
+ Author: Diego Ferigo
7
+ Author-email: diego.ferigo@iit.it
8
+ License: BSD
9
+ Project-URL: Changelog, https://github.com/ami-iit/jaxsim/releases
10
+ Project-URL: Source, https://github.com/ami-iit/jaxsim
11
+ Project-URL: Tracker, https://github.com/ami-iit/jaxsim/issues
12
+ Keywords: physics,physics engine,jax,rigid body dynamics,featherstone,reinforcement learning,robot,robotics,sdf,urdf
13
+ Platform: any
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Framework :: Robot Framework
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: License :: OSI Approved :: BSD License
19
+ Classifier: Operating System :: POSIX :: Linux
20
+ Classifier: Operating System :: MacOS
21
+ Classifier: Operating System :: Microsoft
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3 :: Only
25
+ Classifier: Programming Language :: Python :: Implementation :: CPython
26
+ Classifier: Topic :: Games/Entertainment :: Simulation
27
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
28
+ Classifier: Topic :: Scientific/Engineering :: Physics
29
+ Classifier: Topic :: Software Development
30
+ Requires-Python: >=3.11
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Requires-Dist: coloredlogs
34
+ Requires-Dist: jax>=0.4.13
35
+ Requires-Dist: jaxlib>=0.4.13
36
+ Requires-Dist: jaxlie>=1.3.0
37
+ Requires-Dist: jax_dataclasses>=1.4.0
38
+ Requires-Dist: pptree
39
+ Requires-Dist: rod>=0.2.0
40
+ Requires-Dist: typing_extensions; python_version < "3.12"
41
+ Provides-Extra: style
42
+ Requires-Dist: black[jupyter]~=24.0; extra == "style"
43
+ Requires-Dist: isort; extra == "style"
44
+ Requires-Dist: pre-commit; extra == "style"
45
+ Provides-Extra: testing
46
+ Requires-Dist: idyntree; extra == "testing"
47
+ Requires-Dist: pytest>=6.0; extra == "testing"
48
+ Requires-Dist: pytest-icdiff; extra == "testing"
49
+ Requires-Dist: robot-descriptions; extra == "testing"
50
+ Provides-Extra: viz
51
+ Requires-Dist: lxml; extra == "viz"
52
+ Requires-Dist: mediapy; extra == "viz"
53
+ Requires-Dist: mujoco>=3.0.0; extra == "viz"
54
+ Provides-Extra: all
55
+ Requires-Dist: black[jupyter]~=24.0; extra == "all"
56
+ Requires-Dist: isort; extra == "all"
57
+ Requires-Dist: pre-commit; extra == "all"
58
+ Requires-Dist: idyntree; extra == "all"
59
+ Requires-Dist: pytest>=6.0; extra == "all"
60
+ Requires-Dist: pytest-icdiff; extra == "all"
61
+ Requires-Dist: robot-descriptions; extra == "all"
62
+ Requires-Dist: lxml; extra == "all"
63
+ Requires-Dist: mediapy; extra == "all"
64
+ Requires-Dist: mujoco>=3.0.0; extra == "all"
65
+
66
+ # JaxSim
67
+
68
+ JaxSim is a **differentiable physics engine** and **multibody dynamics library** designed for applications in control and robot learning, implemented with JAX.
69
+
70
+ Its design facilitates research and accelerates prototyping in the intersection of robotics and artificial intelligence.
71
+
72
+ ## Features
73
+
74
+ - Physics engine in reduced coordinates supporting fixed-base and floating-base robots.
75
+ - Multibody dynamics library providing all the necessary components for developing model-based control algorithms.
76
+ - Completely developed in Python with [`google/jax`][jax] following a functional programming paradigm.
77
+ - Transparent support for running on CPUs, GPUs, and TPUs.
78
+ - Full support for JIT compilation for increased performance.
79
+ - Full support for automatic vectorization for massive parallelization of open-loop and closed-loop architectures.
80
+ - Support for SDF models and, upon conversion with [sdformat][sdformat], URDF models.
81
+ - Visualization based on the [passive viewer][passive_viewer_mujoco] of Mujoco.
82
+
83
+ ### JaxSim as a simulator
84
+
85
+ - Wide range of fixed-step explicit Runge-Kutta integrators.
86
+ - Support for variable-step integrators implemented as embedded Runge-Kutta schemes.
87
+ - Improved stability by optionally integrating the base orientation on the $\text{SO}(3)$ manifold.
88
+ - Soft contacts model supporting full friction cone and sticking-slipping transition.
89
+ - Collision detection between points rigidly attached to bodies and uneven ground surfaces.
90
+
91
+ ### JaxSim as a multibody dynamics library
92
+
93
+ - Provides rigid body dynamics algorithms (RBDAs) like RNEA, ABA, CRBA, and Jacobians.
94
+ - Provides all the quantities included in the Euler-Poincarè formulation of the equations of motion.
95
+ - Supports body-fixed, inertial-fixed, and mixed [velocity representations][notation].
96
+ - Exposes all the necessary quantities to develop controllers in centroidal coordinates.
97
+
98
+ ### JaxSim for robot learning
99
+
100
+ - Being developed with JAX, all the RBDAs support automatic differentiation both in forward and reverse modes.
101
+ - Support for automatically differentiating against kinematics and dynamics parameters.
102
+ - All fixed-step integrators are forward and reverse differentiable.
103
+ - All variable-step integrators are forward differentiable.
104
+ - Ideal for sampling synthetic data for reinforcement learning (RL).
105
+ - Ideal for designing physics-informed neural networks (PINNs) with loss functions requiring model-based quantities.
106
+ - Ideal for combining model-based control with learning-based components.
107
+
108
+ [jax]: https://github.com/google/jax/
109
+ [sdformat]: https://github.com/gazebosim/sdformat
110
+ [notation]: https://research.tue.nl/en/publications/multibody-dynamics-notation-version-2
111
+ [passive_viewer_mujoco]: https://mujoco.readthedocs.io/en/stable/python.html#passive-viewer
112
+
113
+ > [!WARNING]
114
+ > This project is still experimental, APIs could change between releases without notice.
115
+
116
+ > [!NOTE]
117
+ > JaxSim currently focuses on locomotion applications.
118
+ > Only contacts between bodies and smooth ground surfaces are supported.
119
+
120
+ ## Documentation
121
+
122
+ The JaxSim API documentation is available at [jaxsim.readthedocs.io][readthedocs].
123
+
124
+ [readthedocs]: https://jaxsim.readthedocs.io/
125
+
126
+ ## Installation
127
+
128
+ <details>
129
+ <summary>With conda</summary>
130
+
131
+ You can install the project using [`conda`][conda] as follows:
132
+
133
+ ```bash
134
+ conda install jaxsim -c conda-forge
135
+ ```
136
+
137
+ You can enforce GPU support, if needed, by also specifying `"jaxlib = * = *cuda*"`.
138
+
139
+ </details>
140
+
141
+ <details>
142
+ <summary>With pip</summary>
143
+
144
+ You can install the project using [`pypa/pip`][pip], preferably in a [virtual environment][venv], as follows:
145
+
146
+ ```bash
147
+ pip install jaxsim
148
+ ```
149
+
150
+ Check [`setup.cfg`](setup.cfg) for the complete list of optional dependencies.
151
+ You can obtain a full installation using `jaxsim[all]`.
152
+
153
+ If you need GPU support, follow the official [installation instructions][jax_gpu] of JAX.
154
+
155
+ </details>
156
+
157
+ <details>
158
+ <summary>Contributors installation</summary>
159
+
160
+ If you want to contribute to the project, we recommend creating the following `jaxsim` conda environment first:
161
+
162
+ ```bash
163
+ conda env create -f environment.yml
164
+ ```
165
+
166
+ Then, activate the environment and install the project in editable mode:
167
+
168
+ ```bash
169
+ conda activate jaxsim
170
+ pip install --no-deps -e .
171
+ ```
172
+
173
+ </details>
174
+
175
+ [conda]: https://anaconda.org/
176
+ [pip]: https://github.com/pypa/pip/
177
+ [venv]: https://docs.python.org/3/tutorial/venv.html
178
+ [jax_gpu]: https://github.com/google/jax/#installation
179
+
180
+ ## Credits
181
+
182
+ The RBDAs are based on the theory of the [Rigid Body Dynamics Algorithms][RBDA]
183
+ book by Roy Featherstone.
184
+ The algorithms and some simulation features were inspired by its accompanying [code][spatial_v2].
185
+
186
+ [RBDA]: https://link.springer.com/book/10.1007/978-1-4899-7560-7
187
+ [spatial_v2]: http://royfeatherstone.org/spatial/index.html#spatial-software
188
+
189
+ The development of JaxSim started in late 2021, inspired by early versions of [`google/brax`][brax].
190
+ At that time, Brax was implemented in maximal coordinates, and we wanted a physics engine in reduced coordinates.
191
+ We are grateful to the Brax team for their work and showing the potential of [JAX][jax] in this field.
192
+
193
+ Brax v2 was later implemented reduced coordinates, following an approach comparable to JaxSim.
194
+ The development then shifted to [MJX][mjx], which today provides a JAX-based implementation of the Mujoco APIs.
195
+
196
+ The main differences between MJX/Brax and JaxSim are as follows:
197
+
198
+ - JaxSim supports out-of-the-box all SDF models with [Pose Frame Semantics][PFS].
199
+ - JaxSim only supports collisions between points rigidly attached to bodies and a compliant ground surface.
200
+ Our contact model requires careful tuning of its spring-damper parameters, but being an instantaneous
201
+ function of the state $(\mathbf{q}, \boldsymbol{\nu})$, it doesn't require running any optimization algorithm
202
+ when stepping the simulation forward.
203
+ - JaxSim mitigates the stiffness of the contact-aware system dynamics by providing variable-step integrators.
204
+
205
+ [brax]: https://github.com/google/brax
206
+ [mjx]: https://mujoco.readthedocs.io/en/3.0.0/mjx.html
207
+ [PFS]: http://sdformat.org/tutorials?tut=pose_frame_semantics
208
+
209
+ ## Contributing
210
+
211
+ We welcome contributions from the community.
212
+ Please read the [contributing guide](./CONTRIBUTING.md) to get started.
213
+
214
+ ## Citing
215
+
216
+ ```bibtex
217
+ @software{ferigo_jaxsim_2022,
218
+ author = {Diego Ferigo and Filippo Luca Ferretti and Silvio Traversaro and Daniele Pucci},
219
+ title = {{JaxSim}: A Differentiable Physics Engine and Multibody Dynamics Library for Control and Robot Learning},
220
+ url = {http://github.com/ami-iit/jaxsim},
221
+ year = {2022},
222
+ }
223
+ ```
224
+
225
+ ## People
226
+
227
+ | Author | Maintainers |
228
+ |:------:|:-----------:|
229
+ | [<img src="https://avatars.githubusercontent.com/u/469199?v=4" width="40">][df] | [<img src="https://avatars.githubusercontent.com/u/102977828?v=4" width="40">][ff] [<img src="https://avatars.githubusercontent.com/u/469199?v=4" width="40">][df] |
230
+
231
+ [df]: https://github.com/diegoferigo
232
+ [ff]: https://github.com/flferretti
233
+
234
+ ## License
235
+
236
+ [BSD3](https://choosealicense.com/licenses/bsd-3-clause/)
@@ -0,0 +1,171 @@
1
+ # JaxSim
2
+
3
+ JaxSim is a **differentiable physics engine** and **multibody dynamics library** designed for applications in control and robot learning, implemented with JAX.
4
+
5
+ Its design facilitates research and accelerates prototyping in the intersection of robotics and artificial intelligence.
6
+
7
+ ## Features
8
+
9
+ - Physics engine in reduced coordinates supporting fixed-base and floating-base robots.
10
+ - Multibody dynamics library providing all the necessary components for developing model-based control algorithms.
11
+ - Completely developed in Python with [`google/jax`][jax] following a functional programming paradigm.
12
+ - Transparent support for running on CPUs, GPUs, and TPUs.
13
+ - Full support for JIT compilation for increased performance.
14
+ - Full support for automatic vectorization for massive parallelization of open-loop and closed-loop architectures.
15
+ - Support for SDF models and, upon conversion with [sdformat][sdformat], URDF models.
16
+ - Visualization based on the [passive viewer][passive_viewer_mujoco] of Mujoco.
17
+
18
+ ### JaxSim as a simulator
19
+
20
+ - Wide range of fixed-step explicit Runge-Kutta integrators.
21
+ - Support for variable-step integrators implemented as embedded Runge-Kutta schemes.
22
+ - Improved stability by optionally integrating the base orientation on the $\text{SO}(3)$ manifold.
23
+ - Soft contacts model supporting full friction cone and sticking-slipping transition.
24
+ - Collision detection between points rigidly attached to bodies and uneven ground surfaces.
25
+
26
+ ### JaxSim as a multibody dynamics library
27
+
28
+ - Provides rigid body dynamics algorithms (RBDAs) like RNEA, ABA, CRBA, and Jacobians.
29
+ - Provides all the quantities included in the Euler-Poincarè formulation of the equations of motion.
30
+ - Supports body-fixed, inertial-fixed, and mixed [velocity representations][notation].
31
+ - Exposes all the necessary quantities to develop controllers in centroidal coordinates.
32
+
33
+ ### JaxSim for robot learning
34
+
35
+ - Being developed with JAX, all the RBDAs support automatic differentiation both in forward and reverse modes.
36
+ - Support for automatically differentiating against kinematics and dynamics parameters.
37
+ - All fixed-step integrators are forward and reverse differentiable.
38
+ - All variable-step integrators are forward differentiable.
39
+ - Ideal for sampling synthetic data for reinforcement learning (RL).
40
+ - Ideal for designing physics-informed neural networks (PINNs) with loss functions requiring model-based quantities.
41
+ - Ideal for combining model-based control with learning-based components.
42
+
43
+ [jax]: https://github.com/google/jax/
44
+ [sdformat]: https://github.com/gazebosim/sdformat
45
+ [notation]: https://research.tue.nl/en/publications/multibody-dynamics-notation-version-2
46
+ [passive_viewer_mujoco]: https://mujoco.readthedocs.io/en/stable/python.html#passive-viewer
47
+
48
+ > [!WARNING]
49
+ > This project is still experimental, APIs could change between releases without notice.
50
+
51
+ > [!NOTE]
52
+ > JaxSim currently focuses on locomotion applications.
53
+ > Only contacts between bodies and smooth ground surfaces are supported.
54
+
55
+ ## Documentation
56
+
57
+ The JaxSim API documentation is available at [jaxsim.readthedocs.io][readthedocs].
58
+
59
+ [readthedocs]: https://jaxsim.readthedocs.io/
60
+
61
+ ## Installation
62
+
63
+ <details>
64
+ <summary>With conda</summary>
65
+
66
+ You can install the project using [`conda`][conda] as follows:
67
+
68
+ ```bash
69
+ conda install jaxsim -c conda-forge
70
+ ```
71
+
72
+ You can enforce GPU support, if needed, by also specifying `"jaxlib = * = *cuda*"`.
73
+
74
+ </details>
75
+
76
+ <details>
77
+ <summary>With pip</summary>
78
+
79
+ You can install the project using [`pypa/pip`][pip], preferably in a [virtual environment][venv], as follows:
80
+
81
+ ```bash
82
+ pip install jaxsim
83
+ ```
84
+
85
+ Check [`setup.cfg`](setup.cfg) for the complete list of optional dependencies.
86
+ You can obtain a full installation using `jaxsim[all]`.
87
+
88
+ If you need GPU support, follow the official [installation instructions][jax_gpu] of JAX.
89
+
90
+ </details>
91
+
92
+ <details>
93
+ <summary>Contributors installation</summary>
94
+
95
+ If you want to contribute to the project, we recommend creating the following `jaxsim` conda environment first:
96
+
97
+ ```bash
98
+ conda env create -f environment.yml
99
+ ```
100
+
101
+ Then, activate the environment and install the project in editable mode:
102
+
103
+ ```bash
104
+ conda activate jaxsim
105
+ pip install --no-deps -e .
106
+ ```
107
+
108
+ </details>
109
+
110
+ [conda]: https://anaconda.org/
111
+ [pip]: https://github.com/pypa/pip/
112
+ [venv]: https://docs.python.org/3/tutorial/venv.html
113
+ [jax_gpu]: https://github.com/google/jax/#installation
114
+
115
+ ## Credits
116
+
117
+ The RBDAs are based on the theory of the [Rigid Body Dynamics Algorithms][RBDA]
118
+ book by Roy Featherstone.
119
+ The algorithms and some simulation features were inspired by its accompanying [code][spatial_v2].
120
+
121
+ [RBDA]: https://link.springer.com/book/10.1007/978-1-4899-7560-7
122
+ [spatial_v2]: http://royfeatherstone.org/spatial/index.html#spatial-software
123
+
124
+ The development of JaxSim started in late 2021, inspired by early versions of [`google/brax`][brax].
125
+ At that time, Brax was implemented in maximal coordinates, and we wanted a physics engine in reduced coordinates.
126
+ We are grateful to the Brax team for their work and showing the potential of [JAX][jax] in this field.
127
+
128
+ Brax v2 was later implemented reduced coordinates, following an approach comparable to JaxSim.
129
+ The development then shifted to [MJX][mjx], which today provides a JAX-based implementation of the Mujoco APIs.
130
+
131
+ The main differences between MJX/Brax and JaxSim are as follows:
132
+
133
+ - JaxSim supports out-of-the-box all SDF models with [Pose Frame Semantics][PFS].
134
+ - JaxSim only supports collisions between points rigidly attached to bodies and a compliant ground surface.
135
+ Our contact model requires careful tuning of its spring-damper parameters, but being an instantaneous
136
+ function of the state $(\mathbf{q}, \boldsymbol{\nu})$, it doesn't require running any optimization algorithm
137
+ when stepping the simulation forward.
138
+ - JaxSim mitigates the stiffness of the contact-aware system dynamics by providing variable-step integrators.
139
+
140
+ [brax]: https://github.com/google/brax
141
+ [mjx]: https://mujoco.readthedocs.io/en/3.0.0/mjx.html
142
+ [PFS]: http://sdformat.org/tutorials?tut=pose_frame_semantics
143
+
144
+ ## Contributing
145
+
146
+ We welcome contributions from the community.
147
+ Please read the [contributing guide](./CONTRIBUTING.md) to get started.
148
+
149
+ ## Citing
150
+
151
+ ```bibtex
152
+ @software{ferigo_jaxsim_2022,
153
+ author = {Diego Ferigo and Filippo Luca Ferretti and Silvio Traversaro and Daniele Pucci},
154
+ title = {{JaxSim}: A Differentiable Physics Engine and Multibody Dynamics Library for Control and Robot Learning},
155
+ url = {http://github.com/ami-iit/jaxsim},
156
+ year = {2022},
157
+ }
158
+ ```
159
+
160
+ ## People
161
+
162
+ | Author | Maintainers |
163
+ |:------:|:-----------:|
164
+ | [<img src="https://avatars.githubusercontent.com/u/469199?v=4" width="40">][df] | [<img src="https://avatars.githubusercontent.com/u/102977828?v=4" width="40">][ff] [<img src="https://avatars.githubusercontent.com/u/469199?v=4" width="40">][df] |
165
+
166
+ [df]: https://github.com/diegoferigo
167
+ [ff]: https://github.com/flferretti
168
+
169
+ ## License
170
+
171
+ [BSD3](https://choosealicense.com/licenses/bsd-3-clause/)
@@ -4,23 +4,13 @@ import sys
4
4
 
5
5
  from pkg_resources import get_distribution
6
6
 
7
+ if os.environ.get("READTHEDOCS"):
8
+ checkout_name = os.path.basename(os.path.dirname(os.path.realpath(__file__)))
9
+ os.environ["CONDA_PREFIX"] = os.path.realpath(
10
+ os.path.join("..", "..", "conda", checkout_name)
11
+ )
7
12
 
8
- def _add_annotations_import(path):
9
- with open(path, "r+") as f:
10
- contents = f.read()
11
- if not contents.startswith("from __future__ import annotations"):
12
- f.seek(0, 0)
13
- f.write("from __future__ import annotations " + contents)
14
-
15
-
16
- def _recursive_add_annotations_import():
17
- for path, _, files in os.walk("../jaxsim/"):
18
- for file in [f for f in files if f.endswith(".py")]:
19
- _add_annotations_import(os.path.join(path, file))
20
-
21
-
22
- if "READTHEDOCS" in os.environ:
23
- _recursive_add_annotations_import()
13
+ import jaxsim
24
14
 
25
15
  # -- Version information
26
16
 
@@ -58,13 +48,14 @@ extensions = [
58
48
  "sphinx_autodoc_typehints",
59
49
  "sphinx_multiversion",
60
50
  "enum_tools.autoenum",
51
+ "sphinx_design",
61
52
  ]
62
53
 
63
54
  # -- Options for intersphinx extension
64
55
 
65
56
  language = "en"
66
57
 
67
- html_theme = "sphinx_rtd_theme"
58
+ html_theme = "sphinx_book_theme"
68
59
 
69
60
  templates_path = ["_templates"]
70
61
 
@@ -6,12 +6,12 @@ Installation
6
6
  Prerequisites
7
7
  -------------
8
8
 
9
- JAXsim requires Python 3.11 or later.
9
+ JAXsim requires Python 3.11 or later.
10
10
 
11
11
  Basic Installation
12
12
  ------------------
13
13
 
14
- You can install the project with using `conda`_:
14
+ You can install the project with using `conda`_:
15
15
 
16
16
  .. code-block:: bash
17
17
 
@@ -3,30 +3,68 @@ JAXsim
3
3
 
4
4
  A scalable physics engine and multibody dynamics library implemented with JAX. With JIT batteries 🔋
5
5
 
6
- .. warning::
7
- This project is still experimental, APIs could change without notice.
8
-
9
6
  .. note::
10
7
  This simulator currently focuses on locomotion applications. Only contacts with ground are supported.
11
8
 
12
9
  Features
13
10
  --------
14
11
 
15
- - Physics engine in reduced coordinates implemented with `JAX <https://github.com/google/jax/>`_ in Python.
16
- - JIT compilation of Python code for increased performance.
17
- - Transparent support to execute logic on CPUs, GPUs, and TPUs.
18
- - Parallel multi-body simulations on hardware accelerators for significantly increased throughput.
19
- - Support for SDF models (and, upon conversion, URDF models).
20
- - Collision detection between bodies and uneven ground surface.
21
- - Soft contacts model supporting full friction cone and sticking / slipping transition.
22
- - Complete support for inertial properties of rigid bodies.
23
- - Revolute, prismatic, and fixed joints support.
24
- - Integrators: forward Euler, semi-implicit Euler, Runge-Kutta 4.
25
- - High-level classes for object-oriented programming.
26
- - High-level classes to compute multi-body dynamics quantities from simulation state.
27
- - High-level classes wrapping the low-level functional RBDAs with support of `multiple velocities representations <https://research.tue.nl/en/publications/multibody-dynamics-notation-version-2>`_.
28
- - Default validation of JAX pytrees to prevent JIT re-compilations.
29
- - Preliminary support for automatic differentiation of RBDAs.
12
+ .. grid::
13
+
14
+ .. grid-item::
15
+ :columns: 12 12 12 6
16
+
17
+ .. card:: Performance
18
+ :class-card: sd-border-0
19
+ :shadow: none
20
+ :class-title: sd-fs-5
21
+
22
+ .. div:: sd-font-normal
23
+
24
+ Physics engine in reduced coordinates implemented with `JAX <https://github.com/google/jax/>`_.
25
+ Compatibility with JIT compilation for increased performance and transparent support to execute logic on CPUs, GPUs, and TPUs.
26
+ Parallel multi-body simulations on hardware accelerators for significantly increased throughput
27
+
28
+ .. grid-item::
29
+ :columns: 12 12 12 6
30
+
31
+ .. card:: Model Parsing
32
+ :class-card: sd-border-0
33
+ :shadow: none
34
+ :class-title: sd-fs-5
35
+
36
+ .. div:: sd-font-normal
37
+
38
+ Support for SDF models (and, upon conversion, URDF models). Revolute, prismatic, and fixed joints supported.
39
+
40
+ .. grid-item::
41
+ :columns: 12 12 12 6
42
+
43
+ .. card:: Automatic Differentiation
44
+ :class-card: sd-border-0
45
+ :shadow: none
46
+ :class-title: sd-fs-5
47
+
48
+ .. div:: sd-font-normal
49
+
50
+ Support for automatic differentiation of rigid body dynamics algorithms (RBDAs) for model-based robotics research.
51
+ Soft contacts model supporting full friction cone and sticking / slipping transition.
52
+
53
+ .. grid-item::
54
+ :columns: 12 12 12 6
55
+
56
+ .. card:: Complex Dynamics
57
+ :class-card: sd-border-0
58
+ :shadow: none
59
+ :class-title: sd-fs-5
60
+
61
+ .. div:: sd-font-normal
62
+
63
+ JAXsim provides a variety of integrators for the simulation of multibody dynamics, including RK4, Heun, Euler, and more.
64
+ Support of `multiple velocities representations <https://research.tue.nl/en/publications/multibody-dynamics-notation-version-2>`_.
65
+
66
+
67
+ ----
30
68
 
31
69
  .. toctree::
32
70
  :hidden:
@@ -37,17 +75,10 @@ Features
37
75
 
38
76
  .. toctree::
39
77
  :hidden:
40
- :maxdepth: 2
78
+ :maxdepth: 1
41
79
  :caption: JAXsim API
42
80
 
43
- modules/high_level
44
- modules/math
45
- modules/parsers
46
- modules/physics
47
- modules/simulation
48
- modules/typing
49
- modules/utils
50
-
81
+ modules/index
51
82
 
52
83
  Examples
53
84
  --------
@@ -73,23 +104,6 @@ Here below we summarize the differences between the projects:
73
104
  - Contrarily to brax, JAXsim only supports collision detection between bodies and a compliant ground surface.
74
105
  - The RBDAs of JAXsim support automatic differentiation, but this functionality has not been thoroughly tested.
75
106
 
76
- Contributing
77
- ------------
78
-
79
- Pull requests are welcome.
80
- For major changes, please open an issue first to discuss what you would like to change.
81
-
82
- Citing
83
- ------
84
-
85
- .. code-block:: bibtex
86
-
87
- @software{ferigo_jaxsim_2022,
88
- author = {Diego Ferigo and Silvio Traversaro and Daniele Pucci},
89
- title = {{JAXsim}: A Physics Engine in Reduced Coordinates and Multibody Dynamics Library for Control and Robot Learning},
90
- url = {http://github.com/ami-iit/jaxsim},
91
- year = {2022},
92
- }
93
107
 
94
108
  People
95
109
  ------
@@ -0,0 +1,68 @@
1
+ Functional API
2
+ ==============
3
+
4
+ .. currentmodule:: jaxsim.api
5
+
6
+ Model
7
+ ~~~~~
8
+
9
+ .. automodule:: jaxsim.api.model
10
+ :members:
11
+
12
+ Data
13
+ ~~~~
14
+
15
+ .. automodule:: jaxsim.api.data
16
+ :members:
17
+
18
+ Contact
19
+ ~~~~~~~
20
+
21
+ .. automodule:: jaxsim.api.contact
22
+ :members:
23
+
24
+ KinDynParameters
25
+ ~~~~~~~~~~~~~~~~
26
+
27
+ .. automodule:: jaxsim.api.kin_dyn_parameters
28
+ :members:
29
+
30
+ Joint
31
+ ~~~~~
32
+
33
+ .. automodule:: jaxsim.api.joint
34
+ :members:
35
+
36
+ Link
37
+ ~~~~~
38
+ .. automodule:: jaxsim.api.link
39
+ :members:
40
+
41
+ CoM
42
+ ~~~
43
+ .. automodule:: jaxsim.api.com
44
+ :members:
45
+
46
+ ODE Data
47
+ ~~~~~~~~
48
+
49
+ .. automodule:: jaxsim.api.ode_data
50
+ :members:
51
+
52
+ .. automodule:: jaxsim.api.ode
53
+ :members:
54
+
55
+ References
56
+ ~~~~~~~~~~
57
+
58
+ .. automodule:: jaxsim.api.references
59
+ :members:
60
+
61
+ Common
62
+ ~~~~~~
63
+
64
+ .. autoflag:: jaxsim.api.common.VelRepr
65
+ :members:
66
+
67
+ .. autoclass:: jaxsim.api.common.ModelDataWithVelocityRepresentation
68
+ :members: