jaxsim 0.8.2.dev32__tar.gz → 0.8.3.dev20__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 (141) hide show
  1. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.github/workflows/ci_cd.yml +7 -5
  2. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.github/workflows/gpu_benchmark.yml +2 -2
  3. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.github/workflows/pixi.yml +2 -2
  4. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.pre-commit-config.yaml +4 -4
  5. jaxsim-0.8.3.dev20/CITATION.cff +49 -0
  6. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/PKG-INFO +11 -10
  7. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/README.md +7 -6
  8. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/guide/install.rst +1 -1
  9. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/index.rst +1 -1
  10. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/examples/README.md +4 -4
  11. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/examples/jaxsim_as_multibody_dynamics_library.ipynb +1 -1
  12. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/examples/jaxsim_as_physics_engine.ipynb +2 -2
  13. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/examples/jaxsim_as_physics_engine_advanced.ipynb +3 -3
  14. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/examples/jaxsim_for_robot_controllers.ipynb +4 -4
  15. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/pyproject.toml +4 -4
  16. jaxsim-0.8.3.dev20/src/jaxsim/_version.py +24 -0
  17. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/integrators.py +4 -4
  18. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/kin_dyn_parameters.py +9 -8
  19. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/model.py +58 -37
  20. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/mujoco/__main__.py +2 -15
  21. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/mujoco/loaders.py +4 -5
  22. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/mujoco/model.py +1 -1
  23. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/mujoco/utils.py +1 -1
  24. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/descriptions/model.py +6 -6
  25. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/kinematic_graph.py +3 -3
  26. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/contacts/rigid.py +1 -1
  27. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/contacts/soft.py +1 -1
  28. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/kinematic_constraints.py +1 -1
  29. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/utils/jaxsim_dataclass.py +8 -8
  30. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim.egg-info/PKG-INFO +11 -10
  31. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim.egg-info/SOURCES.txt +1 -0
  32. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/conftest.py +114 -0
  33. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_api_com.py +1 -1
  34. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_api_frame.py +1 -1
  35. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_api_joint.py +1 -1
  36. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_api_link.py +1 -1
  37. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_api_model.py +1 -1
  38. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_api_model_hw_parametrization.py +128 -6
  39. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/utils.py +2 -2
  40. jaxsim-0.8.2.dev32/src/jaxsim/_version.py +0 -34
  41. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.devcontainer/Dockerfile +0 -0
  42. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.devcontainer/devcontainer.json +0 -0
  43. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.gitattributes +0 -0
  44. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.github/CODEOWNERS +0 -0
  45. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.github/dependabot.yml +0 -0
  46. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.github/release.yml +0 -0
  47. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.github/workflows/read_the_docs.yml +0 -0
  48. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.gitignore +0 -0
  49. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/.readthedocs.yaml +0 -0
  50. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/CONTRIBUTING.md +0 -0
  51. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/LICENSE +0 -0
  52. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/Makefile +0 -0
  53. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/conf.py +0 -0
  54. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/examples.rst +0 -0
  55. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/guide/configuration.rst +0 -0
  56. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/make.bat +0 -0
  57. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/modules/api.rst +0 -0
  58. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/modules/math.rst +0 -0
  59. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/modules/mujoco.rst +0 -0
  60. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/modules/parsers.rst +0 -0
  61. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/modules/rbda.rst +0 -0
  62. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/modules/typing.rst +0 -0
  63. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/docs/modules/utils.rst +0 -0
  64. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/environment.yml +0 -0
  65. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/examples/.gitattributes +0 -0
  66. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/examples/.gitignore +0 -0
  67. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/examples/assets/build_cartpole_urdf.py +0 -0
  68. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/examples/assets/cartpole.urdf +0 -0
  69. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/pixi.lock +0 -0
  70. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/setup.cfg +0 -0
  71. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/__init__.py +0 -0
  72. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/__init__.py +0 -0
  73. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/actuation_model.py +0 -0
  74. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/com.py +0 -0
  75. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/common.py +0 -0
  76. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/contact.py +0 -0
  77. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/data.py +0 -0
  78. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/frame.py +0 -0
  79. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/joint.py +0 -0
  80. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/link.py +0 -0
  81. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/ode.py +0 -0
  82. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/api/references.py +0 -0
  83. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/exceptions.py +0 -0
  84. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/logging.py +0 -0
  85. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/__init__.py +0 -0
  86. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/adjoint.py +0 -0
  87. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/cross.py +0 -0
  88. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/inertia.py +0 -0
  89. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/joint_model.py +0 -0
  90. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/quaternion.py +0 -0
  91. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/rotation.py +0 -0
  92. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/skew.py +0 -0
  93. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/transform.py +0 -0
  94. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/math/utils.py +0 -0
  95. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/mujoco/__init__.py +0 -0
  96. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/mujoco/visualizer.py +0 -0
  97. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/__init__.py +0 -0
  98. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/descriptions/__init__.py +0 -0
  99. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/descriptions/collision.py +0 -0
  100. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/descriptions/joint.py +0 -0
  101. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/descriptions/link.py +0 -0
  102. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/rod/__init__.py +0 -0
  103. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/rod/meshes.py +0 -0
  104. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/rod/parser.py +0 -0
  105. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/parsers/rod/utils.py +0 -0
  106. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/__init__.py +0 -0
  107. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/aba.py +0 -0
  108. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/actuation/__init__.py +0 -0
  109. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/actuation/common.py +0 -0
  110. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/collidable_points.py +0 -0
  111. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/contacts/__init__.py +0 -0
  112. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/contacts/common.py +0 -0
  113. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/contacts/relaxed_rigid.py +0 -0
  114. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/crba.py +0 -0
  115. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/forward_kinematics.py +0 -0
  116. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/jacobian.py +0 -0
  117. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/mass_inverse.py +0 -0
  118. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/rnea.py +0 -0
  119. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/rbda/utils.py +0 -0
  120. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/terrain/__init__.py +0 -0
  121. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/terrain/terrain.py +0 -0
  122. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/typing.py +0 -0
  123. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/utils/__init__.py +0 -0
  124. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/utils/tracing.py +0 -0
  125. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim/utils/wrappers.py +0 -0
  126. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim.egg-info/dependency_links.txt +0 -0
  127. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim.egg-info/requires.txt +0 -0
  128. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/src/jaxsim.egg-info/top_level.txt +0 -0
  129. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/__init__.py +0 -0
  130. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/assets/4_bar_opened.urdf +0 -0
  131. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/assets/double_pendulum.sdf +0 -0
  132. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_actuation.py +0 -0
  133. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_api_contact.py +0 -0
  134. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_api_data.py +0 -0
  135. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_automatic_differentiation.py +0 -0
  136. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_benchmark.py +0 -0
  137. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_exceptions.py +0 -0
  138. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_meshes.py +0 -0
  139. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_pytree.py +0 -0
  140. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_simulations.py +0 -0
  141. {jaxsim-0.8.2.dev32 → jaxsim-0.8.3.dev20}/tests/test_visualizer.py +0 -0
@@ -45,7 +45,7 @@ jobs:
45
45
  run: twine check dist/*
46
46
 
47
47
  - name: Upload artifacts
48
- uses: actions/upload-artifact@v5
48
+ uses: actions/upload-artifact@v7
49
49
  with:
50
50
  path: dist/*
51
51
  name: dist
@@ -54,6 +54,8 @@ jobs:
54
54
  name: 'Python${{ matrix.python }}@${{ matrix.os }}'
55
55
  needs: package
56
56
  runs-on: ${{ matrix.os }}
57
+ env:
58
+ PYTHONUTF8: "1"
57
59
  strategy:
58
60
  fail-fast: false
59
61
  matrix:
@@ -75,7 +77,7 @@ jobs:
75
77
  python-version: ${{ matrix.python }}
76
78
 
77
79
  - name: Download Python packages
78
- uses: actions/download-artifact@v6
80
+ uses: actions/download-artifact@v8
79
81
  with:
80
82
  path: dist
81
83
  name: dist
@@ -101,7 +103,7 @@ jobs:
101
103
  with:
102
104
  lfs: true
103
105
 
104
- - uses: prefix-dev/setup-pixi@v0.9.3
106
+ - uses: prefix-dev/setup-pixi@v0.9.4
105
107
  if: contains(matrix.os, 'ubuntu')
106
108
  with:
107
109
  pixi-version: "latest"
@@ -136,7 +138,7 @@ jobs:
136
138
  steps:
137
139
 
138
140
  - name: Download Python packages
139
- uses: actions/download-artifact@v6
141
+ uses: actions/download-artifact@v8
140
142
  with:
141
143
  path: dist
142
144
  name: dist
@@ -146,7 +148,7 @@ jobs:
146
148
 
147
149
  - name: Publish to PyPI
148
150
  if: |
149
- github.repository == 'ami-iit/jaxsim' &&
151
+ github.repository == 'gbionics/jaxsim' &&
150
152
  ((github.event_name == 'push' && github.ref == 'refs/heads/main') ||
151
153
  (github.event_name == 'release'))
152
154
  uses: pypa/gh-action-pypi-publish@release/v1
@@ -46,7 +46,7 @@ jobs:
46
46
 
47
47
  - name: Get benchmark results from main branch
48
48
  id: cache
49
- uses: actions/cache/restore@v4
49
+ uses: actions/cache/restore@v5
50
50
  with:
51
51
  path: ./cache
52
52
  key: ${{ runner.os }}-benchmark
@@ -104,7 +104,7 @@ jobs:
104
104
  auto-push: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
105
105
 
106
106
  - name: Update Benchmark Results cache
107
- uses: actions/cache/save@v4
107
+ uses: actions/cache/save@v5
108
108
  if: ${{ github.ref_name == 'main' }}
109
109
  with:
110
110
  path: ./cache
@@ -22,7 +22,7 @@ jobs:
22
22
  lfs: true
23
23
 
24
24
  - name: Set up pixi
25
- uses: prefix-dev/setup-pixi@v0.9.3
25
+ uses: prefix-dev/setup-pixi@v0.9.4
26
26
  with:
27
27
  run-install: false
28
28
 
@@ -44,7 +44,7 @@ jobs:
44
44
  run: echo "BRANCH_NAME=update-pixi-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
45
45
 
46
46
  - name: Create pull request
47
- uses: peter-evans/create-pull-request@v7
47
+ uses: peter-evans/create-pull-request@v8
48
48
  with:
49
49
  token: ${{ secrets.GITHUB_TOKEN }}
50
50
  commit-message: Update `pixi.lock`
@@ -20,13 +20,13 @@ repos:
20
20
  args: ["--maxkb=2000"]
21
21
 
22
22
  - repo: https://github.com/psf/black-pre-commit-mirror
23
- rev: 25.9.0
23
+ rev: 25.12.0
24
24
  hooks:
25
25
  - id: black
26
26
  args: ["--check", "--diff"]
27
27
 
28
28
  - repo: https://github.com/pycqa/isort
29
- rev: 6.1.0
29
+ rev: 7.0.0
30
30
  hooks:
31
31
  - id: isort
32
32
  args: ["--check", "--diff"]
@@ -45,11 +45,11 @@ repos:
45
45
  args: ["-S", "*.lock"]
46
46
 
47
47
  - repo: https://github.com/astral-sh/ruff-pre-commit
48
- rev: v0.13.3
48
+ rev: v0.14.10
49
49
  hooks:
50
50
  - id: ruff
51
51
 
52
52
  - repo: https://github.com/kynan/nbstripout
53
- rev: 0.8.1
53
+ rev: 0.8.2
54
54
  hooks:
55
55
  - id: nbstripout
@@ -0,0 +1,49 @@
1
+ cff-version: 1.2.0
2
+ title: JaxSim
3
+ message: "If you use this software, please cite the paper."
4
+ type: software
5
+ authors:
6
+ - family-names: Ferretti
7
+ given-names: Filippo Luca
8
+ affiliation: "Generative Bionics"
9
+ - family-names: Ferigo
10
+ given-names: Diego
11
+ affiliation: "Robotics & AI Institute"
12
+ - family-names: Croci
13
+ given-names: Alessandro
14
+ affiliation: "NEURA Robotics"
15
+ - family-names: Sartore
16
+ given-names: Carlotta
17
+ affiliation: "Generative Bionics"
18
+ - family-names: Younis
19
+ given-names: Omar G.
20
+ affiliation: "Quebec AI Institute"
21
+ - family-names: Traversaro
22
+ given-names: Silvio
23
+ affiliation: "Generative Bionics"
24
+ - family-names: Pucci
25
+ given-names: Daniele
26
+ affiliation: "Generative Bionics"
27
+ repository-code: "https://github.com/gbionics/jaxsim"
28
+ license: BSD-3-Clause
29
+ preferred-citation:
30
+ type: article
31
+ title: "Contact-Aware Morphology Optimization via Physically Consistent Differentiable Simulation"
32
+ authors:
33
+ - family-names: Ferretti
34
+ given-names: Filippo Luca
35
+ - family-names: Ferigo
36
+ given-names: Diego
37
+ - family-names: Croci
38
+ given-names: Alessandro
39
+ - family-names: Sartore
40
+ given-names: Carlotta
41
+ - family-names: Younis
42
+ given-names: Omar G.
43
+ - family-names: Traversaro
44
+ given-names: Silvio
45
+ - family-names: Pucci
46
+ given-names: Daniele
47
+ journal: "IEEE Robotics and Automation Letters"
48
+ year: 2026
49
+ doi: "10.1109/LRA.2026.3678125"
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaxsim
3
- Version: 0.8.2.dev32
3
+ Version: 0.8.3.dev20
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>
7
7
  License-Expression: BSD-3-Clause
8
- Project-URL: Changelog, https://github.com/ami-iit/jaxsim/releases
8
+ Project-URL: Changelog, https://github.com/gbionics/jaxsim/releases
9
9
  Project-URL: Documentation, https://jaxsim.readthedocs.io
10
- Project-URL: Source, https://github.com/ami-iit/jaxsim
11
- Project-URL: Tracker, https://github.com/ami-iit/jaxsim/issues
10
+ Project-URL: Source, https://github.com/gbionics/jaxsim
11
+ Project-URL: Tracker, https://github.com/gbionics/jaxsim/issues
12
12
  Keywords: physics,physics engine,jax,rigid body dynamics,featherstone,reinforcement learning,robot,robotics,sdf,urdf
13
13
  Classifier: Development Status :: 4 - Beta
14
14
  Classifier: Framework :: Robot Framework
@@ -378,14 +378,15 @@ Please read the [contributing guide](./CONTRIBUTING.md) to get started.
378
378
 
379
379
  ## Citing
380
380
 
381
- If you use JaxSim in your work, please cite our upcoming paper:
381
+ If you use JaxSim in your work, please cite the following paper:
382
382
 
383
383
  ```bibtex
384
- @software{ferretti_accelerated_optimization_2025,
385
- author = {Filippo Luca Ferretti and Diego Ferigo and Carlotta Sartore and Alessandro Croci and Omar G. Younis and Silvio Traversaro and Daniele Pucci},
386
- title = {Hardware-Accelerated Morphology Optimization via Physically Consistent Differentiable Simulation},
387
- year = {2025},
388
- url = {https://github.com/ami-iit/jaxsim}
384
+ @article{ferretti_contact_aware_2026,
385
+ author = {Filippo Luca Ferretti and Diego Ferigo and Alessandro Croci and Carlotta Sartore and Omar G. Younis and Silvio Traversaro and Daniele Pucci},
386
+ title = {Contact-Aware Morphology Optimization via Physically Consistent Differentiable Simulation},
387
+ journal = {IEEE Robotics and Automation Letters},
388
+ year = {2026},
389
+ doi = {10.1109/LRA.2026.3678125}
389
390
  }
390
391
  ```
391
392
 
@@ -313,14 +313,15 @@ Please read the [contributing guide](./CONTRIBUTING.md) to get started.
313
313
 
314
314
  ## Citing
315
315
 
316
- If you use JaxSim in your work, please cite our upcoming paper:
316
+ If you use JaxSim in your work, please cite the following paper:
317
317
 
318
318
  ```bibtex
319
- @software{ferretti_accelerated_optimization_2025,
320
- author = {Filippo Luca Ferretti and Diego Ferigo and Carlotta Sartore and Alessandro Croci and Omar G. Younis and Silvio Traversaro and Daniele Pucci},
321
- title = {Hardware-Accelerated Morphology Optimization via Physically Consistent Differentiable Simulation},
322
- year = {2025},
323
- url = {https://github.com/ami-iit/jaxsim}
319
+ @article{ferretti_contact_aware_2026,
320
+ author = {Filippo Luca Ferretti and Diego Ferigo and Alessandro Croci and Carlotta Sartore and Omar G. Younis and Silvio Traversaro and Daniele Pucci},
321
+ title = {Contact-Aware Morphology Optimization via Physically Consistent Differentiable Simulation},
322
+ journal = {IEEE Robotics and Automation Letters},
323
+ year = {2026},
324
+ doi = {10.1109/LRA.2026.3678125}
324
325
  }
325
326
  ```
326
327
 
@@ -30,7 +30,7 @@ You can install all by using ``pip install "jaxsim[all]"``.
30
30
  If you need GPU support, please follow the official `installation instruction`_ of JAX.
31
31
 
32
32
  .. _conda: https://anaconda.org/
33
- .. _pyproject.toml: https://github.com/ami-iit/jaxsim/blob/main/pyproject.toml
33
+ .. _pyproject.toml: https://github.com/gbionics/jaxsim/blob/main/pyproject.toml
34
34
  .. _pypa/pip: https://github.com/pypa/pip/
35
35
  .. _virtual environment: https://docs.python.org/3.8/tutorial/venv.html
36
36
  .. _installation instruction: https://github.com/google/jax/#installation
@@ -90,7 +90,7 @@ Features
90
90
  Examples
91
91
  --------
92
92
 
93
- Explore and learn how to use the library through practical demonstrations available in the `examples <https://github.com/ami-iit/jaxsim/tree/main/examples>`__ folder.
93
+ Explore and learn how to use the library through practical demonstrations available in the `examples <https://github.com/gbionics/jaxsim/tree/main/examples>`__ folder.
94
94
 
95
95
  Credits
96
96
  -------
@@ -12,10 +12,10 @@ This folder contains Jupyter notebooks that demonstrate the practical usage of J
12
12
  | [`jaxsim_for_robot_controllers.ipynb`](./jaxsim_for_robot_controllers.ipynb) | [![Open In Colab][colab_badge]][ipynb_jaxsim_closed_loop] | A basic example showing how to simulate a PD controller with gravity compensation for a 2-DOF cart-pole. |
13
13
 
14
14
  [colab_badge]: https://colab.research.google.com/assets/colab-badge.svg
15
- [ipynb_jaxsim_closed_loop]: https://colab.research.google.com/github/ami-iit/jaxsim/blob/main/examples/jaxsim_for_robot_controllers.ipynb
16
- [ipynb_jaxsim_as_physics_engine]: https://colab.research.google.com/github/ami-iit/jaxsim/blob/main/examples/jaxsim_as_physics_engine.ipynb
17
- [jaxsim_as_physics_engine_advanced]: https://colab.research.google.com/github/ami-iit/jaxsim/blob/main/examples/jaxsim_as_physics_engine_advanced.ipynb
18
- [ipynb_jaxsim_as_multibody_dynamics]: https://colab.research.google.com/github/ami-iit/jaxsim/blob/main/examples/jaxsim_as_multibody_dynamics_library.ipynb
15
+ [ipynb_jaxsim_closed_loop]: https://colab.research.google.com/github/gbionics/jaxsim/blob/main/examples/jaxsim_for_robot_controllers.ipynb
16
+ [ipynb_jaxsim_as_physics_engine]: https://colab.research.google.com/github/gbionics/jaxsim/blob/main/examples/jaxsim_as_physics_engine.ipynb
17
+ [jaxsim_as_physics_engine_advanced]: https://colab.research.google.com/github/gbionics/jaxsim/blob/main/examples/jaxsim_as_physics_engine_advanced.ipynb
18
+ [ipynb_jaxsim_as_multibody_dynamics]: https://colab.research.google.com/github/gbionics/jaxsim/blob/main/examples/jaxsim_as_multibody_dynamics_library.ipynb
19
19
 
20
20
  ## How to run the examples
21
21
 
@@ -14,7 +14,7 @@
14
14
  "\n",
15
15
  "A key advantage of JaxSim is its ability to create fully differentiable closed-loop systems, enabling end-to-end optimization. Combined with the flexibility to parameterize model kinematics and dynamics, JaxSim can serve as an excellent playground for robot learning applications.\n",
16
16
  "\n",
17
- "<a target=\"_blank\" href=\"https://colab.research.google.com/github/ami-iit/jaxsim/blob/main/examples/jaxsim_as_multibody_dynamics_library.ipynb\">\n",
17
+ "<a target=\"_blank\" href=\"https://colab.research.google.com/github/gbionics/jaxsim/blob/main/examples/jaxsim_as_multibody_dynamics_library.ipynb\">\n",
18
18
  " <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
19
19
  "</a>\n"
20
20
  ]
@@ -10,7 +10,7 @@
10
10
  "\n",
11
11
  "This notebook shows how to use the key APIs to load a robot model and simulate multiple trajectories simultaneously.\n",
12
12
  "\n",
13
- "<a target=\"_blank\" href=\"https://colab.research.google.com/github/ami-iit/jaxsim/blob/main/examples/jaxsim_as_physics_engine.ipynb\">\n",
13
+ "<a target=\"_blank\" href=\"https://colab.research.google.com/github/gbionics/jaxsim/blob/main/examples/jaxsim_as_physics_engine.ipynb\">\n",
14
14
  " <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
15
15
  "</a>"
16
16
  ]
@@ -81,7 +81,7 @@
81
81
  "[sdformat]: http://sdformat.org/\n",
82
82
  "[urdf]: http://wiki.ros.org/urdf/\n",
83
83
  "[ergocub]: https://ergocub.eu/\n",
84
- "[rod]: https://github.com/ami-iit/rod\n",
84
+ "[rod]: https://github.com/gbionics/rod\n",
85
85
  "\n",
86
86
  "### Create the model and its data\n",
87
87
  " To define a simulation we need two main objects:\n",
@@ -12,7 +12,7 @@
12
12
  "\n",
13
13
  "In this notebook, you'll learn how to use the key APIs to load a simple robot model (a sphere) and simulate multiple trajectories in parallel on GPUs.\n",
14
14
  "\n",
15
- "<a target=\"_blank\" href=\"https://colab.research.google.com/github/ami-iit/jaxsim/blob/main/examples/jaxsim_as_physics_engine_advanced.ipynb\">\n",
15
+ "<a target=\"_blank\" href=\"https://colab.research.google.com/github/gbionics/jaxsim/blob/main/examples/jaxsim_as_physics_engine_advanced.ipynb\">\n",
16
16
  " <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
17
17
  "</a>"
18
18
  ]
@@ -85,13 +85,13 @@
85
85
  "source": [
86
86
  "## Prepare the simulation\n",
87
87
  "\n",
88
- "JaxSim supports loading robot descriptions from both [SDF][sdformat] and [URDF][urdf] files. This is done using the [`ami-iit/rod`][rod] library, which processes these formats.\n",
88
+ "JaxSim supports loading robot descriptions from both [SDF][sdformat] and [URDF][urdf] files. This is done using the [`gbionics/rod`][rod] library, which processes these formats.\n",
89
89
  "\n",
90
90
  "The `rod` library also allows creating in-memory models that can be serialized to SDF or URDF. We'll use this functionality to build a sphere model, which will later be used to create the JaxSim model.\n",
91
91
  "\n",
92
92
  "[sdformat]: http://sdformat.org/\n",
93
93
  "[urdf]: http://wiki.ros.org/urdf/\n",
94
- "[rod]: https://github.com/ami-iit/rod"
94
+ "[rod]: https://github.com/gbionics/rod"
95
95
  ]
96
96
  },
97
97
  {
@@ -12,7 +12,7 @@
12
12
  "\n",
13
13
  "In this notebook, you'll explore how to combine these two core features. Specifically, you'll learn how to load a robot model and design a model-based controller for closed-loop simulations.\n",
14
14
  "\n",
15
- "<a target=\"_blank\" href=\"https://colab.research.google.com/github/ami-iit/jaxsim/blob/main/examples/jaxsim_for_robot_controllers.ipynb\">\n",
15
+ "<a target=\"_blank\" href=\"https://colab.research.google.com/github/gbionics/jaxsim/blob/main/examples/jaxsim_for_robot_controllers.ipynb\">\n",
16
16
  " <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
17
17
  "</a>"
18
18
  ]
@@ -80,13 +80,13 @@
80
80
  "source": [
81
81
  "## Prepare the simulation\n",
82
82
  "\n",
83
- "JaxSim supports loading robot models from both [SDF][sdformat] and [URDF][urdf] files, utilizing the [`ami-iit/rod`][rod] library for processing these formats.\n",
83
+ "JaxSim supports loading robot models from both [SDF][sdformat] and [URDF][urdf] files, utilizing the [`gbionics/rod`][rod] library for processing these formats.\n",
84
84
  "\n",
85
85
  "The `rod` library library can read URDF files and validates them internally using [`gazebosim/sdformat`][sdformat_github]. In this example, we'll load a cart-pole model, which will be used to create the JaxSim simulation model.\n",
86
86
  "\n",
87
87
  "[sdformat]: http://sdformat.org/\n",
88
88
  "[urdf]: http://wiki.ros.org/urdf/\n",
89
- "[rod]: https://github.com/ami-iit/rod\n",
89
+ "[rod]: https://github.com/gbionics/rod\n",
90
90
  "[sdformat_github]: https://github.com/gazebosim/sdformat"
91
91
  ]
92
92
  },
@@ -114,7 +114,7 @@
114
114
  "import urllib\n",
115
115
  "\n",
116
116
  "# Retrieve the file\n",
117
- "url = \"https://raw.githubusercontent.com/ami-iit/jaxsim/refs/heads/main/examples/assets/cartpole.urdf\"\n",
117
+ "url = \"https://raw.githubusercontent.com/gbionics/jaxsim/refs/heads/main/examples/assets/cartpole.urdf\"\n",
118
118
  "model_path, _ = urllib.request.urlretrieve(url)\n",
119
119
  "model_urdf_string = pathlib.Path(model_path).read_text()"
120
120
  ]
@@ -89,10 +89,10 @@ file = "README.md"
89
89
  content-type = "text/markdown"
90
90
 
91
91
  [project.urls]
92
- Changelog = "https://github.com/ami-iit/jaxsim/releases"
92
+ Changelog = "https://github.com/gbionics/jaxsim/releases"
93
93
  Documentation = "https://jaxsim.readthedocs.io"
94
- Source = "https://github.com/ami-iit/jaxsim"
95
- Tracker = "https://github.com/ami-iit/jaxsim/issues"
94
+ Source = "https://github.com/gbionics/jaxsim"
95
+ Tracker = "https://github.com/gbionics/jaxsim/issues"
96
96
 
97
97
  # ===========
98
98
  # Build tools
@@ -198,7 +198,7 @@ ignore = [
198
198
 
199
199
  [tool.pixi.workspace]
200
200
  channels = ["conda-forge"]
201
- platforms = ["linux-64", "osx-arm64", "osx-64"]
201
+ platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64"]
202
202
  requires-pixi = ">=0.39.0"
203
203
 
204
204
  [tool.pixi.environments]
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '0.8.3.dev20'
22
+ __version_tuple__ = version_tuple = (0, 8, 3, 'dev20')
23
+
24
+ __commit_id__ = commit_id = 'ge30726c1c'
@@ -137,10 +137,10 @@ def rk4_integration(
137
137
  # Average the slopes and compute the RK4 state derivative.
138
138
  average = lambda k1, k2, k3, k4: (k1 + 2 * k2 + 2 * k3 + k4) / 6
139
139
 
140
- dxdt = jax.tree_util.tree_map(average, k1, k2, k3, k4)
140
+ dxdt = jax.tree.map(average, k1, k2, k3, k4)
141
141
 
142
142
  # Integrate the dynamics
143
- x_tf = jax.tree_util.tree_map(euler_fin, x_t0, dxdt)
143
+ x_tf = jax.tree.map(euler_fin, x_t0, dxdt)
144
144
 
145
145
  data_tf = dataclasses.replace(
146
146
  data,
@@ -244,10 +244,10 @@ def rk4fast_integration(
244
244
  # Average the slopes and compute the RK4 state derivative.
245
245
  average = lambda k1, k2, k3, k4: (k1 + 2 * k2 + 2 * k3 + k4) / 6
246
246
 
247
- dxdt = jax.tree_util.tree_map(average, k1, k2, k3, k4)
247
+ dxdt = jax.tree.map(average, k1, k2, k3, k4)
248
248
 
249
249
  # Integrate the dynamics
250
- x_tf = jax.tree_util.tree_map(euler_fin, x_t0, dxdt)
250
+ x_tf = jax.tree.map(euler_fin, x_t0, dxdt)
251
251
 
252
252
  data_tf = dataclasses.replace(
253
253
  data,
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import dataclasses
4
+ from itertools import starmap
4
5
  from typing import ClassVar
5
6
 
6
7
  import jax.lax
@@ -143,7 +144,7 @@ class KinDynParameters(JaxsimDataclass):
143
144
  # Create a vectorized object of joint parameters.
144
145
  joint_parameters = (
145
146
  jax.tree.map(lambda *l: jnp.stack(l), *joint_parameters_list)
146
- if len(ordered_joints) > 0
147
+ if ordered_joints
147
148
  else JointParameters(
148
149
  index=jnp.array([], dtype=int),
149
150
  friction_static=jnp.array([], dtype=float),
@@ -245,14 +246,14 @@ class KinDynParameters(JaxsimDataclass):
245
246
 
246
247
  return S[joint_type]
247
248
 
248
- S_J = (
249
- jnp.array(
250
- [
251
- motion_subspace(joint_type, axis)
252
- for joint_type, axis in zip(
249
+ S_J = jnp.array(
250
+ list(
251
+ starmap(
252
+ motion_subspace,
253
+ zip(
253
254
  joint_model.joint_types[1:], joint_model.joint_axis, strict=True
254
- )
255
- ]
255
+ ),
256
+ )
256
257
  )
257
258
  if len(joint_model.joint_axis) != 0
258
259
  else jnp.empty((0, 6, 1))
@@ -141,6 +141,7 @@ class JaxSimModel(JaxsimDataclass):
141
141
  considered_joints: Sequence[str] | None = None,
142
142
  gravity: jtp.FloatLike = jaxsim.math.STANDARD_GRAVITY,
143
143
  constraints: jaxsim.rbda.kinematic_constraints.ConstraintMap | None = None,
144
+ parametrized_links: tuple[str, ...] | None = None,
144
145
  ) -> JaxSimModel:
145
146
  """
146
147
  Build a Model object from a model description.
@@ -170,6 +171,8 @@ class JaxSimModel(JaxsimDataclass):
170
171
  constraints:
171
172
  An object of type ConstraintMap containing the kinematic constraints to consider. If None, no constraints are considered.
172
173
  Note that constraints can be used only with RelaxedRigidContacts.
174
+ parametrized_links:
175
+ The optional list of links to be parametrized. If None, all links are parametrized.
173
176
 
174
177
  Returns:
175
178
  The built Model object.
@@ -202,6 +205,7 @@ class JaxSimModel(JaxsimDataclass):
202
205
  integrator=integrator,
203
206
  gravity=-gravity,
204
207
  constraints=constraints,
208
+ parametrized_links=parametrized_links,
205
209
  )
206
210
 
207
211
  # Store the origin of the model, in case downstream logic needs it.
@@ -212,7 +216,9 @@ class JaxSimModel(JaxsimDataclass):
212
216
  # TODO: move the building of the metadata to KinDynParameters.build()
213
217
  # and use the model_description instead of model.built_from.
214
218
  with model.mutable_context(mutability=Mutability.MUTABLE_NO_VALIDATION):
215
- model.kin_dyn_parameters.hw_link_metadata = model.compute_hw_link_metadata()
219
+ model.kin_dyn_parameters.hw_link_metadata = model.compute_hw_link_metadata(
220
+ parametrized_links=parametrized_links
221
+ )
216
222
 
217
223
  return model
218
224
 
@@ -230,6 +236,7 @@ class JaxSimModel(JaxsimDataclass):
230
236
  integrator: IntegratorType | None = None,
231
237
  gravity: jtp.FloatLike = jaxsim.math.STANDARD_GRAVITY,
232
238
  constraints: jaxsim.rbda.kinematic_constraints.ConstraintMap | None = None,
239
+ parametrized_links: tuple[str, ...] | None = None,
233
240
  ) -> JaxSimModel:
234
241
  """
235
242
  Build a Model object from an intermediate model description.
@@ -254,6 +261,8 @@ class JaxSimModel(JaxsimDataclass):
254
261
  gravity: The gravity constant.
255
262
  constraints:
256
263
  An object of type ConstraintMap containing the kinematic constraints to consider. If None, no constraints are considered.
264
+ parametrized_links:
265
+ The optional list of links to be parametrized. If None, all links are parametrized.
257
266
 
258
267
  Returns:
259
268
  The built Model object.
@@ -320,10 +329,17 @@ class JaxSimModel(JaxsimDataclass):
320
329
 
321
330
  return model
322
331
 
323
- def compute_hw_link_metadata(self) -> HwLinkMetadata:
332
+ def compute_hw_link_metadata(
333
+ self, parametrized_links: tuple[str, ...] | None = None
334
+ ) -> HwLinkMetadata:
324
335
  """
325
336
  Compute the parametric metadata of the links in the model.
326
337
 
338
+ Args:
339
+ parametrized_links:
340
+ An optional tuple of link names to be parametrized. If None,
341
+ all links will be parametrized.
342
+
327
343
  Returns:
328
344
  An instance of HwLinkMetadata containing the metadata of all links.
329
345
  """
@@ -370,19 +386,20 @@ class JaxSimModel(JaxsimDataclass):
370
386
  L_H_pre_masks = []
371
387
  L_H_pre = []
372
388
 
373
- # Process each link
389
+ # Process each link, only parametrizing those in parametrized_links if provided
374
390
  for link_description in ordered_links:
375
391
  link_name = link_description.name
376
392
 
377
- if link_name not in self.link_names():
378
- logging.debug(
379
- f"Skipping link '{link_name}' for hardware parametrization as it is not part of the JaxSim model."
380
- )
381
-
382
- if link_name not in rod_links_dict:
383
- logging.debug(
384
- f"Skipping link '{link_name}' for hardware parametrization as it is not part of the ROD model."
385
- )
393
+ if parametrized_links is not None and link_name not in parametrized_links:
394
+ # Mark as unsupported for non-parametrized links
395
+ shapes.append(LinkParametrizableShape.Unsupported)
396
+ geoms.append([0, 0, 0])
397
+ densities.append(0.0)
398
+ L_H_Gs.append(jnp.eye(4))
399
+ L_H_vises.append(jnp.eye(4))
400
+ L_H_pre_masks.append([0] * self.number_of_joints())
401
+ L_H_pre.append([jnp.eye(4)] * self.number_of_joints())
402
+ continue
386
403
 
387
404
  rod_link = rod_links_dict.get(link_name)
388
405
  link_index = int(js.link.name_to_idx(model=self, link_name=link_name))
@@ -398,7 +415,7 @@ class JaxSimModel(JaxsimDataclass):
398
415
  if not jnp.allclose(
399
416
  self.kin_dyn_parameters.joint_model.suc_H_i[link_index],
400
417
  jnp.eye(4),
401
- **(dict(atol=1e-6) if not jax.config.jax_enable_x64 else dict()),
418
+ **(dict(atol=1e-6) if not jax.config.jax_enable_x64 else {}),
402
419
  ):
403
420
  logging.debug(
404
421
  f"Skipping link '{link_name}' for hardware parametrization due to unsupported suc_H_link."
@@ -561,38 +578,42 @@ class JaxSimModel(JaxsimDataclass):
561
578
  inertia_tensor=inertia_tensor, validate=True
562
579
  )
563
580
 
564
- # Update visual shape
581
+ # Update visuals and collisions
565
582
  dims = hw_metadata.geometry[link_index]
566
- if shape == LinkParametrizableShape.Box:
567
- links_dict[link_name].visual.geometry.box.size = dims.tolist()
568
- links_dict[link_name].collision.geometry.box.size = dims.tolist()
569
- elif shape == LinkParametrizableShape.Sphere:
570
- links_dict[link_name].visual.geometry.sphere.radius = float(dims[0])
571
- links_dict[link_name].collision.geometry.sphere.radius = float(dims[0])
572
- elif shape == LinkParametrizableShape.Cylinder:
573
- links_dict[link_name].visual.geometry.cylinder.radius = float(dims[0])
574
- links_dict[link_name].visual.geometry.cylinder.length = float(dims[1])
575
- links_dict[link_name].collision.geometry.cylinder.radius = float(
576
- dims[0]
577
- )
578
- links_dict[link_name].collision.geometry.cylinder.length = float(
579
- dims[1]
580
- )
581
- else:
582
- logging.debug(f"Skipping unsupported shape for link '{link_name}'")
583
- continue
584
583
 
585
- # Update visual pose
586
- links_dict[link_name].visual.pose = rod.Pose.from_transform(
587
- transform=np.array(hw_metadata.L_H_vis[link_index]),
588
- relative_to=link_name,
584
+ elements_to_update = (
585
+ links_dict[link_name].visual,
586
+ links_dict[link_name].collision,
589
587
  )
590
588
 
591
- links_dict[link_name].collision.pose = rod.Pose.from_transform(
589
+ element_pose = rod.Pose.from_transform(
592
590
  transform=np.array(hw_metadata.L_H_vis[link_index]),
593
591
  relative_to=link_name,
594
592
  )
595
593
 
594
+ for element in elements_to_update:
595
+ if element is None:
596
+ continue
597
+
598
+ # Update geometry
599
+ if shape == LinkParametrizableShape.Box:
600
+ element.geometry.box.size = dims.tolist()
601
+ elif shape == LinkParametrizableShape.Sphere:
602
+ element.geometry.sphere.radius = float(dims[0])
603
+ elif shape == LinkParametrizableShape.Cylinder:
604
+ element.geometry.cylinder.radius = float(dims[0])
605
+ element.geometry.cylinder.length = float(dims[1])
606
+ else:
607
+ # This branch should be unreachable. Unsupported shapes should be
608
+ # filtered out above.
609
+ raise RuntimeError(
610
+ f"Unexpected shape {shape} for link '{link_name}'. "
611
+ "This should never be hit."
612
+ )
613
+
614
+ # Update pose
615
+ element.pose = element_pose
616
+
596
617
  # Update joint poses
597
618
  for joint_index in range(self.number_of_joints()):
598
619
  if hw_metadata.L_H_pre_mask[link_index, joint_index]: