jaxsim 0.7.1.dev50__py3-none-any.whl → 0.7.1.dev58__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 +6 -23
- jaxsim/rbda/contacts/common.py +17 -11
- {jaxsim-0.7.1.dev50.dist-info → jaxsim-0.7.1.dev58.dist-info}/METADATA +1 -1
- {jaxsim-0.7.1.dev50.dist-info → jaxsim-0.7.1.dev58.dist-info}/RECORD +8 -8
- {jaxsim-0.7.1.dev50.dist-info → jaxsim-0.7.1.dev58.dist-info}/WHEEL +1 -1
- {jaxsim-0.7.1.dev50.dist-info → jaxsim-0.7.1.dev58.dist-info}/licenses/LICENSE +0 -0
- {jaxsim-0.7.1.dev50.dist-info → jaxsim-0.7.1.dev58.dist-info}/top_level.txt +0 -0
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.7.1.
|
21
|
-
__version_tuple__ = version_tuple = (0, 7, 1, '
|
20
|
+
__version__ = version = '0.7.1.dev58'
|
21
|
+
__version_tuple__ = version_tuple = (0, 7, 1, 'dev58')
|
jaxsim/api/contact.py
CHANGED
@@ -191,39 +191,22 @@ def estimate_good_contact_parameters(
|
|
191
191
|
The user is encouraged to fine-tune the parameters based on the
|
192
192
|
specific application.
|
193
193
|
"""
|
194
|
-
|
195
|
-
|
196
|
-
"""
|
197
|
-
Displacement between the CoM and the lowest collidable point using zero
|
198
|
-
joint positions.
|
199
|
-
"""
|
200
|
-
|
201
|
-
zero_data = js.data.JaxSimModelData.build(
|
202
|
-
model=model,
|
203
|
-
)
|
204
|
-
|
194
|
+
if max_penetration is None:
|
195
|
+
zero_data = js.data.JaxSimModelData.build(model=model)
|
205
196
|
W_pz_CoM = js.com.com_position(model=model, data=zero_data)[2]
|
206
|
-
|
207
197
|
if model.floating_base():
|
208
198
|
W_pz_C = collidable_point_positions(model=model, data=zero_data)[:, -1]
|
209
|
-
|
210
|
-
|
211
|
-
return 2 * W_pz_CoM
|
199
|
+
W_pz_CoM = W_pz_CoM - W_pz_C.min()
|
212
200
|
|
213
|
-
|
214
|
-
max_penetration
|
215
|
-
if max_penetration is not None
|
216
|
-
# Consider as default a 0.5% of the model height.
|
217
|
-
else 0.005 * estimate_model_height(model=model)
|
218
|
-
)
|
201
|
+
# Consider as default a 1% of the model center of mass height.
|
202
|
+
max_penetration = 0.01 * W_pz_CoM
|
219
203
|
|
220
204
|
nc = number_of_active_collidable_points_steady_state
|
221
|
-
|
222
205
|
return model.contact_model._parameters_class().build_default_from_jaxsim_model(
|
223
206
|
model=model,
|
224
207
|
standard_gravity=standard_gravity,
|
225
208
|
static_friction_coefficient=static_friction_coefficient,
|
226
|
-
max_penetration=
|
209
|
+
max_penetration=max_penetration,
|
227
210
|
number_of_active_collidable_points_steady_state=nc,
|
228
211
|
damping_ratio=damping_ratio,
|
229
212
|
)
|
jaxsim/rbda/contacts/common.py
CHANGED
@@ -18,6 +18,10 @@ except ImportError:
|
|
18
18
|
from typing_extensions import Self
|
19
19
|
|
20
20
|
|
21
|
+
MAX_STIFFNESS = 1e6
|
22
|
+
MAX_DAMPING = 1e4
|
23
|
+
|
24
|
+
|
21
25
|
@functools.partial(jax.jit, static_argnames=("terrain",))
|
22
26
|
def compute_penetration_data(
|
23
27
|
p: jtp.VectorLike,
|
@@ -133,28 +137,30 @@ class ContactsParams(JaxsimDataclass):
|
|
133
137
|
ξ = damping_ratio
|
134
138
|
δ_max = max_penetration
|
135
139
|
μc = static_friction_coefficient
|
140
|
+
nc = number_of_active_collidable_points_steady_state
|
136
141
|
|
137
142
|
# Compute the total mass of the model.
|
138
143
|
m = jnp.array(model.kin_dyn_parameters.link_parameters.mass).sum()
|
139
144
|
|
140
|
-
# Rename the standard gravity.
|
141
|
-
g = standard_gravity
|
142
|
-
|
143
|
-
# Compute the average support force on each collidable point.
|
144
|
-
f_average = m * g / number_of_active_collidable_points_steady_state
|
145
|
-
|
146
145
|
# Compute the stiffness to get the desired steady-state penetration.
|
147
146
|
# Note that this is dependent on the non-linear exponent used in
|
148
147
|
# the damping term of the Hunt/Crossley model.
|
149
|
-
|
148
|
+
if stiffness is None:
|
149
|
+
# Compute the average support force on each collidable point.
|
150
|
+
f_average = m * standard_gravity / nc
|
151
|
+
|
152
|
+
stiffness = f_average / jnp.power(δ_max, 1 + p)
|
153
|
+
stiffness = jnp.clip(stiffness, 0, MAX_STIFFNESS)
|
150
154
|
|
151
155
|
# Compute the damping using the damping ratio.
|
152
|
-
critical_damping = 2 * jnp.sqrt(
|
153
|
-
|
156
|
+
critical_damping = 2 * jnp.sqrt(stiffness * m)
|
157
|
+
if damping is None:
|
158
|
+
damping = ξ * critical_damping
|
159
|
+
damping = jnp.clip(damping, 0, MAX_DAMPING)
|
154
160
|
|
155
161
|
return self.build(
|
156
|
-
K=
|
157
|
-
D=
|
162
|
+
K=stiffness,
|
163
|
+
D=damping,
|
158
164
|
mu=μc,
|
159
165
|
p=p,
|
160
166
|
q=q,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: jaxsim
|
3
|
-
Version: 0.7.1.
|
3
|
+
Version: 0.7.1.dev58
|
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
1
|
jaxsim/__init__.py,sha256=EKeysKN-7UswwJLCl7n6qIBKQIVUtYsCMYu_tCoFn7g,3628
|
2
|
-
jaxsim/_version.py,sha256=
|
2
|
+
jaxsim/_version.py,sha256=qWp0ftHY1akpDRe3TY0zoRlTSYZebNkmND8lPzyhe5c,526
|
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
|
@@ -7,7 +7,7 @@ jaxsim/api/__init__.py,sha256=4skzcTTejLFfZ_JE6yEEyNxObpXnR5u-bYsn2lBEx-4,234
|
|
7
7
|
jaxsim/api/actuation_model.py,sha256=GgLi-yhEpsczwhMNYIlMvet8tirmmED6S7AumbSbk4U,3705
|
8
8
|
jaxsim/api/com.py,sha256=47a9SSaXY540RCkVnHodwLNUrodIfJIkguIYdSEQVwQ,13697
|
9
9
|
jaxsim/api/common.py,sha256=yTaRXDYkXmISBOhZ93f9TssR0p4wq7qj7B6OsvYzRME,6942
|
10
|
-
jaxsim/api/contact.py,sha256=
|
10
|
+
jaxsim/api/contact.py,sha256=H4ltV0RYv3AbaKPtu0pfyWhcsm4FiEBUEfBtpusEpHw,22087
|
11
11
|
jaxsim/api/data.py,sha256=9pxug2gFIZPwqi9kNYXhEziA5IQBB9KNNwIfPfc_kAU,23249
|
12
12
|
jaxsim/api/frame.py,sha256=4wg6GsyBQgYhSvc-ry_31JsaL66sZt3TtgwjB7NrHmk,14583
|
13
13
|
jaxsim/api/integrators.py,sha256=sHdTWw2Z-Q7jggA8zRkA1KYYd4HNIozXPwNvFwt0YBs,9011
|
@@ -56,7 +56,7 @@ jaxsim/rbda/utils.py,sha256=6JwEDQqLMsBX7CUmPYEhdPEscXmGbWVYg6xEriPOgvE,5587
|
|
56
56
|
jaxsim/rbda/actuation/__init__.py,sha256=zWqB8VBHadbyf8FAuhQtcfWdetGjfVxuNDwIeUqNOS4,36
|
57
57
|
jaxsim/rbda/actuation/common.py,sha256=aGFqO4VTgQLsTJyOtVuoa_otT_RbkckmG3rq7wjOyB4,462
|
58
58
|
jaxsim/rbda/contacts/__init__.py,sha256=resrBkTdOA-1YMdcdUH2RATEhAf_Ye6MQNtjG3ClMYQ,371
|
59
|
-
jaxsim/rbda/contacts/common.py,sha256=
|
59
|
+
jaxsim/rbda/contacts/common.py,sha256=e-NDoC1N9PK5B0e1fQkYtxS495GSpRCGZRzB6-53WS4,9207
|
60
60
|
jaxsim/rbda/contacts/relaxed_rigid.py,sha256=oBQV-oAbx6_D8xhddCRLbV5VV7Lz75levRS5mxBnYVg,25621
|
61
61
|
jaxsim/rbda/contacts/rigid.py,sha256=I_TjsT-84ywou2idYioqekeQbIOHTdHI54vot8ijMPk,17605
|
62
62
|
jaxsim/rbda/contacts/soft.py,sha256=a7NYMknPfWKfCdbVu83ttDu1u_gssIRvxe9L1622tM0,15284
|
@@ -66,8 +66,8 @@ jaxsim/utils/__init__.py,sha256=Y5zyoRevl3EMVQadhZ4EtSwTEkDt2vcnFoRhPJjKTZ0,215
|
|
66
66
|
jaxsim/utils/jaxsim_dataclass.py,sha256=XzmZeIibcaOzaxpprsGSxH3UrM66PAO456rFV91sNXg,11453
|
67
67
|
jaxsim/utils/tracing.py,sha256=Btwxdfhb7fJLk3r5PlQkGYj60Y2KbFT1gANGIA697FU,530
|
68
68
|
jaxsim/utils/wrappers.py,sha256=3IMwydqFgmSPqeuUQ3PRmdhDc1IoT6XC23jPC_LjWXs,4175
|
69
|
-
jaxsim-0.7.1.
|
70
|
-
jaxsim-0.7.1.
|
71
|
-
jaxsim-0.7.1.
|
72
|
-
jaxsim-0.7.1.
|
73
|
-
jaxsim-0.7.1.
|
69
|
+
jaxsim-0.7.1.dev58.dist-info/licenses/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
|
70
|
+
jaxsim-0.7.1.dev58.dist-info/METADATA,sha256=mcp6kvYpxFEyRoOqu8ZNOicZZ4E7sEux_deMzyehtSk,17851
|
71
|
+
jaxsim-0.7.1.dev58.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
72
|
+
jaxsim-0.7.1.dev58.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
|
73
|
+
jaxsim-0.7.1.dev58.dist-info/RECORD,,
|
File without changes
|
File without changes
|