jaxsim 0.5.1.dev95__py3-none-any.whl → 0.5.1.dev103__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/__init__.py +11 -3
- jaxsim/_version.py +2 -2
- jaxsim/exceptions.py +3 -2
- jaxsim/parsers/rod/utils.py +3 -3
- jaxsim/typing.py +1 -1
- {jaxsim-0.5.1.dev95.dist-info → jaxsim-0.5.1.dev103.dist-info}/METADATA +1 -1
- {jaxsim-0.5.1.dev95.dist-info → jaxsim-0.5.1.dev103.dist-info}/RECORD +10 -10
- {jaxsim-0.5.1.dev95.dist-info → jaxsim-0.5.1.dev103.dist-info}/LICENSE +0 -0
- {jaxsim-0.5.1.dev95.dist-info → jaxsim-0.5.1.dev103.dist-info}/WHEEL +0 -0
- {jaxsim-0.5.1.dev95.dist-info → jaxsim-0.5.1.dev103.dist-info}/top_level.txt +0 -0
jaxsim/__init__.py
CHANGED
@@ -8,19 +8,27 @@ def _jnp_options() -> None:
|
|
8
8
|
|
9
9
|
import jax
|
10
10
|
|
11
|
-
# Check if running on TPU
|
11
|
+
# Check if running on TPU.
|
12
12
|
is_tpu = jax.devices()[0].platform == "tpu"
|
13
13
|
|
14
|
+
# Check if running on Metal.
|
15
|
+
is_metal = jax.devices()[0].platform == "METAL"
|
16
|
+
|
14
17
|
# Enable by default 64-bit precision to get accurate physics.
|
15
18
|
# Users can enforce 32-bit precision by setting the following variable to 0.
|
16
19
|
use_x64 = os.environ.get("JAX_ENABLE_X64", "1") != "0"
|
17
20
|
|
18
21
|
# Notify the user if unsupported 64-bit precision was enforced on TPU.
|
19
|
-
if is_tpu and use_x64:
|
20
|
-
msg = "64-bit precision is not allowed on
|
22
|
+
if (is_tpu or is_metal) and use_x64:
|
23
|
+
msg = f"64-bit precision is not allowed on {jax.devices()[0].platform.upper}. Enforcing 32bit precision."
|
21
24
|
logging.warning(msg)
|
22
25
|
use_x64 = False
|
23
26
|
|
27
|
+
if is_metal:
|
28
|
+
logging.warning(
|
29
|
+
"JAX Metal backend is experimental. Some functionalities may not be available."
|
30
|
+
)
|
31
|
+
|
24
32
|
# Enable 64-bit precision in JAX.
|
25
33
|
if use_x64:
|
26
34
|
logging.info("Enabling JAX to use 64-bit precision")
|
jaxsim/_version.py
CHANGED
@@ -12,5 +12,5 @@ __version__: str
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
13
13
|
version_tuple: VERSION_TUPLE
|
14
14
|
|
15
|
-
__version__ = version = '0.5.1.
|
16
|
-
__version_tuple__ = version_tuple = (0, 5, 1, '
|
15
|
+
__version__ = version = '0.5.1.dev103'
|
16
|
+
__version_tuple__ = version_tuple = (0, 5, 1, 'dev103')
|
jaxsim/exceptions.py
CHANGED
@@ -19,8 +19,9 @@ def raise_if(
|
|
19
19
|
format string (fmt), whose fields are filled with the args and kwargs.
|
20
20
|
"""
|
21
21
|
|
22
|
-
# Disable host callback if running on
|
23
|
-
|
22
|
+
# Disable host callback if running on unsupported hardware or if the user
|
23
|
+
# explicitly disabled it.
|
24
|
+
if jax.devices()[0].platform in {"tpu", "METAL"} or os.environ.get(
|
24
25
|
"JAXSIM_DISABLE_EXCEPTIONS", 0
|
25
26
|
):
|
26
27
|
return
|
jaxsim/parsers/rod/utils.py
CHANGED
@@ -225,15 +225,15 @@ def create_mesh_collision(
|
|
225
225
|
) -> descriptions.MeshCollision:
|
226
226
|
|
227
227
|
file = pathlib.Path(resolve_local_uri(uri=collision.geometry.mesh.uri))
|
228
|
-
|
229
|
-
mesh = trimesh.load_mesh(file, file_type=
|
228
|
+
file_type = file.suffix.replace(".", "")
|
229
|
+
mesh = trimesh.load_mesh(file, file_type=file_type)
|
230
230
|
|
231
231
|
if mesh.is_empty:
|
232
232
|
raise RuntimeError(f"Failed to process '{file}' with trimesh")
|
233
233
|
|
234
234
|
mesh.apply_scale(collision.geometry.mesh.scale)
|
235
235
|
logging.info(
|
236
|
-
msg=f"Loading mesh {collision.geometry.mesh.uri} with scale {collision.geometry.mesh.scale}, file type '{
|
236
|
+
msg=f"Loading mesh {collision.geometry.mesh.uri} with scale {collision.geometry.mesh.scale}, file type '{file_type}'"
|
237
237
|
)
|
238
238
|
|
239
239
|
if method is None:
|
jaxsim/typing.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: jaxsim
|
3
|
-
Version: 0.5.1.
|
3
|
+
Version: 0.5.1.dev103
|
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>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
jaxsim/__init__.py,sha256=
|
2
|
-
jaxsim/_version.py,sha256=
|
3
|
-
jaxsim/exceptions.py,sha256=
|
1
|
+
jaxsim/__init__.py,sha256=OQcCxXn4BXiSvGjAatqvw5fAEVfXbxyavQZN25NEyBo,3675
|
2
|
+
jaxsim/_version.py,sha256=zdHXFLMTP9gf9Mb93H_-kwqd5cnJDwjqSFX1iUItBJ4,428
|
3
|
+
jaxsim/exceptions.py,sha256=5rYd0kGrIaq1e0WK0qMVTCkoGJtMWz_uWlVtxHbjH_A,2322
|
4
4
|
jaxsim/logging.py,sha256=STI-D_upXZYX-ZezLrlJJ0UlD5YspST0vZ_DcIwkzO4,1553
|
5
|
-
jaxsim/typing.py,sha256=
|
5
|
+
jaxsim/typing.py,sha256=7msl8t5Jt09RNYfKdPJtpjLfWurldcycDappb045Eso,761
|
6
6
|
jaxsim/api/__init__.py,sha256=8eV22t2S3UwNyCg8karPetG1dmX1VDBXkyv28_FwNQA,210
|
7
7
|
jaxsim/api/com.py,sha256=5fYNRUhKE5VGGdW88zY8mqqEy5VTWyaHu5k6MgW4Jt4,13826
|
8
8
|
jaxsim/api/common.py,sha256=SvEOGxCKOxKLLVHaNp1sFkBX0sku3-wH0-HUlYVWCDk,7090
|
@@ -46,7 +46,7 @@ jaxsim/parsers/descriptions/model.py,sha256=I2Vsbv8Josl4Le7b5rIvhqA2k9Bbv5JxMqwy
|
|
46
46
|
jaxsim/parsers/rod/__init__.py,sha256=G2vqlLajBLUc4gyzXwsEI2Wsi4TMOIF9bLDFeT6KrGU,92
|
47
47
|
jaxsim/parsers/rod/meshes.py,sha256=a5qUFkHe3gPXMKRnvPx3BDvlEHT2vEJqcLYLXhJFCdA,2847
|
48
48
|
jaxsim/parsers/rod/parser.py,sha256=OJdKM2hVyED9nw7iRpxCRFZx9Z6rKmVflhkItGTzRns,14499
|
49
|
-
jaxsim/parsers/rod/utils.py,sha256=
|
49
|
+
jaxsim/parsers/rod/utils.py,sha256=qvaWQKbmUWu1t-IOT2eseBHCMm3tdBQ1XuYSBO6IDXY,7830
|
50
50
|
jaxsim/rbda/__init__.py,sha256=kmy4G9aMkrqPNGdLSaSV3k15dpF52vBEUQXDFDuKIxU,337
|
51
51
|
jaxsim/rbda/aba.py,sha256=w7ciyxB0IsmueatT0C7PcBQEl9dyiH9oqJgIi3xeTUE,8983
|
52
52
|
jaxsim/rbda/collidable_points.py,sha256=0PFLzxWKtRg8-JtfNhGlSjBMv1J98tiLymOdvlvAak4,5325
|
@@ -67,8 +67,8 @@ jaxsim/utils/__init__.py,sha256=Y5zyoRevl3EMVQadhZ4EtSwTEkDt2vcnFoRhPJjKTZ0,215
|
|
67
67
|
jaxsim/utils/jaxsim_dataclass.py,sha256=TGmTQV2Lq7Q-2nLoAEaeNtkPa_qj0IKkdBm4COj46Os,11312
|
68
68
|
jaxsim/utils/tracing.py,sha256=eEY28MZW0Lm_jJNt1NkFqZz0ek01tvhR46OXZYCo7tc,532
|
69
69
|
jaxsim/utils/wrappers.py,sha256=ZY7olSORzZRvSzkdeNLj8yjwUIAt9L0Douwl7wItjpk,4008
|
70
|
-
jaxsim-0.5.1.
|
71
|
-
jaxsim-0.5.1.
|
72
|
-
jaxsim-0.5.1.
|
73
|
-
jaxsim-0.5.1.
|
74
|
-
jaxsim-0.5.1.
|
70
|
+
jaxsim-0.5.1.dev103.dist-info/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
|
71
|
+
jaxsim-0.5.1.dev103.dist-info/METADATA,sha256=QWMkkVWOPO0aedePnBihvUEV395YxLafSFGzxnYVmVE,17938
|
72
|
+
jaxsim-0.5.1.dev103.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
73
|
+
jaxsim-0.5.1.dev103.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
|
74
|
+
jaxsim-0.5.1.dev103.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|