jaxsim 0.7.1.dev67__py3-none-any.whl → 0.7.1.dev74__py3-none-any.whl

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.
jaxsim/_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.7.1.dev67'
21
- __version_tuple__ = version_tuple = (0, 7, 1, 'dev67')
20
+ __version__ = version = '0.7.1.dev74'
21
+ __version_tuple__ = version_tuple = (0, 7, 1, 'dev74')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaxsim
3
- Version: 0.7.1.dev67
3
+ Version: 0.7.1.dev74
4
4
  Summary: A differentiable physics engine and multibody dynamics library for control and robot learning.
5
5
  Author-email: Diego Ferigo <dgferigo@gmail.com>, Filippo Luca Ferretti <filippoluca.ferretti@outlook.com>
6
6
  Maintainer-email: Filippo Luca Ferretti <filippo.ferretti@iit.it>, Alessandro Croci <alessandro.croci@iit.it>
@@ -63,31 +63,44 @@ Dynamic: license-file
63
63
 
64
64
  # JaxSim
65
65
 
66
- **JaxSim** is a **differentiable physics engine** and **multibody dynamics library** built with JAX, tailored for control and robotic learning applications.
66
+ **JaxSim** is a **differentiable physics engine** built with JAX, tailored for co-design and robotic learning applications.
67
67
 
68
68
  <div align="center">
69
69
  <br/>
70
70
  <table>
71
71
  <tr>
72
- <th><img src="https://github.com/user-attachments/assets/f9661fae-9a85-41dd-9a58-218758ec8c9c"></th>
73
- <th><img src="https://github.com/user-attachments/assets/62b88b9d-45ea-4d22-99d2-f24fc842dd29"></th>
72
+ <th><img src="https://github.com/user-attachments/assets/89d0b4ca-7e0c-4f58-bf3e-9540e35b9a01" style="height:300px; width:400px; object-fit:cover;"></th>
73
+ <th><img src="https://github.com/user-attachments/assets/a909e388-d7b4-4b58-89f1-035da8636d94" style="height:300px; width:400px; object-fit:cover;"></th>
74
+ </tr>
75
+ <tr>
76
+ <th><img src="https://github.com/user-attachments/assets/3692bc06-18ed-406d-80bd-480780346224" style="height:300px; width:400px; object-fit:cover;"></th>
77
+ <th><img src="https://github.com/user-attachments/assets/3356f332-4710-4946-9a82-a8c2305dab88" style="height:300px; width:400px; object-fit:cover;"></th>
74
78
  </tr>
75
79
  </table>
76
80
  <br/>
77
81
  </div>
78
82
 
83
+
84
+
79
85
  ## Features
86
+
87
+ - Physically consistent differentiability w.r.t. hardware parameters.
88
+ - Closed chain dynamics support.
80
89
  - Reduced-coordinate physics engine for **fixed-base** and **floating-base** robots.
81
- - Multibody dynamics library for model-based control algorithms.
82
90
  - Fully Python-based, leveraging [jax][jax] following a functional programming paradigm.
83
91
  - Seamless execution on CPUs, GPUs, and TPUs.
84
92
  - Supports JIT compilation and automatic vectorization for high performance.
85
93
  - Compatible with SDF models and URDF (via [sdformat][sdformat] conversion).
86
94
 
87
- ## Usage
88
95
 
89
- ### Using JaxSim as simulator
96
+ > [!WARNING]
97
+ > This project is still experimental, APIs could change between releases without notice.
90
98
 
99
+ > [!NOTE]
100
+ > JaxSim currently focuses on locomotion applications.
101
+ > Only contacts between bodies and smooth ground surfaces are supported.
102
+
103
+ ## How to use it
91
104
 
92
105
  ```python
93
106
  import pathlib
@@ -136,82 +149,13 @@ for _ in T:
136
149
  )
137
150
  ```
138
151
 
139
- ### Using JaxSim as a multibody dynamics library
140
- ``` python
141
- import pathlib
142
-
143
- import icub_models
144
- import jax.numpy as jnp
145
-
146
- import jaxsim.api as js
147
-
148
- # Load the iCub model
149
- model_path = icub_models.get_model_file("iCubGazeboV2_5")
150
-
151
- joints = ('torso_pitch', 'torso_roll', 'torso_yaw', 'l_shoulder_pitch',
152
- 'l_shoulder_roll', 'l_shoulder_yaw', 'l_elbow', 'r_shoulder_pitch',
153
- 'r_shoulder_roll', 'r_shoulder_yaw', 'r_elbow', 'l_hip_pitch',
154
- 'l_hip_roll', 'l_hip_yaw', 'l_knee', 'l_ankle_pitch', 'l_ankle_roll',
155
- 'r_hip_pitch', 'r_hip_roll', 'r_hip_yaw', 'r_knee', 'r_ankle_pitch',
156
- 'r_ankle_roll')
157
-
158
- # Build and reduce the model
159
- model_description = pathlib.Path(model_path)
160
-
161
- full_model = js.model.JaxSimModel.build_from_model_description(
162
- model_description=model_description, time_step=0.0001, is_urdf=True
163
- )
164
-
165
- model = js.model.reduce(model=full_model, considered_joints=joints)
166
-
167
- # Initialize model data
168
- data = js.data.JaxSimModelData.build(
169
- model=model,
170
- base_position=jnp.array([0.0, 0.0, 1.0]),
171
- )
172
-
173
- # Frame and dynamics computations
174
- frame_index = js.frame.name_to_idx(model=model, frame_name="l_foot")
175
-
176
- # Frame transformation
177
- W_H_F = js.frame.transform(
178
- model=model, data=data, frame_index=frame_index
179
- )
180
-
181
- # Frame Jacobian
182
- W_J_F = js.frame.jacobian(
183
- model=model, data=data, frame_index=frame_index
184
- )
185
-
186
- # Dynamics properties
187
- M = js.model.free_floating_mass_matrix(model=model, data=data) # Mass matrix
188
- h = js.model.free_floating_bias_forces(model=model, data=data) # Bias forces
189
- g = js.model.free_floating_gravity_forces(model=model, data=data) # Gravity forces
190
- C = js.model.free_floating_coriolis_matrix(model=model, data=data) # Coriolis matrix
191
-
192
- # Print dynamics results
193
- print(f"{M.shape=} \n{h.shape=} \n{g.shape=} \n{C.shape=}")
194
- ```
195
-
196
- ### Additional features
197
-
198
- - Full support for automatic differentiation of RBDAs (forward and reverse modes) with JAX.
199
- - Support for automatically differentiating against kinematics and dynamics parameters.
200
- - All fixed-step integrators are forward and reverse differentiable.
201
- - Check the example folder for additional use cases!
152
+ Check the example folder for additional use cases!
202
153
 
203
154
  [jax]: https://github.com/google/jax/
204
155
  [sdformat]: https://github.com/gazebosim/sdformat
205
156
  [notation]: https://research.tue.nl/en/publications/multibody-dynamics-notation-version-2
206
157
  [passive_viewer_mujoco]: https://mujoco.readthedocs.io/en/stable/python.html#passive-viewer
207
158
 
208
- > [!WARNING]
209
- > This project is still experimental, APIs could change between releases without notice.
210
-
211
- > [!NOTE]
212
- > JaxSim currently focuses on locomotion applications.
213
- > Only contacts between bodies and smooth ground surfaces are supported.
214
-
215
159
  ## Installation
216
160
 
217
161
  <details>
@@ -335,70 +279,66 @@ The JaxSim API documentation is available at [jaxsim.readthedocs.io][readthedocs
335
279
 
336
280
  [readthedocs]: https://jaxsim.readthedocs.io/
337
281
 
282
+ ## Additional features
283
+ Jaxsim can also be used as a multi-body dynamic library! With full support for automatic differentiation of RBDAs (forwards and reverse mode) and automatic differentiation against both kinematic and dynamic parameters.
338
284
 
339
- ## Overview
340
285
 
341
- <details>
342
- <summary>Structure of the Python package</summary>
286
+ ### Using JaxSim as a multibody dynamics library
287
+ ``` python
288
+ import pathlib
343
289
 
344
- ```
345
- # tree -L 2 -I "__pycache__" -I "__init__*" -I "__main__*" src/jaxsim
346
-
347
- src/jaxsim
348
- |-- api..........................# Package containing the main functional APIs.
349
- | |-- actuation_model.py.......# |-- APIs for computing quantities related to the actuation model.
350
- | |-- common.py................# |-- Common utilities used in the current package.
351
- | |-- com.py...................# |-- APIs for computing quantities related to the center of mass.
352
- | |-- contact_model.py.........# |-- APIs for computing quantities related to the contact model.
353
- | |-- contact.py...............# |-- APIs for computing quantities related to the collidable points.
354
- | |-- data.py..................# |-- Class storing the data of a simulated model.
355
- | |-- frame.py.................# |-- APIs for computing quantities related to additional frames.
356
- | |-- integrators.py...........# |-- APIs for integrating the system dynamics.
357
- | |-- joint.py.................# |-- APIs for computing quantities related to the joints.
358
- | |-- kin_dyn_parameters.py....# |-- Class storing kinematic and dynamic parameters of a model.
359
- | |-- link.py..................# |-- APIs for computing quantities related to the links.
360
- | |-- model.py.................# |-- Class defining a simulated model and APIs for computing related quantities.
361
- | |-- ode.py...................# |-- APIs for computing quantities related to the system dynamics.
362
- | `-- references.py............# `-- Helper class to create references (link forces and joint torques).
363
- |-- exceptions.py................# Module containing functions to raise exceptions from JIT-compiled functions.
364
- |-- logging.py...................# Module containing logging utilities.
365
- |-- math.........................# Package containing mathematical utilities.
366
- | |-- adjoint.py...............# |-- APIs for creating and manipulating 6D transformations.
367
- | |-- cross.py.................# |-- APIs for computing cross products of 6D quantities.
368
- | |-- inertia.py...............# |-- APIs for creating and manipulating 6D inertia matrices.
369
- | |-- joint_model.py...........# |-- APIs defining the supported joint model and the corresponding transformations.
370
- | |-- quaternion.py............# |-- APIs for creating and manipulating quaternions.
371
- | |-- rotation.py..............# |-- APIs for creating and manipulating rotation matrices.
372
- | |-- skew.py..................# |-- APIs for creating and manipulating skew-symmetric matrices.
373
- | |-- transform.py.............# |-- APIs for creating and manipulating homogeneous transformations.
374
- | |-- utils.py.................# |-- Common utilities used in the current package.
375
- |-- mujoco.......................# Package containing utilities to interact with the Mujoco passive viewer.
376
- | |-- loaders.py...............# |-- Utilities for converting JaxSim models to Mujoco models.
377
- | |-- model.py.................# |-- Class providing high-level methods to compute quantities using Mujoco.
378
- | `-- visualizer.py............# `-- Class that simplifies opening the passive viewer and recording videos.
379
- |-- parsers......................# Package containing utilities to parse model descriptions (SDF and URDF models).
380
- | |-- descriptions/............# |-- Package containing the intermediate representation of a model description.
381
- | |-- kinematic_graph.py.......# |-- Definition of the kinematic graph associated with a parsed model description.
382
- | `-- rod/.....................# `-- Package to create the intermediate representation from model descriptions using ROD.
383
- |-- rbda.........................# Package containing the low-level rigid body dynamics algorithms.
384
- | |-- aba.py...................# |-- The Articulated Body Algorithm.
385
- | |-- collidable_points.py.....# |-- Kinematics of collidable points.
386
- | |-- contacts/................# |-- Package containing the supported contact models.
387
- | |-- crba.py..................# |-- The Composite Rigid Body Algorithm.
388
- | |-- forward_kinematics.py....# |-- Forward kinematics of the model.
389
- | |-- jacobian.py..............# |-- Full Jacobian and full Jacobian derivative.
390
- | |-- rnea.py..................# |-- The Recursive Newton-Euler Algorithm.
391
- | `-- utils.py.................# `-- Common utilities used in the current package.
392
- |-- terrain......................# Package containing resources to specify the terrain.
393
- | `-- terrain.py...............# `-- Classes defining the supported terrains.
394
- |-- typing.py....................# Module containing type hints.
395
- `-- utils........................# Package of common utilities.
396
- |-- jaxsim_dataclass.py......# |-- Utilities to operate on pytree dataclasses.
397
- |-- tracing.py...............# |-- Utilities to use when JAX is tracing functions.
398
- `-- wrappers.py..............# `-- Utilities to wrap objects for specific use cases on pytree dataclass attributes.
399
- ```
290
+ import icub_models
291
+ import jax.numpy as jnp
400
292
 
401
- </details>
293
+ import jaxsim.api as js
294
+
295
+ # Load the iCub model
296
+ model_path = icub_models.get_model_file("iCubGazeboV2_5")
297
+
298
+ joints = ('torso_pitch', 'torso_roll', 'torso_yaw', 'l_shoulder_pitch',
299
+ 'l_shoulder_roll', 'l_shoulder_yaw', 'l_elbow', 'r_shoulder_pitch',
300
+ 'r_shoulder_roll', 'r_shoulder_yaw', 'r_elbow', 'l_hip_pitch',
301
+ 'l_hip_roll', 'l_hip_yaw', 'l_knee', 'l_ankle_pitch', 'l_ankle_roll',
302
+ 'r_hip_pitch', 'r_hip_roll', 'r_hip_yaw', 'r_knee', 'r_ankle_pitch',
303
+ 'r_ankle_roll')
304
+
305
+ # Build and reduce the model
306
+ model_description = pathlib.Path(model_path)
307
+
308
+ full_model = js.model.JaxSimModel.build_from_model_description(
309
+ model_description=model_description, time_step=0.0001, is_urdf=True
310
+ )
311
+
312
+ model = js.model.reduce(model=full_model, considered_joints=joints)
313
+
314
+ # Initialize model data
315
+ data = js.data.JaxSimModelData.build(
316
+ model=model,
317
+ base_position=jnp.array([0.0, 0.0, 1.0]),
318
+ )
319
+
320
+ # Frame and dynamics computations
321
+ frame_index = js.frame.name_to_idx(model=model, frame_name="l_foot")
322
+
323
+ # Frame transformation
324
+ W_H_F = js.frame.transform(
325
+ model=model, data=data, frame_index=frame_index
326
+ )
327
+
328
+ # Frame Jacobian
329
+ W_J_F = js.frame.jacobian(
330
+ model=model, data=data, frame_index=frame_index
331
+ )
332
+
333
+ # Dynamics properties
334
+ M = js.model.free_floating_mass_matrix(model=model, data=data) # Mass matrix
335
+ h = js.model.free_floating_bias_forces(model=model, data=data) # Bias forces
336
+ g = js.model.free_floating_gravity_forces(model=model, data=data) # Gravity forces
337
+ C = js.model.free_floating_coriolis_matrix(model=model, data=data) # Coriolis matrix
338
+
339
+ # Print dynamics results
340
+ print(f"{M.shape=} \n{h.shape=} \n{g.shape=} \n{C.shape=}")
341
+ ```
402
342
 
403
343
  ## Credits
404
344
 
@@ -1,5 +1,5 @@
1
1
  jaxsim/__init__.py,sha256=EKeysKN-7UswwJLCl7n6qIBKQIVUtYsCMYu_tCoFn7g,3628
2
- jaxsim/_version.py,sha256=lpdTbG3YGqsTW99QEMoIM2-xJyn_Dn0BtpgLEgp87Pg,526
2
+ jaxsim/_version.py,sha256=pCLQbCXpNozmRe1kt1RDq6Enlt2AEbJJaf53Ij3sVN0,526
3
3
  jaxsim/exceptions.py,sha256=MQ3LRMfVMX2-g3qYj7mUVNV9OLlIA48TANJegbcQyXI,2641
4
4
  jaxsim/logging.py,sha256=STI-D_upXZYX-ZezLrlJJ0UlD5YspST0vZ_DcIwkzO4,1553
5
5
  jaxsim/typing.py,sha256=7msl8t5Jt09RNYfKdPJtpjLfWurldcycDappb045Eso,761
@@ -66,8 +66,8 @@ jaxsim/utils/__init__.py,sha256=Y5zyoRevl3EMVQadhZ4EtSwTEkDt2vcnFoRhPJjKTZ0,215
66
66
  jaxsim/utils/jaxsim_dataclass.py,sha256=XzmZeIibcaOzaxpprsGSxH3UrM66PAO456rFV91sNXg,11453
67
67
  jaxsim/utils/tracing.py,sha256=Btwxdfhb7fJLk3r5PlQkGYj60Y2KbFT1gANGIA697FU,530
68
68
  jaxsim/utils/wrappers.py,sha256=3IMwydqFgmSPqeuUQ3PRmdhDc1IoT6XC23jPC_LjWXs,4175
69
- jaxsim-0.7.1.dev67.dist-info/licenses/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
70
- jaxsim-0.7.1.dev67.dist-info/METADATA,sha256=7v2LSaRywF24f2A9JQhgum9D0VLTs-CZ1zj7UXkTVa0,18639
71
- jaxsim-0.7.1.dev67.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
- jaxsim-0.7.1.dev67.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
73
- jaxsim-0.7.1.dev67.dist-info/RECORD,,
69
+ jaxsim-0.7.1.dev74.dist-info/licenses/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
70
+ jaxsim-0.7.1.dev74.dist-info/METADATA,sha256=xwGW7dxTFE1_tYK31AY50GFpcudug0Azyrnmnl8YSeY,14086
71
+ jaxsim-0.7.1.dev74.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
+ jaxsim-0.7.1.dev74.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
73
+ jaxsim-0.7.1.dev74.dist-info/RECORD,,