jaxsim 0.4.2.dev42__py3-none-any.whl → 0.4.2.dev47__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 +2 -2
- jaxsim/api/references.py +10 -17
- {jaxsim-0.4.2.dev42.dist-info → jaxsim-0.4.2.dev47.dist-info}/METADATA +19 -19
- {jaxsim-0.4.2.dev42.dist-info → jaxsim-0.4.2.dev47.dist-info}/RECORD +7 -7
- {jaxsim-0.4.2.dev42.dist-info → jaxsim-0.4.2.dev47.dist-info}/WHEEL +1 -1
- {jaxsim-0.4.2.dev42.dist-info → jaxsim-0.4.2.dev47.dist-info}/LICENSE +0 -0
- {jaxsim-0.4.2.dev42.dist-info → jaxsim-0.4.2.dev47.dist-info}/top_level.txt +0 -0
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.2.
|
16
|
-
__version_tuple__ = version_tuple = (0, 4, 2, '
|
15
|
+
__version__ = version = '0.4.2.dev47'
|
16
|
+
__version_tuple__ = version_tuple = (0, 4, 2, 'dev47')
|
jaxsim/api/references.py
CHANGED
@@ -9,7 +9,6 @@ import jax_dataclasses
|
|
9
9
|
import jaxsim.api as js
|
10
10
|
import jaxsim.typing as jtp
|
11
11
|
from jaxsim import exceptions
|
12
|
-
from jaxsim.math import Adjoint
|
13
12
|
from jaxsim.utils.tracing import not_tracing
|
14
13
|
|
15
14
|
from .common import VelRepr
|
@@ -493,8 +492,8 @@ class JaxSimModelReferences(js.common.ModelDataWithVelocityRepresentation):
|
|
493
492
|
|
494
493
|
# Extract the frame indices.
|
495
494
|
frame_idxs = js.frame.names_to_idxs(frame_names=frame_names, model=model)
|
496
|
-
parent_link_idxs = js.frame.idx_of_parent_link(
|
497
|
-
model
|
495
|
+
parent_link_idxs = jax.vmap(js.frame.idx_of_parent_link, in_axes=(None,))(
|
496
|
+
model, frame_index=frame_idxs
|
498
497
|
)
|
499
498
|
|
500
499
|
exceptions.raise_value_error_if(
|
@@ -522,30 +521,19 @@ class JaxSimModelReferences(js.common.ModelDataWithVelocityRepresentation):
|
|
522
521
|
W_f_F = f_F
|
523
522
|
|
524
523
|
case VelRepr.Body | VelRepr.Mixed:
|
525
|
-
W_f_F = jax.vmap(to_inertial)(f_F, W_H_Fi
|
524
|
+
W_f_F = jax.vmap(to_inertial)(f_F, W_H_Fi)
|
526
525
|
|
527
526
|
case _:
|
528
527
|
raise ValueError("Invalid velocity representation.")
|
529
528
|
|
530
|
-
W_H_L = js.model.forward_kinematics(model=model, data=data)
|
531
|
-
|
532
|
-
def convert_to_link_force(
|
533
|
-
W_f_F: jtp.MatrixLike, W_H_F: jtp.MatrixLike, parent_link_idx: jtp.ArrayLike
|
534
|
-
) -> jtp.Matrix:
|
535
|
-
L_Xf_W = Adjoint.from_transform(W_H_L[parent_link_idx]).T
|
536
|
-
|
537
|
-
return L_Xf_W @ W_f_F
|
538
|
-
|
539
|
-
W_f_L_i = jax.vmap(convert_to_link_force)(W_f_F, W_H_Fi, parent_link_idxs)
|
540
|
-
|
541
529
|
# Sum the forces on the parent links.
|
542
530
|
mask = parent_link_idxs[:, jnp.newaxis] == jnp.arange(model.number_of_links())
|
543
|
-
W_f_L = mask.T @
|
531
|
+
W_f_L = mask.T @ W_f_F
|
544
532
|
|
545
533
|
with self.switch_velocity_representation(
|
546
534
|
velocity_representation=VelRepr.Inertial
|
547
535
|
):
|
548
|
-
|
536
|
+
references = self.apply_link_forces(
|
549
537
|
model=model,
|
550
538
|
data=data,
|
551
539
|
link_names=js.link.idxs_to_names(
|
@@ -554,3 +542,8 @@ class JaxSimModelReferences(js.common.ModelDataWithVelocityRepresentation):
|
|
554
542
|
forces=W_f_L,
|
555
543
|
additive=additive,
|
556
544
|
)
|
545
|
+
|
546
|
+
with references.switch_velocity_representation(
|
547
|
+
velocity_representation=self.velocity_representation
|
548
|
+
):
|
549
|
+
return references
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: jaxsim
|
3
|
-
Version: 0.4.2.
|
3
|
+
Version: 0.4.2.dev47
|
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>
|
@@ -60,29 +60,29 @@ Requires-Python: >=3.10
|
|
60
60
|
Description-Content-Type: text/markdown
|
61
61
|
License-File: LICENSE
|
62
62
|
Requires-Dist: coloredlogs
|
63
|
-
Requires-Dist: jax
|
64
|
-
Requires-Dist: jaxlib
|
65
|
-
Requires-Dist: jaxlie
|
66
|
-
Requires-Dist: jax-dataclasses
|
63
|
+
Requires-Dist: jax>=0.4.13
|
64
|
+
Requires-Dist: jaxlib>=0.4.13
|
65
|
+
Requires-Dist: jaxlie>=1.3.0
|
66
|
+
Requires-Dist: jax-dataclasses>=1.4.0
|
67
67
|
Requires-Dist: pptree
|
68
|
-
Requires-Dist: rod
|
69
|
-
Requires-Dist: typing-extensions
|
68
|
+
Requires-Dist: rod>=0.3.0
|
69
|
+
Requires-Dist: typing-extensions; python_version < "3.12"
|
70
70
|
Provides-Extra: all
|
71
|
-
Requires-Dist: jaxsim[style,testing,viz]
|
71
|
+
Requires-Dist: jaxsim[style,testing,viz]; extra == "all"
|
72
72
|
Provides-Extra: style
|
73
|
-
Requires-Dist: black[jupyter]
|
74
|
-
Requires-Dist: isort
|
75
|
-
Requires-Dist: pre-commit
|
73
|
+
Requires-Dist: black[jupyter]~=24.0; extra == "style"
|
74
|
+
Requires-Dist: isort; extra == "style"
|
75
|
+
Requires-Dist: pre-commit; extra == "style"
|
76
76
|
Provides-Extra: testing
|
77
|
-
Requires-Dist: idyntree
|
78
|
-
Requires-Dist: pytest
|
79
|
-
Requires-Dist: pytest-icdiff
|
80
|
-
Requires-Dist: robot-descriptions
|
77
|
+
Requires-Dist: idyntree>=12.2.1; extra == "testing"
|
78
|
+
Requires-Dist: pytest>=6.0; extra == "testing"
|
79
|
+
Requires-Dist: pytest-icdiff; extra == "testing"
|
80
|
+
Requires-Dist: robot-descriptions; extra == "testing"
|
81
81
|
Provides-Extra: viz
|
82
|
-
Requires-Dist: lxml
|
83
|
-
Requires-Dist: mediapy
|
84
|
-
Requires-Dist: mujoco
|
85
|
-
Requires-Dist: scipy
|
82
|
+
Requires-Dist: lxml; extra == "viz"
|
83
|
+
Requires-Dist: mediapy; extra == "viz"
|
84
|
+
Requires-Dist: mujoco>=3.0.0; extra == "viz"
|
85
|
+
Requires-Dist: scipy>=1.14.0; extra == "viz"
|
86
86
|
|
87
87
|
# JaxSim
|
88
88
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
jaxsim/__init__.py,sha256=ixsS4dYMPex2wOUUp_rkPnwrPhYzkRh1xO_YuMj3Cr4,2626
|
2
|
-
jaxsim/_version.py,sha256=
|
2
|
+
jaxsim/_version.py,sha256=mDRInOCr5eIigq7K2Us4jYwiiaCmxZKOFxeYtfv7WMk,426
|
3
3
|
jaxsim/exceptions.py,sha256=8_h8iqL8DgNR754dR8SZiQ7361GR5V1sUk3ZuZCHw1Q,2069
|
4
4
|
jaxsim/logging.py,sha256=c4zhwBKf9eAYAHVp62kTEllqdsZgh0K-kPKVy8L3elU,1584
|
5
5
|
jaxsim/typing.py,sha256=IbFx3UkEXi-cm7UBqMPi58rJAFV_HbZ9E_K4JwfNvVM,753
|
@@ -15,7 +15,7 @@ jaxsim/api/link.py,sha256=GlnY7LMne-siFyg9J49IZGhiPQzS9Uk6rzQ0jI8cD_E,18622
|
|
15
15
|
jaxsim/api/model.py,sha256=EdSjpKXd4N72wYjg5o0wGKFxjVMyrXg6LnlPEi3JqnU,63094
|
16
16
|
jaxsim/api/ode.py,sha256=NnLTBvpaT4kXnbjAghXIzLv9DTMJ8bele2iOlUQDv3Q,11028
|
17
17
|
jaxsim/api/ode_data.py,sha256=9YZX-SK_KJtoIqG-zYWZsQInb2NA_LtxDn-jtLqm_3U,19759
|
18
|
-
jaxsim/api/references.py,sha256=
|
18
|
+
jaxsim/api/references.py,sha256=XOVKuQXRmjPoP-T5JWGSbqIGX5DzOkeGafqRpj0ZQEM,20771
|
19
19
|
jaxsim/integrators/__init__.py,sha256=hxvOD-VK_mmd6v31wtC-nb28AYve1gLuZCNLV9wS-Kg,103
|
20
20
|
jaxsim/integrators/common.py,sha256=GqiyKTrAozuR6RuvVWdPF7locZQAXSEDY2AjTKpFGYM,20149
|
21
21
|
jaxsim/integrators/fixed_step.py,sha256=KpjRd6hHtapxDoo6D1kyDrVDSHnke2TepI5grFH7_bM,2693
|
@@ -61,8 +61,8 @@ jaxsim/utils/__init__.py,sha256=Y5zyoRevl3EMVQadhZ4EtSwTEkDt2vcnFoRhPJjKTZ0,215
|
|
61
61
|
jaxsim/utils/jaxsim_dataclass.py,sha256=fLl1tY3DDb3lpIhG6BPqA5W34hM84oFzL-5cuz8k-68,11379
|
62
62
|
jaxsim/utils/tracing.py,sha256=KDMoyVPlu2NJvFkhtZwq5AkqMMgajt3munvJom-vEjQ,650
|
63
63
|
jaxsim/utils/wrappers.py,sha256=GOJQCJc5zwzoEGZB62wnWWGvUUQlXvDxz_A2Q-hFv7c,4027
|
64
|
-
jaxsim-0.4.2.
|
65
|
-
jaxsim-0.4.2.
|
66
|
-
jaxsim-0.4.2.
|
67
|
-
jaxsim-0.4.2.
|
68
|
-
jaxsim-0.4.2.
|
64
|
+
jaxsim-0.4.2.dev47.dist-info/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
|
65
|
+
jaxsim-0.4.2.dev47.dist-info/METADATA,sha256=PwO4Le3hOuj-ADGD0Nhyl798iqI78z4O_VpYlJckQU0,17227
|
66
|
+
jaxsim-0.4.2.dev47.dist-info/WHEEL,sha256=nCVcAvsfA9TDtwGwhYaRrlPhTLV9m-Ga6mdyDtuwK18,91
|
67
|
+
jaxsim-0.4.2.dev47.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
|
68
|
+
jaxsim-0.4.2.dev47.dist-info/RECORD,,
|
File without changes
|
File without changes
|