jaxsim 0.4.3.dev18__py3-none-any.whl → 0.4.3.dev31__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 +5 -0
- jaxsim/_version.py +2 -2
- jaxsim/api/data.py +10 -3
- jaxsim/api/model.py +12 -1
- jaxsim/parsers/rod/parser.py +18 -14
- {jaxsim-0.4.3.dev18.dist-info → jaxsim-0.4.3.dev31.dist-info}/METADATA +1 -1
- {jaxsim-0.4.3.dev18.dist-info → jaxsim-0.4.3.dev31.dist-info}/RECORD +10 -10
- {jaxsim-0.4.3.dev18.dist-info → jaxsim-0.4.3.dev31.dist-info}/LICENSE +0 -0
- {jaxsim-0.4.3.dev18.dist-info → jaxsim-0.4.3.dev31.dist-info}/WHEEL +0 -0
- {jaxsim-0.4.3.dev18.dist-info → jaxsim-0.4.3.dev31.dist-info}/top_level.txt +0 -0
jaxsim/__init__.py
CHANGED
@@ -20,6 +20,11 @@ def _jnp_options() -> None:
|
|
20
20
|
if jnp.empty(0, dtype=float).dtype != jnp.empty(0, dtype=np.float64).dtype:
|
21
21
|
logging.warning("Failed to enable 64bit precision in JAX")
|
22
22
|
|
23
|
+
else:
|
24
|
+
logging.warning(
|
25
|
+
"Using 32bit precision in JaxSim is still experimental, please avoid to use variable step integrators."
|
26
|
+
)
|
27
|
+
|
23
28
|
|
24
29
|
def _np_options() -> None:
|
25
30
|
import numpy as np
|
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.4.3.
|
16
|
-
__version_tuple__ = version_tuple = (0, 4, 3, '
|
15
|
+
__version__ = version = '0.4.3.dev31'
|
16
|
+
__version_tuple__ = version_tuple = (0, 4, 3, 'dev31')
|
jaxsim/api/data.py
CHANGED
@@ -39,7 +39,9 @@ class JaxSimModelData(common.ModelDataWithVelocityRepresentation):
|
|
39
39
|
contacts_params: jaxsim.rbda.ContactsParams = dataclasses.field(repr=False)
|
40
40
|
|
41
41
|
time_ns: jtp.Int = dataclasses.field(
|
42
|
-
default_factory=lambda: jnp.array(
|
42
|
+
default_factory=lambda: jnp.array(
|
43
|
+
0, dtype=jnp.uint64 if jax.config.read("jax_enable_x64") else jnp.uint32
|
44
|
+
),
|
43
45
|
)
|
44
46
|
|
45
47
|
def __hash__(self) -> int:
|
@@ -172,9 +174,14 @@ class JaxSimModelData(common.ModelDataWithVelocityRepresentation):
|
|
172
174
|
)
|
173
175
|
|
174
176
|
time_ns = (
|
175
|
-
jnp.array(
|
177
|
+
jnp.array(
|
178
|
+
time * 1e9,
|
179
|
+
dtype=jnp.uint64 if jax.config.read("jax_enable_x64") else jnp.uint32,
|
180
|
+
)
|
176
181
|
if time is not None
|
177
|
-
else jnp.array(
|
182
|
+
else jnp.array(
|
183
|
+
0, dtype=jnp.uint64 if jax.config.read("jax_enable_x64") else jnp.uint32
|
184
|
+
)
|
178
185
|
)
|
179
186
|
|
180
187
|
if isinstance(model.contact_model, SoftContacts):
|
jaxsim/api/model.py
CHANGED
@@ -1931,11 +1931,22 @@ def step(
|
|
1931
1931
|
),
|
1932
1932
|
)
|
1933
1933
|
|
1934
|
+
tf_ns = t0_ns + jnp.array(dt * 1e9, dtype=t0_ns.dtype)
|
1935
|
+
tf_ns = jnp.where(tf_ns >= t0_ns, tf_ns, jnp.array(0, dtype=t0_ns.dtype))
|
1936
|
+
|
1937
|
+
jax.lax.cond(
|
1938
|
+
pred=tf_ns >= t0_ns,
|
1939
|
+
true_fun=lambda: jax.debug.print(
|
1940
|
+
"The simulation time overflowed, resetting simulation time to 0."
|
1941
|
+
),
|
1942
|
+
false_fun=lambda: None,
|
1943
|
+
)
|
1944
|
+
|
1934
1945
|
data_tf = (
|
1935
1946
|
# Store the new state of the model and the new time.
|
1936
1947
|
data.replace(
|
1937
1948
|
state=state_tf,
|
1938
|
-
time_ns=
|
1949
|
+
time_ns=tf_ns,
|
1939
1950
|
)
|
1940
1951
|
)
|
1941
1952
|
|
jaxsim/parsers/rod/parser.py
CHANGED
@@ -223,7 +223,7 @@ def extract_model_data(
|
|
223
223
|
child=links_dict[j.child],
|
224
224
|
jtype=utils.joint_to_joint_type(joint=j),
|
225
225
|
axis=(
|
226
|
-
np.array(j.axis.xyz.xyz)
|
226
|
+
np.array(j.axis.xyz.xyz, dtype=float)
|
227
227
|
if j.axis is not None
|
228
228
|
and j.axis.xyz is not None
|
229
229
|
and j.axis.xyz.xyz is not None
|
@@ -232,39 +232,43 @@ def extract_model_data(
|
|
232
232
|
pose=j.pose.transform() if j.pose is not None else np.eye(4),
|
233
233
|
initial_position=0.0,
|
234
234
|
position_limit=(
|
235
|
-
(
|
236
|
-
|
237
|
-
if j.axis is not None
|
238
|
-
|
235
|
+
float(
|
236
|
+
j.axis.limit.lower
|
237
|
+
if j.axis is not None
|
238
|
+
and j.axis.limit is not None
|
239
|
+
and j.axis.limit.lower is not None
|
240
|
+
else jnp.finfo(float).min
|
239
241
|
),
|
240
|
-
(
|
241
|
-
|
242
|
-
if j.axis is not None
|
243
|
-
|
242
|
+
float(
|
243
|
+
j.axis.limit.upper
|
244
|
+
if j.axis is not None
|
245
|
+
and j.axis.limit is not None
|
246
|
+
and j.axis.limit.upper is not None
|
247
|
+
else jnp.finfo(float).max
|
244
248
|
),
|
245
249
|
),
|
246
|
-
friction_static=(
|
250
|
+
friction_static=float(
|
247
251
|
j.axis.dynamics.friction
|
248
252
|
if j.axis is not None
|
249
253
|
and j.axis.dynamics is not None
|
250
254
|
and j.axis.dynamics.friction is not None
|
251
255
|
else 0.0
|
252
256
|
),
|
253
|
-
friction_viscous=(
|
257
|
+
friction_viscous=float(
|
254
258
|
j.axis.dynamics.damping
|
255
259
|
if j.axis is not None
|
256
260
|
and j.axis.dynamics is not None
|
257
261
|
and j.axis.dynamics.damping is not None
|
258
262
|
else 0.0
|
259
263
|
),
|
260
|
-
position_limit_damper=(
|
264
|
+
position_limit_damper=float(
|
261
265
|
j.axis.limit.dissipation
|
262
266
|
if j.axis is not None
|
263
267
|
and j.axis.limit is not None
|
264
268
|
and j.axis.limit.dissipation is not None
|
265
269
|
else 0.0
|
266
270
|
),
|
267
|
-
position_limit_spring=(
|
271
|
+
position_limit_spring=float(
|
268
272
|
j.axis.limit.stiffness
|
269
273
|
if j.axis is not None
|
270
274
|
and j.axis.limit is not None
|
@@ -273,7 +277,7 @@ def extract_model_data(
|
|
273
277
|
),
|
274
278
|
)
|
275
279
|
for j in sdf_model.joints()
|
276
|
-
if j.type in {"revolute", "prismatic", "fixed"}
|
280
|
+
if j.type in {"revolute", "continuous", "prismatic", "fixed"}
|
277
281
|
and j.parent != "world"
|
278
282
|
and j.child in links_dict.keys()
|
279
283
|
]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: jaxsim
|
3
|
-
Version: 0.4.3.
|
3
|
+
Version: 0.4.3.dev31
|
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>
|
6
6
|
Maintainer-email: Diego Ferigo <dgferigo@gmail.com>, Filippo Luca Ferretti <filippo.ferretti@iit.it>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
jaxsim/__init__.py,sha256=
|
2
|
-
jaxsim/_version.py,sha256=
|
1
|
+
jaxsim/__init__.py,sha256=bSbpggIz5aG6QuGZLa0V2EfHjAOeucMxi-vIYxzLmN8,2788
|
2
|
+
jaxsim/_version.py,sha256=J3LwBUFVVgKt400akbPS_UHFGRkurLsRFlpfwhbZGfc,426
|
3
3
|
jaxsim/exceptions.py,sha256=8_h8iqL8DgNR754dR8SZiQ7361GR5V1sUk3ZuZCHw1Q,2069
|
4
4
|
jaxsim/logging.py,sha256=STI-D_upXZYX-ZezLrlJJ0UlD5YspST0vZ_DcIwkzO4,1553
|
5
5
|
jaxsim/typing.py,sha256=IbFx3UkEXi-cm7UBqMPi58rJAFV_HbZ9E_K4JwfNvVM,753
|
@@ -7,12 +7,12 @@ jaxsim/api/__init__.py,sha256=8eV22t2S3UwNyCg8karPetG1dmX1VDBXkyv28_FwNQA,210
|
|
7
7
|
jaxsim/api/com.py,sha256=m-p3EJDhpnMTlXKplfbZE_aH9NqX_VyLlAE3vUhc6l4,13642
|
8
8
|
jaxsim/api/common.py,sha256=SNgxq42r6eF_-aPszvOjUYkGwXOzz4hKmhDwEUkscFQ,6650
|
9
9
|
jaxsim/api/contact.py,sha256=HyEAjF7BySDDOlRahN0l7V15IPB0HPXuoM0twamuEW0,20913
|
10
|
-
jaxsim/api/data.py,sha256=
|
10
|
+
jaxsim/api/data.py,sha256=p44Q7pNQEWQz2KgwNrk47_m0D-vbVtT8xuy4fLD8T58,27465
|
11
11
|
jaxsim/api/frame.py,sha256=KS8A5wRfjxhe9NgcVo2QA516iP5zky7UVnWxG7nTa7c,12911
|
12
12
|
jaxsim/api/joint.py,sha256=L81bQe-noPT6_54KOSF7KBjRmEPAS433ULn2EcXI8vI,5115
|
13
13
|
jaxsim/api/kin_dyn_parameters.py,sha256=CcfSg5Mc8qb1mZeMQ4AK_ffZIsK5yOl7tu397pFhcDA,29369
|
14
14
|
jaxsim/api/link.py,sha256=qPRtc8qqMRjZxUCZYXJMygbB6huDXBfIT1b1b8Durkw,18631
|
15
|
-
jaxsim/api/model.py,sha256=
|
15
|
+
jaxsim/api/model.py,sha256=Tq0CBjmjipGT02q4LgvVv2PH2uEFFHrDr_OiaiQNIXQ,65872
|
16
16
|
jaxsim/api/ode.py,sha256=Vb2sN4zwpXnaJDD9-ziz2qvfmfa4jvIQ0fONbBIRGmU,13368
|
17
17
|
jaxsim/api/ode_data.py,sha256=U7F6TL6bENAxpQQl4PupPoDG7d7VfTTFqDAs3xwu6Hs,20003
|
18
18
|
jaxsim/api/references.py,sha256=XOVKuQXRmjPoP-T5JWGSbqIGX5DzOkeGafqRpj0ZQEM,20771
|
@@ -42,7 +42,7 @@ jaxsim/parsers/descriptions/joint.py,sha256=VSb6C0FBBKMqwrHBKfc-Bbn4rl_J0RzUxMQl
|
|
42
42
|
jaxsim/parsers/descriptions/link.py,sha256=Eh0W5qL7_Uw0GV-BkNKXhm9Q2dRTfIWCX5D-87zQkxA,3711
|
43
43
|
jaxsim/parsers/descriptions/model.py,sha256=I2Vsbv8Josl4Le7b5rIvhqA2k9Bbv5JxMqwytayxds0,9833
|
44
44
|
jaxsim/parsers/rod/__init__.py,sha256=G2vqlLajBLUc4gyzXwsEI2Wsi4TMOIF9bLDFeT6KrGU,92
|
45
|
-
jaxsim/parsers/rod/parser.py,sha256=
|
45
|
+
jaxsim/parsers/rod/parser.py,sha256=9EigYv2oGn4bfIY1q0Cd_55yVKfN2rXP_MuZSZqGxYM,13681
|
46
46
|
jaxsim/parsers/rod/utils.py,sha256=5DsF3OeePZGidOJ5GiFSZx-51uIdnFvMW9EK6SgOW6Q,5698
|
47
47
|
jaxsim/rbda/__init__.py,sha256=H7DhXpxkPOi9lpUvg31IMHFfRafke1UoJLc5GQIdyhA,387
|
48
48
|
jaxsim/rbda/aba.py,sha256=w7ciyxB0IsmueatT0C7PcBQEl9dyiH9oqJgIi3xeTUE,8983
|
@@ -62,8 +62,8 @@ jaxsim/utils/__init__.py,sha256=Y5zyoRevl3EMVQadhZ4EtSwTEkDt2vcnFoRhPJjKTZ0,215
|
|
62
62
|
jaxsim/utils/jaxsim_dataclass.py,sha256=5xJbY0G8d7C0OTNIW9T4vQxiDak6TGZT9gpNOvRykFI,11373
|
63
63
|
jaxsim/utils/tracing.py,sha256=KDMoyVPlu2NJvFkhtZwq5AkqMMgajt3munvJom-vEjQ,650
|
64
64
|
jaxsim/utils/wrappers.py,sha256=JhLUh1g8iU-lhjbuZRfkscPZhYlLCOorVM2Xl3ulRBI,4054
|
65
|
-
jaxsim-0.4.3.
|
66
|
-
jaxsim-0.4.3.
|
67
|
-
jaxsim-0.4.3.
|
68
|
-
jaxsim-0.4.3.
|
69
|
-
jaxsim-0.4.3.
|
65
|
+
jaxsim-0.4.3.dev31.dist-info/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
|
66
|
+
jaxsim-0.4.3.dev31.dist-info/METADATA,sha256=6dwVfUvgQY8Mgd7wghQuOITOPPqAviKo7rkiB7kq3IE,17247
|
67
|
+
jaxsim-0.4.3.dev31.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
68
|
+
jaxsim-0.4.3.dev31.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
|
69
|
+
jaxsim-0.4.3.dev31.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|