jaxsim 0.4.3.dev70__py3-none-any.whl → 0.4.3.dev77__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/contact.py +5 -0
- jaxsim/api/ode.py +3 -1
- jaxsim/rbda/contacts/relaxed_rigid.py +25 -0
- jaxsim/rbda/contacts/rigid.py +10 -0
- {jaxsim-0.4.3.dev70.dist-info → jaxsim-0.4.3.dev77.dist-info}/METADATA +1 -1
- {jaxsim-0.4.3.dev70.dist-info → jaxsim-0.4.3.dev77.dist-info}/RECORD +10 -10
- {jaxsim-0.4.3.dev70.dist-info → jaxsim-0.4.3.dev77.dist-info}/LICENSE +0 -0
- {jaxsim-0.4.3.dev70.dist-info → jaxsim-0.4.3.dev77.dist-info}/WHEEL +0 -0
- {jaxsim-0.4.3.dev70.dist-info → jaxsim-0.4.3.dev77.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.3.
|
16
|
-
__version_tuple__ = version_tuple = (0, 4, 3, '
|
15
|
+
__version__ = version = '0.4.3.dev77'
|
16
|
+
__version_tuple__ = version_tuple = (0, 4, 3, 'dev77')
|
jaxsim/api/contact.py
CHANGED
@@ -117,6 +117,7 @@ def collidable_point_dynamics(
|
|
117
117
|
model: js.model.JaxSimModel,
|
118
118
|
data: js.data.JaxSimModelData,
|
119
119
|
link_forces: jtp.MatrixLike | None = None,
|
120
|
+
joint_force_references: jtp.VectorLike | None = None,
|
120
121
|
) -> tuple[jtp.Matrix, dict[str, jtp.Array]]:
|
121
122
|
r"""
|
122
123
|
Compute the 6D force applied to each collidable point.
|
@@ -127,6 +128,8 @@ def collidable_point_dynamics(
|
|
127
128
|
link_forces:
|
128
129
|
The 6D external forces to apply to the links expressed in the same
|
129
130
|
representation of data.
|
131
|
+
joint_force_references:
|
132
|
+
The joint force references to apply to the joints.
|
130
133
|
|
131
134
|
Returns:
|
132
135
|
The 6D force applied to each collidable point and additional data based on the contact model configured:
|
@@ -191,6 +194,7 @@ def collidable_point_dynamics(
|
|
191
194
|
model=model,
|
192
195
|
data=data,
|
193
196
|
link_forces=link_forces,
|
197
|
+
joint_force_references=joint_force_references,
|
194
198
|
)
|
195
199
|
|
196
200
|
aux_data = dict()
|
@@ -212,6 +216,7 @@ def collidable_point_dynamics(
|
|
212
216
|
model=model,
|
213
217
|
data=data,
|
214
218
|
link_forces=link_forces,
|
219
|
+
joint_force_references=joint_force_references,
|
215
220
|
)
|
216
221
|
|
217
222
|
aux_data = dict()
|
jaxsim/api/ode.py
CHANGED
@@ -95,7 +95,7 @@ def system_velocity_dynamics(
|
|
95
95
|
Args:
|
96
96
|
model: The model to consider.
|
97
97
|
data: The data of the considered model.
|
98
|
-
joint_forces: The joint
|
98
|
+
joint_forces: The joint force references to apply.
|
99
99
|
link_forces:
|
100
100
|
The 6D forces to apply to the links expressed in the frame corresponding to
|
101
101
|
the velocity representation of `data`.
|
@@ -120,6 +120,7 @@ def system_velocity_dynamics(
|
|
120
120
|
references = js.references.JaxSimModelReferences.build(
|
121
121
|
model=model,
|
122
122
|
link_forces=O_f_L,
|
123
|
+
joint_force_references=joint_forces,
|
123
124
|
data=data,
|
124
125
|
velocity_representation=data.velocity_representation,
|
125
126
|
)
|
@@ -149,6 +150,7 @@ def system_velocity_dynamics(
|
|
149
150
|
model=model,
|
150
151
|
data=data,
|
151
152
|
link_forces=references.link_forces(model=model, data=data),
|
153
|
+
joint_force_references=references.joint_force_references(model=model),
|
152
154
|
)
|
153
155
|
|
154
156
|
# Construct the vector defining the parent link index of each collidable point.
|
@@ -189,7 +189,25 @@ class RelaxedRigidContacts(ContactModel):
|
|
189
189
|
model: js.model.JaxSimModel,
|
190
190
|
data: js.data.JaxSimModelData,
|
191
191
|
link_forces: jtp.MatrixLike | None = None,
|
192
|
+
joint_force_references: jtp.VectorLike | None = None,
|
192
193
|
) -> tuple[jtp.Vector, tuple[Any, ...]]:
|
194
|
+
"""
|
195
|
+
Compute the contact forces.
|
196
|
+
|
197
|
+
Args:
|
198
|
+
position: The position of the collidable point.
|
199
|
+
velocity: The linear velocity of the collidable point.
|
200
|
+
model: The `JaxSimModel` instance.
|
201
|
+
data: The `JaxSimModelData` instance.
|
202
|
+
link_forces:
|
203
|
+
Optional `(n_links, 6)` matrix of external forces acting on the links,
|
204
|
+
expressed in the same representation of data.
|
205
|
+
joint_force_references:
|
206
|
+
Optional `(n_joints,)` vector of joint forces.
|
207
|
+
|
208
|
+
Returns:
|
209
|
+
A tuple containing the contact forces.
|
210
|
+
"""
|
193
211
|
|
194
212
|
link_forces = (
|
195
213
|
link_forces
|
@@ -197,11 +215,18 @@ class RelaxedRigidContacts(ContactModel):
|
|
197
215
|
else jnp.zeros((model.number_of_links(), 6))
|
198
216
|
)
|
199
217
|
|
218
|
+
joint_force_references = (
|
219
|
+
joint_force_references
|
220
|
+
if joint_force_references is not None
|
221
|
+
else jnp.zeros(model.number_of_joints())
|
222
|
+
)
|
223
|
+
|
200
224
|
references = js.references.JaxSimModelReferences.build(
|
201
225
|
model=model,
|
202
226
|
data=data,
|
203
227
|
velocity_representation=data.velocity_representation,
|
204
228
|
link_forces=link_forces,
|
229
|
+
joint_force_references=joint_force_references,
|
205
230
|
)
|
206
231
|
|
207
232
|
def _detect_contact(x: jtp.Array, y: jtp.Array, z: jtp.Array) -> jtp.Array:
|
jaxsim/rbda/contacts/rigid.py
CHANGED
@@ -213,6 +213,7 @@ class RigidContacts(ContactModel):
|
|
213
213
|
model: js.model.JaxSimModel,
|
214
214
|
data: js.data.JaxSimModelData,
|
215
215
|
link_forces: jtp.MatrixLike | None = None,
|
216
|
+
joint_force_references: jtp.VectorLike | None = None,
|
216
217
|
regularization_term: jtp.FloatLike = 1e-6,
|
217
218
|
) -> tuple[jtp.Vector, tuple[Any, ...]]:
|
218
219
|
"""
|
@@ -226,6 +227,8 @@ class RigidContacts(ContactModel):
|
|
226
227
|
link_forces:
|
227
228
|
Optional `(n_links, 6)` matrix of external forces acting on the links,
|
228
229
|
expressed in the same representation of data.
|
230
|
+
joint_force_references:
|
231
|
+
Optional `(n_joints,)` vector of joint forces.
|
229
232
|
regularization_term:
|
230
233
|
The regularization term to add to the diagonal of the Delassus
|
231
234
|
matrix for better numerical conditioning.
|
@@ -243,6 +246,12 @@ class RigidContacts(ContactModel):
|
|
243
246
|
else jnp.zeros((model.number_of_links(), 6))
|
244
247
|
)
|
245
248
|
|
249
|
+
joint_force_references = (
|
250
|
+
joint_force_references
|
251
|
+
if joint_force_references is not None
|
252
|
+
else jnp.zeros((model.number_of_joints(),))
|
253
|
+
)
|
254
|
+
|
246
255
|
# Compute kin-dyn quantities used in the contact model
|
247
256
|
with data.switch_velocity_representation(VelRepr.Mixed):
|
248
257
|
M = js.model.free_floating_mass_matrix(model=model, data=data)
|
@@ -269,6 +278,7 @@ class RigidContacts(ContactModel):
|
|
269
278
|
data=data,
|
270
279
|
velocity_representation=data.velocity_representation,
|
271
280
|
link_forces=link_forces,
|
281
|
+
joint_force_references=joint_force_references,
|
272
282
|
)
|
273
283
|
|
274
284
|
with (
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: jaxsim
|
3
|
-
Version: 0.4.3.
|
3
|
+
Version: 0.4.3.dev77
|
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,19 +1,19 @@
|
|
1
1
|
jaxsim/__init__.py,sha256=bSbpggIz5aG6QuGZLa0V2EfHjAOeucMxi-vIYxzLmN8,2788
|
2
|
-
jaxsim/_version.py,sha256=
|
2
|
+
jaxsim/_version.py,sha256=iooIC7hyVsbupWXsxWXV06oZTPyCALANUUOu7UZTm8Y,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=2HXy9hgazPXjofi1vLQ09ZubPtgVmg80U9NKmZ6NYiI,761
|
6
6
|
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
|
-
jaxsim/api/contact.py,sha256=
|
9
|
+
jaxsim/api/contact.py,sha256=Ek1xSKB_VWjfqsqRYlK236ountKmGTl1M04cTYqHgsE,22142
|
10
10
|
jaxsim/api/data.py,sha256=QldUHniJqKrdNtAcXuRaS9UyeslJ0Rjvb17UA0Ca5Tw,29008
|
11
11
|
jaxsim/api/frame.py,sha256=KS8A5wRfjxhe9NgcVo2QA516iP5zky7UVnWxG7nTa7c,12911
|
12
12
|
jaxsim/api/joint.py,sha256=lksT1Doxz2jknHyhb4ls20z6f6dofpZSzBJtVacZXAE,7129
|
13
13
|
jaxsim/api/kin_dyn_parameters.py,sha256=CcfSg5Mc8qb1mZeMQ4AK_ffZIsK5yOl7tu397pFhcDA,29369
|
14
14
|
jaxsim/api/link.py,sha256=qPRtc8qqMRjZxUCZYXJMygbB6huDXBfIT1b1b8Durkw,18631
|
15
15
|
jaxsim/api/model.py,sha256=TLjgacgTXm-2YRGDA0Id9pe9nxIem28KoAls6Tdk9WM,66241
|
16
|
-
jaxsim/api/ode.py,sha256=
|
16
|
+
jaxsim/api/ode.py,sha256=ZshGdHptftku0yoUwBiBdd1iOqntH0vVEOjRHfL7Fao,13518
|
17
17
|
jaxsim/api/ode_data.py,sha256=7RSoBhfCJdP6P9InQbDwdBVpClPMMuetewI-6AWm-_0,20276
|
18
18
|
jaxsim/api/references.py,sha256=XOVKuQXRmjPoP-T5JWGSbqIGX5DzOkeGafqRpj0ZQEM,20771
|
19
19
|
jaxsim/integrators/__init__.py,sha256=hxvOD-VK_mmd6v31wtC-nb28AYve1gLuZCNLV9wS-Kg,103
|
@@ -54,8 +54,8 @@ jaxsim/rbda/rnea.py,sha256=CLfqs9XFVaD-hvkLABshDAfdw5bm_AMV3UVAQ_IvURQ,7542
|
|
54
54
|
jaxsim/rbda/utils.py,sha256=eeT21Y4DiiyhrdF0lUE_VvRuwru5-rR7yOlOlWzCCWE,5381
|
55
55
|
jaxsim/rbda/contacts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
56
56
|
jaxsim/rbda/contacts/common.py,sha256=VwAs742futAmLnDgbaOuLzNDBFiKDfYItdEZ4UcFgzE,2467
|
57
|
-
jaxsim/rbda/contacts/relaxed_rigid.py,sha256=
|
58
|
-
jaxsim/rbda/contacts/rigid.py,sha256=
|
57
|
+
jaxsim/rbda/contacts/relaxed_rigid.py,sha256=0rrk73MKMVPkEXf1MTEmCnXaPWzzEw6U9RHZtLNIu_E,13646
|
58
|
+
jaxsim/rbda/contacts/rigid.py,sha256=zbSM0miwpgC1rp1d0RoQ1q8pYiKdIkHV8iZimeEPC94,15153
|
59
59
|
jaxsim/rbda/contacts/soft.py,sha256=_wvb5iZDjGcVg6rNQelN4LZN7qSC2NIp0HdKvZmlGfk,15647
|
60
60
|
jaxsim/terrain/__init__.py,sha256=f7lVX-iNpH_wkkjef9Qpjh19TTAUOQw76EiLYJDVizc,78
|
61
61
|
jaxsim/terrain/terrain.py,sha256=xUQg47yGxIOcTkLPbnO3sruEGBhoCd16j1evTGlmNjI,5010
|
@@ -63,8 +63,8 @@ jaxsim/utils/__init__.py,sha256=Y5zyoRevl3EMVQadhZ4EtSwTEkDt2vcnFoRhPJjKTZ0,215
|
|
63
63
|
jaxsim/utils/jaxsim_dataclass.py,sha256=FSiUvdnq4Y1T9Jaa_mw4ZBQJe8H7deLr3Kupxtlh4iI,11322
|
64
64
|
jaxsim/utils/tracing.py,sha256=KDMoyVPlu2NJvFkhtZwq5AkqMMgajt3munvJom-vEjQ,650
|
65
65
|
jaxsim/utils/wrappers.py,sha256=Fh82ZcaFi5fUnByyFLnmumaobsu1hJIvFdopUVzJ1ps,4052
|
66
|
-
jaxsim-0.4.3.
|
67
|
-
jaxsim-0.4.3.
|
68
|
-
jaxsim-0.4.3.
|
69
|
-
jaxsim-0.4.3.
|
70
|
-
jaxsim-0.4.3.
|
66
|
+
jaxsim-0.4.3.dev77.dist-info/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
|
67
|
+
jaxsim-0.4.3.dev77.dist-info/METADATA,sha256=SfRw58102asAL9OAPXqsvh9nr8FVvLamf9dCNL9XXPo,17276
|
68
|
+
jaxsim-0.4.3.dev77.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
69
|
+
jaxsim-0.4.3.dev77.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
|
70
|
+
jaxsim-0.4.3.dev77.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|