jaxsim 0.6.2.dev266__py3-none-any.whl → 0.6.2.dev273__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 CHANGED
@@ -67,39 +67,42 @@ def _is_editable() -> bool:
67
67
  return jaxsim_package_dir not in site.getsitepackages()
68
68
 
69
69
 
70
- def _get_default_logging_level(env_var: str) -> logging.LoggingLevel:
70
+ def _get_default_logging_level() -> logging.LoggingLevel:
71
71
  """
72
72
  Get the default logging level.
73
73
 
74
- Args:
75
- env_var: The environment variable to check.
76
-
77
74
  Returns:
78
75
  The logging level to set.
79
76
  """
80
77
 
81
78
  import os
79
+ import sys
82
80
 
83
- # Define the default logging level depending on the installation mode.
84
- default_logging_level = (
85
- logging.LoggingLevel.DEBUG
81
+ # Allow to override the default logging level with an environment variable.
82
+ if overriden_logging_level := os.environ.get("JAXSIM_LOGGING_LEVEL"):
83
+ try:
84
+ return logging.LoggingLevel[overriden_logging_level.upper()]
85
+
86
+ except KeyError as exc:
87
+ msg = "Invalid logging level defined in JAXSIM_LOGGING_LEVEL"
88
+ raise RuntimeError(msg) from exc
89
+
90
+ # If running under a debugger, set the logging level to DEBUG.
91
+ if getattr(sys, "gettrace", lambda: None)():
92
+ return logging.LoggingLevel.DEBUG
93
+
94
+ # If not running under a debugger, set the logging level to INFO or WARNING.
95
+ # INFO for editable installations, WARNING for non-editable installations.
96
+ # This is to avoid too verbose logging in non-editable installations.
97
+ return (
98
+ logging.LoggingLevel.INFO
86
99
  if _is_editable() # noqa: F821
87
100
  else logging.LoggingLevel.WARNING
88
101
  )
89
102
 
90
- # Allow to override the default logging level with an environment variable.
91
- try:
92
- return logging.LoggingLevel[
93
- os.environ.get(env_var, default_logging_level.name).upper()
94
- ]
95
-
96
- except KeyError as exc:
97
- msg = f"Invalid logging level defined in {env_var}='{os.environ[env_var]}'"
98
- raise RuntimeError(msg) from exc
99
-
100
103
 
101
104
  # Configure the logger with the default logging level.
102
- logging.configure(level=_get_default_logging_level(env_var="JAXSIM_LOGGING_LEVEL"))
105
+ logging.configure(level=_get_default_logging_level())
103
106
 
104
107
 
105
108
  # Configure JAX.
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.6.2.dev266'
21
- __version_tuple__ = version_tuple = (0, 6, 2, 'dev266')
20
+ __version__ = version = '0.6.2.dev273'
21
+ __version_tuple__ = version_tuple = (0, 6, 2, 'dev273')
@@ -164,6 +164,12 @@ class ModelDescription(KinematicGraph):
164
164
  A `ModelDescription` instance that only includes the considered joints.
165
165
  """
166
166
 
167
+ logging.warning(
168
+ "The joint order in the model description is not preserved when reducing "
169
+ "the model. Consider using the `names_to_indices` method to get the correct "
170
+ "order of the joints, or use the `joint_names()` method to inspect the internal joint ordering."
171
+ )
172
+
167
173
  if len(set(considered_joints) - set(self.joint_names())) != 0:
168
174
  extra_joints = set(considered_joints) - set(self.joint_names())
169
175
  msg = f"Found joints not part of the model: {extra_joints}"
@@ -453,7 +453,7 @@ class KinematicGraph(Sequence[LinkDescription]):
453
453
  parent_of_link_to_remove = links_dict[link.parent_name]
454
454
 
455
455
  msg = "Lumping chain: {}->({})->{}"
456
- logging.info(
456
+ logging.debug(
457
457
  msg.format(
458
458
  link_to_remove.name,
459
459
  self.joints_connection_dict[
@@ -75,7 +75,7 @@ def extract_model_data(
75
75
  )
76
76
 
77
77
  # Log model name.
78
- logging.debug(msg=f"Found model '{sdf_model.name}' in SDF resource")
78
+ logging.info(msg=f"Found model '{sdf_model.name}' in SDF resource")
79
79
 
80
80
  # Jaxsim supports only models compatible with URDF, i.e. those having all links
81
81
  # directly attached to their parent joint without additional roto-translations.
@@ -187,7 +187,7 @@ def extract_model_data(
187
187
  base_link_name = joints_with_world_parent[0].child.name
188
188
 
189
189
  msg = "Combining the pose of base link '{}' with the pose of joint '{}'"
190
- logging.info(msg.format(base_link_name, joints_with_world_parent[0].name))
190
+ logging.debug(msg.format(base_link_name, joints_with_world_parent[0].name))
191
191
 
192
192
  # Combine the pose of the base link (child of the found fixed joint)
193
193
  # with the pose of the fixed joint connecting with the world.
@@ -140,7 +140,7 @@ class RigidContacts(ContactModel):
140
140
  """
141
141
 
142
142
  if len(kwargs) != 0:
143
- logging.debug(msg=f"Ignoring extra arguments: {kwargs}")
143
+ logging.warning(msg=f"Ignoring extra arguments: {kwargs}")
144
144
 
145
145
  # Get the default solver options.
146
146
  default_solver_options = dict(
@@ -147,7 +147,7 @@ class SoftContacts(common.ContactModel):
147
147
  """
148
148
 
149
149
  if len(kwargs) != 0:
150
- logging.debug(msg=f"Ignoring extra arguments: {kwargs}")
150
+ logging.warning(msg=f"Ignoring extra arguments: {kwargs}")
151
151
 
152
152
  return cls(**kwargs)
153
153
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaxsim
3
- Version: 0.6.2.dev266
3
+ Version: 0.6.2.dev273
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,5 +1,5 @@
1
- jaxsim/__init__.py,sha256=b8dYoVXqtHxHcF56iM2xgKk78lsvmGrfDlvdwaGasgs,3388
2
- jaxsim/_version.py,sha256=JHtQlvn3Q-Z-weIlFu33yRWSLUW3-KCLDEng_S625bY,528
1
+ jaxsim/__init__.py,sha256=EKeysKN-7UswwJLCl7n6qIBKQIVUtYsCMYu_tCoFn7g,3628
2
+ jaxsim/_version.py,sha256=g83rsbL4zkvgG8-68gdWW28JhpZJIQ93aHKS6g6GVLM,528
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
@@ -34,15 +34,15 @@ jaxsim/mujoco/model.py,sha256=bRXo1uhWDN37sP9qdejr_2vq_PXHQ7p6eyBlFff_JcE,16492
34
34
  jaxsim/mujoco/utils.py,sha256=dW3LrcM050-eVVdLuCiN3StIrTEfyk_jJyq1GiNh3fg,8396
35
35
  jaxsim/mujoco/visualizer.py,sha256=cmI6DhFb1XC7oEtg_wl-s-U56dWHA-F7GlBD6EDYTyA,7744
36
36
  jaxsim/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- jaxsim/parsers/kinematic_graph.py,sha256=s6sKPOGj_St4dfooNhE5a4F4tO3qTODErLYx8dfZRJk,35757
37
+ jaxsim/parsers/kinematic_graph.py,sha256=ARq11Pv6yMDZeRRDlqrWzfVfUS7qSDwR57aWA4k54as,35758
38
38
  jaxsim/parsers/descriptions/__init__.py,sha256=N_hp8cGI5FyEFiuNx9a-CAGCr0F0QpYEpdMHvwB7_1g,261
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=LNmNed6myIhrUkSa0zp5XBt4GsDVB34tFqusNj3rdAk,9876
42
+ jaxsim/parsers/descriptions/model.py,sha256=KiYpJp0JSs8nxvEmdLtm9DJhZN6NUXGJv0mVVMNDYx8,10198
43
43
  jaxsim/parsers/rod/__init__.py,sha256=G2vqlLajBLUc4gyzXwsEI2Wsi4TMOIF9bLDFeT6KrGU,92
44
44
  jaxsim/parsers/rod/meshes.py,sha256=yAXefG73_zqbVKRUdlcz9yFmypjDIpiP9cO96PeAozE,2842
45
- jaxsim/parsers/rod/parser.py,sha256=vaOlvlvgQCEGbymFc21praHKEVq_LqqlKeRJNv7tZiE,14398
45
+ jaxsim/parsers/rod/parser.py,sha256=rmj-W5ekdcIe_Lu66nxTKkgwxF7vGDZdNkfcYYlU-Yc,14398
46
46
  jaxsim/parsers/rod/utils.py,sha256=wmD-wCF1lLO8pknX7A3a8CGt9wDlTS_xCqQulcZ_XlM,8242
47
47
  jaxsim/rbda/__init__.py,sha256=ksfupKZzeJyysxrbyMyEfszUdBH6LfCfkSz3KLfODhY,328
48
48
  jaxsim/rbda/aba.py,sha256=jxvss3XL8pBaT40bWG5pHcH9f1DDl3LoRqdnpFSlCWo,9030
@@ -57,16 +57,16 @@ jaxsim/rbda/actuation/common.py,sha256=aGFqO4VTgQLsTJyOtVuoa_otT_RbkckmG3rq7wjOy
57
57
  jaxsim/rbda/contacts/__init__.py,sha256=resrBkTdOA-1YMdcdUH2RATEhAf_Ye6MQNtjG3ClMYQ,371
58
58
  jaxsim/rbda/contacts/common.py,sha256=qVm3Ghoytg1HAeykNrYw5-4rQJ4Mv7h0Pk75ETzGXyc,9045
59
59
  jaxsim/rbda/contacts/relaxed_rigid.py,sha256=RjeLF06Pp19qio447U9z5EdhdM6nyMh-ISQX_2-vdaE,21349
60
- jaxsim/rbda/contacts/rigid.py,sha256=gHOpNQ_sk7nQcpGAE_nFOSq8fza2yFv_Mqqs-e118q8,17603
61
- jaxsim/rbda/contacts/soft.py,sha256=Ac9aWDdjAm55Mv9LLnEs3nj7hX_NvJMnicV35SbFLSY,15282
60
+ jaxsim/rbda/contacts/rigid.py,sha256=I_TjsT-84ywou2idYioqekeQbIOHTdHI54vot8ijMPk,17605
61
+ jaxsim/rbda/contacts/soft.py,sha256=a7NYMknPfWKfCdbVu83ttDu1u_gssIRvxe9L1622tM0,15284
62
62
  jaxsim/terrain/__init__.py,sha256=f7lVX-iNpH_wkkjef9Qpjh19TTAUOQw76EiLYJDVizc,78
63
63
  jaxsim/terrain/terrain.py,sha256=so8kqVsUlPXqOKQ_UaYW6HE4XS8nTZRdFdXQyhB2tG4,6725
64
64
  jaxsim/utils/__init__.py,sha256=Y5zyoRevl3EMVQadhZ4EtSwTEkDt2vcnFoRhPJjKTZ0,215
65
65
  jaxsim/utils/jaxsim_dataclass.py,sha256=XzmZeIibcaOzaxpprsGSxH3UrM66PAO456rFV91sNXg,11453
66
66
  jaxsim/utils/tracing.py,sha256=Btwxdfhb7fJLk3r5PlQkGYj60Y2KbFT1gANGIA697FU,530
67
67
  jaxsim/utils/wrappers.py,sha256=3IMwydqFgmSPqeuUQ3PRmdhDc1IoT6XC23jPC_LjWXs,4175
68
- jaxsim-0.6.2.dev266.dist-info/licenses/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
69
- jaxsim-0.6.2.dev266.dist-info/METADATA,sha256=oZwrPDnu9bfrYRCLcwlbGRHiJE3KDilyW_3gN5ynpVQ,19658
70
- jaxsim-0.6.2.dev266.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
71
- jaxsim-0.6.2.dev266.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
72
- jaxsim-0.6.2.dev266.dist-info/RECORD,,
68
+ jaxsim-0.6.2.dev273.dist-info/licenses/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
69
+ jaxsim-0.6.2.dev273.dist-info/METADATA,sha256=ZTap_k9XKf0MfovCWfqp25bmgFIFjVQPgq4KzmJgQ6s,19658
70
+ jaxsim-0.6.2.dev273.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
71
+ jaxsim-0.6.2.dev273.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
72
+ jaxsim-0.6.2.dev273.dist-info/RECORD,,