jaxsim 0.8.2.dev4__py3-none-any.whl → 0.8.2.dev14__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
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.8.2.dev4'
32
- __version_tuple__ = version_tuple = (0, 8, 2, 'dev4')
31
+ __version__ = version = '0.8.2.dev14'
32
+ __version_tuple__ = version_tuple = (0, 8, 2, 'dev14')
33
33
 
34
34
  __commit_id__ = commit_id = None
jaxsim/logging.py CHANGED
@@ -1,8 +1,45 @@
1
1
  import enum
2
+ import inspect
2
3
  import logging
4
+ import os
5
+ import warnings
3
6
 
4
7
  import coloredlogs
5
8
 
9
+
10
+ class JaxSimWarning(UserWarning):
11
+ pass
12
+
13
+
14
+ _original_showwarning = warnings.showwarning
15
+ _jaxsim_root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
16
+
17
+
18
+ def pretty_jaxsim_warning(message, category, filename, lineno, file=None, line=None):
19
+ try:
20
+ caller_frame = inspect.stack()[2]
21
+ caller_file = caller_frame.filename
22
+ except Exception:
23
+ caller_file = filename
24
+
25
+ if caller_file.startswith(_jaxsim_root_dir):
26
+ print(f"\033[93m⚠️ {category.__name__}:\033[0m {message}")
27
+ print(f" → {filename}:{lineno}")
28
+ else:
29
+ _original_showwarning(message, category, filename, lineno, file, line)
30
+
31
+
32
+ # Register filter & formatter only for JaxSimWarning
33
+ # and configure it to show each warning only once
34
+ warnings.showwarning = pretty_jaxsim_warning
35
+ warnings.filterwarnings("once")
36
+
37
+
38
+ # Utility function to issue a JaxSim warning
39
+ def jaxsim_warn(msg):
40
+ warnings.warn(msg, category=JaxSimWarning, stacklevel=2)
41
+
42
+
6
43
  LOGGER_NAME = "jaxsim"
7
44
 
8
45
 
@@ -5,6 +5,7 @@ import itertools
5
5
  from collections.abc import Sequence
6
6
 
7
7
  from jaxsim import logging
8
+ from jaxsim.logging import jaxsim_warn
8
9
 
9
10
  from ..kinematic_graph import KinematicGraph, KinematicGraphTransforms, RootPose
10
11
  from .collision import CollidablePoint, CollisionShape
@@ -164,7 +165,7 @@ class ModelDescription(KinematicGraph):
164
165
  A `ModelDescription` instance that only includes the considered joints.
165
166
  """
166
167
 
167
- logging.warning(
168
+ jaxsim_warn(
168
169
  "The joint order in the model description is not preserved when reducing "
169
170
  "the model. Consider using the `names_to_indices` method to get the correct "
170
171
  "order of the joints, or use the `joint_names()` method to inspect the internal joint ordering."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaxsim
3
- Version: 0.8.2.dev4
3
+ Version: 0.8.2.dev14
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,7 +1,7 @@
1
1
  jaxsim/__init__.py,sha256=EKeysKN-7UswwJLCl7n6qIBKQIVUtYsCMYu_tCoFn7g,3628
2
- jaxsim/_version.py,sha256=Hjv9D8rbC_8Jsws4FGUFWteYO1838ayb9HmgHd5_V6k,717
2
+ jaxsim/_version.py,sha256=3uUa6EDEImXpj2Chpi5ffQmug_wW71Co_Ptu4Od6ZDE,719
3
3
  jaxsim/exceptions.py,sha256=MQ3LRMfVMX2-g3qYj7mUVNV9OLlIA48TANJegbcQyXI,2641
4
- jaxsim/logging.py,sha256=STI-D_upXZYX-ZezLrlJJ0UlD5YspST0vZ_DcIwkzO4,1553
4
+ jaxsim/logging.py,sha256=iLZ_zNvZfz5IvQEjxcCi8QUwPsZD5_9dcD0zotpxT78,2573
5
5
  jaxsim/typing.py,sha256=7msl8t5Jt09RNYfKdPJtpjLfWurldcycDappb045Eso,761
6
6
  jaxsim/api/__init__.py,sha256=4skzcTTejLFfZ_JE6yEEyNxObpXnR5u-bYsn2lBEx-4,234
7
7
  jaxsim/api/actuation_model.py,sha256=0tjFjBfDQlJ3Mw1VqZxXVLJq1xPxiUy5TLP5uh-IM8A,3820
@@ -39,7 +39,7 @@ jaxsim/parsers/descriptions/__init__.py,sha256=N_hp8cGI5FyEFiuNx9a-CAGCr0F0QpYEp
39
39
  jaxsim/parsers/descriptions/collision.py,sha256=C6SekAPL2tNG62Y-lTqj1m9BblhoTZDj2F2vgspKNbI,4577
40
40
  jaxsim/parsers/descriptions/joint.py,sha256=MurLIHHmu-y_bwUcR_J1NZ-FjfRZRk166zKsn6VzIwE,4232
41
41
  jaxsim/parsers/descriptions/link.py,sha256=au5XP_7O_UG7WG07RZ6y5VXkLqjgx9aBmlrPCMxgzbo,3495
42
- jaxsim/parsers/descriptions/model.py,sha256=KiYpJp0JSs8nxvEmdLtm9DJhZN6NUXGJv0mVVMNDYx8,10198
42
+ jaxsim/parsers/descriptions/model.py,sha256=Jd0zQtRgyHZImQ6d52_uwlSoKBaARggjk1Nl3TRjn0k,10233
43
43
  jaxsim/parsers/rod/__init__.py,sha256=G2vqlLajBLUc4gyzXwsEI2Wsi4TMOIF9bLDFeT6KrGU,92
44
44
  jaxsim/parsers/rod/meshes.py,sha256=yAXefG73_zqbVKRUdlcz9yFmypjDIpiP9cO96PeAozE,2842
45
45
  jaxsim/parsers/rod/parser.py,sha256=Qty8QR1ZGunNI0gC3upYECUSVHHlamdbDcAaVZyHVJk,15043
@@ -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.8.2.dev4.dist-info/licenses/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
70
- jaxsim-0.8.2.dev4.dist-info/METADATA,sha256=b4gYbgSuYbcBWNx4Ga1nMQT5rZGmrwWGTPd8hJodPEE,14297
71
- jaxsim-0.8.2.dev4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
- jaxsim-0.8.2.dev4.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
73
- jaxsim-0.8.2.dev4.dist-info/RECORD,,
69
+ jaxsim-0.8.2.dev14.dist-info/licenses/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
70
+ jaxsim-0.8.2.dev14.dist-info/METADATA,sha256=KOs5YyavsiAsuJqymR_LvOF9dn5BXPbu--FOz5XA-uk,14298
71
+ jaxsim-0.8.2.dev14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
72
+ jaxsim-0.8.2.dev14.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
73
+ jaxsim-0.8.2.dev14.dist-info/RECORD,,