jaxsim 0.6.2.dev268__py3-none-any.whl → 0.6.2.dev275__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 +21 -18
- jaxsim/_version.py +2 -2
- jaxsim/mujoco/utils.py +8 -1
- jaxsim/parsers/descriptions/model.py +6 -0
- jaxsim/parsers/kinematic_graph.py +1 -1
- jaxsim/parsers/rod/parser.py +2 -2
- jaxsim/rbda/contacts/rigid.py +1 -1
- jaxsim/rbda/contacts/soft.py +1 -1
- {jaxsim-0.6.2.dev268.dist-info → jaxsim-0.6.2.dev275.dist-info}/METADATA +1 -1
- {jaxsim-0.6.2.dev268.dist-info → jaxsim-0.6.2.dev275.dist-info}/RECORD +13 -13
- {jaxsim-0.6.2.dev268.dist-info → jaxsim-0.6.2.dev275.dist-info}/WHEEL +0 -0
- {jaxsim-0.6.2.dev268.dist-info → jaxsim-0.6.2.dev275.dist-info}/licenses/LICENSE +0 -0
- {jaxsim-0.6.2.dev268.dist-info → jaxsim-0.6.2.dev275.dist-info}/top_level.txt +0 -0
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(
|
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
|
-
#
|
84
|
-
|
85
|
-
|
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(
|
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.
|
21
|
-
__version_tuple__ = version_tuple = (0, 6, 2, '
|
20
|
+
__version__ = version = '0.6.2.dev275'
|
21
|
+
__version_tuple__ = version_tuple = (0, 6, 2, 'dev275')
|
jaxsim/mujoco/utils.py
CHANGED
@@ -145,6 +145,7 @@ class MujocoCamera:
|
|
145
145
|
@staticmethod
|
146
146
|
def build_from_target_view(
|
147
147
|
camera_name: str,
|
148
|
+
mode: str = "fixed",
|
148
149
|
lookat: Sequence[float | int] | npt.NDArray = (0, 0, 0),
|
149
150
|
distance: float | int | npt.NDArray = 3,
|
150
151
|
azimuth: float | int | npt.NDArray = 90,
|
@@ -166,6 +167,12 @@ class MujocoCamera:
|
|
166
167
|
|
167
168
|
Args:
|
168
169
|
camera_name: The name of the camera.
|
170
|
+
mode: Camera positioning mode:
|
171
|
+
- **"fixed"**: Fixed position and orientation relative to the body.
|
172
|
+
- **"track"**: Fixed offset from the body in world coordinates, constant orientation.
|
173
|
+
- **"trackcom"**: Like `"track"`, but relative to the center of mass of the subtree.
|
174
|
+
- **"targetbody"**: Fixed position in body frame, oriented toward a target body.
|
175
|
+
- **"targetbodycom"**: Like `"targetbody"`, but targets the subtree's center of mass.
|
169
176
|
lookat: The target point to look at (origin of `T`).
|
170
177
|
distance:
|
171
178
|
The distance from the target point (displacement between the origins
|
@@ -214,7 +221,7 @@ class MujocoCamera:
|
|
214
221
|
|
215
222
|
return MujocoCamera.build(
|
216
223
|
name=camera_name,
|
217
|
-
mode=
|
224
|
+
mode=mode,
|
218
225
|
fovy=f"{fovy if degrees else np.rad2deg(fovy)}",
|
219
226
|
pos=" ".join(p.astype(str).tolist()),
|
220
227
|
quat=" ".join(Q.astype(str).tolist()),
|
@@ -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.
|
456
|
+
logging.debug(
|
457
457
|
msg.format(
|
458
458
|
link_to_remove.name,
|
459
459
|
self.joints_connection_dict[
|
jaxsim/parsers/rod/parser.py
CHANGED
@@ -75,7 +75,7 @@ def extract_model_data(
|
|
75
75
|
)
|
76
76
|
|
77
77
|
# Log model name.
|
78
|
-
logging.
|
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.
|
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.
|
jaxsim/rbda/contacts/rigid.py
CHANGED
@@ -140,7 +140,7 @@ class RigidContacts(ContactModel):
|
|
140
140
|
"""
|
141
141
|
|
142
142
|
if len(kwargs) != 0:
|
143
|
-
logging.
|
143
|
+
logging.warning(msg=f"Ignoring extra arguments: {kwargs}")
|
144
144
|
|
145
145
|
# Get the default solver options.
|
146
146
|
default_solver_options = dict(
|
jaxsim/rbda/contacts/soft.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: jaxsim
|
3
|
-
Version: 0.6.2.
|
3
|
+
Version: 0.6.2.dev275
|
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=
|
2
|
-
jaxsim/_version.py,sha256=
|
1
|
+
jaxsim/__init__.py,sha256=EKeysKN-7UswwJLCl7n6qIBKQIVUtYsCMYu_tCoFn7g,3628
|
2
|
+
jaxsim/_version.py,sha256=uEPZz1l86LTWP3KMvIugzbiPUShQy5zGVj-JygP8r_A,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
|
@@ -31,18 +31,18 @@ jaxsim/mujoco/__init__.py,sha256=1kAWzYOS7nP29S5FGyWPqiAnPf4yPSoaPW-WBGBjVV0,214
|
|
31
31
|
jaxsim/mujoco/__main__.py,sha256=GBmB7J-zj75ZnFyuAAmpSOpbxi_HhHhWJeot3ljGDJY,5291
|
32
32
|
jaxsim/mujoco/loaders.py,sha256=OCk1T11iIm3qZUibNpo_bxxLgaGSkCpLt7ae_ND0ExA,23272
|
33
33
|
jaxsim/mujoco/model.py,sha256=bRXo1uhWDN37sP9qdejr_2vq_PXHQ7p6eyBlFff_JcE,16492
|
34
|
-
jaxsim/mujoco/utils.py,sha256=
|
34
|
+
jaxsim/mujoco/utils.py,sha256=r8BFrFAkW3lMAnEM3YUGZYLBNT2ptln4qDPm68CYrJk,8951
|
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=
|
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=
|
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=
|
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=
|
61
|
-
jaxsim/rbda/contacts/soft.py,sha256=
|
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.
|
69
|
-
jaxsim-0.6.2.
|
70
|
-
jaxsim-0.6.2.
|
71
|
-
jaxsim-0.6.2.
|
72
|
-
jaxsim-0.6.2.
|
68
|
+
jaxsim-0.6.2.dev275.dist-info/licenses/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
|
69
|
+
jaxsim-0.6.2.dev275.dist-info/METADATA,sha256=e5w1a7yy022p-SYfLO1ujlQf8zXeqx14Mfk5iZu9lvg,19658
|
70
|
+
jaxsim-0.6.2.dev275.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
71
|
+
jaxsim-0.6.2.dev275.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
|
72
|
+
jaxsim-0.6.2.dev275.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|