jaxsim 0.2.1.dev98__py3-none-any.whl → 0.2.1.dev106__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 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.2.1.dev98'
16
- __version_tuple__ = version_tuple = (0, 2, 1, 'dev98')
15
+ __version__ = version = '0.2.1.dev106'
16
+ __version_tuple__ = version_tuple = (0, 2, 1, 'dev106')
jaxsim/api/common.py CHANGED
@@ -87,7 +87,8 @@ class ModelDataWithVelocityRepresentation(JaxsimDataclass, abc.ABC):
87
87
  array: jtp.Array,
88
88
  other_representation: VelRepr,
89
89
  transform: jtp.Matrix,
90
- is_force: bool = False,
90
+ *,
91
+ is_force: bool,
91
92
  ) -> jtp.Array:
92
93
  r"""
93
94
  Convert a 6D quantity from inertial-fixed to another representation.
@@ -153,7 +154,8 @@ class ModelDataWithVelocityRepresentation(JaxsimDataclass, abc.ABC):
153
154
  array: jtp.Array,
154
155
  other_representation: VelRepr,
155
156
  transform: jtp.Matrix,
156
- is_force: bool = False,
157
+ *,
158
+ is_force: bool,
157
159
  ) -> jtp.Array:
158
160
  r"""
159
161
  Convert a 6D quantity from another representation to inertial-fixed.
jaxsim/api/model.py CHANGED
@@ -338,6 +338,7 @@ def reduce(
338
338
  reduced_model = JaxSimModel.build(
339
339
  model_description=reduced_intermediate_description,
340
340
  model_name=model.name(),
341
+ terrain=model.terrain,
341
342
  )
342
343
 
343
344
  # Store the origin of the model, in case downstream logic needs it
jaxsim/api/ode.py CHANGED
@@ -113,7 +113,7 @@ def system_velocity_dynamics(
113
113
  ).astype(float)
114
114
 
115
115
  # Build link forces if not provided
116
- W_f_L = (
116
+ O_f_L = (
117
117
  jnp.atleast_2d(link_forces.squeeze())
118
118
  if link_forces is not None
119
119
  else jnp.zeros((model.number_of_links(), 6))
@@ -125,7 +125,7 @@ def system_velocity_dynamics(
125
125
 
126
126
  # Initialize the 6D forces W_f ∈ ℝ^{n_L × 6} applied to links due to contact
127
127
  # with the terrain.
128
- W_f_Li_terrain = jnp.zeros_like(W_f_L).astype(float)
128
+ W_f_Li_terrain = jnp.zeros_like(O_f_L).astype(float)
129
129
 
130
130
  # Initialize the 6D contact forces W_f ∈ ℝ^{n_c × 6} applied to collidable points,
131
131
  # expressed in the world frame.
@@ -183,7 +183,7 @@ def system_velocity_dynamics(
183
183
 
184
184
  # Compute the joint friction torque
185
185
  τ_friction = -(
186
- jnp.diag(kc) @ jnp.sign(data.state.physics_model.joint_positions)
186
+ jnp.diag(kc) @ jnp.sign(data.state.physics_model.joint_velocities)
187
187
  + jnp.diag(kv) @ data.state.physics_model.joint_velocities
188
188
  )
189
189
 
@@ -194,6 +194,17 @@ def system_velocity_dynamics(
194
194
  # Compute the total joint forces
195
195
  τ_total = τ + τ_friction + τ_position_limit
196
196
 
197
+ references = js.references.JaxSimModelReferences.build(
198
+ model=model,
199
+ joint_force_references=τ_total,
200
+ link_forces=O_f_L,
201
+ data=data,
202
+ velocity_representation=data.velocity_representation,
203
+ )
204
+
205
+ with references.switch_velocity_representation(VelRepr.Inertial):
206
+ W_f_L = references.link_forces(model=model, data=data)
207
+
197
208
  # Compute the total external 6D forces applied to the links
198
209
  W_f_L_total = W_f_L + W_f_Li_terrain
199
210
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jaxsim
3
- Version: 0.2.1.dev98
3
+ Version: 0.2.1.dev106
4
4
  Home-page: https://github.com/ami-iit/jaxsim
5
5
  Author: Diego Ferigo
6
6
  Author-email: diego.ferigo@iit.it
@@ -1,18 +1,18 @@
1
1
  jaxsim/__init__.py,sha256=OcrfoYS1DGcmAGqu2AqlCTiUVxcpi-IsVwcr_16x74Q,1789
2
- jaxsim/_version.py,sha256=PlgYXFRQrTcDBWrHgW3TWsyD0WOKMdyNQ1dtp2gm-oU,426
2
+ jaxsim/_version.py,sha256=ITDD6-dbYrg7qVZHEtxWcXvTK9rJ32AKGCK3jurpnKQ,428
3
3
  jaxsim/logging.py,sha256=c4zhwBKf9eAYAHVp62kTEllqdsZgh0K-kPKVy8L3elU,1584
4
4
  jaxsim/typing.py,sha256=MeuOCQtLAr-sPkvB_sU8FtwGNRirz1auCwIgRC-QZl8,646
5
5
  jaxsim/api/__init__.py,sha256=8eV22t2S3UwNyCg8karPetG1dmX1VDBXkyv28_FwNQA,210
6
6
  jaxsim/api/com.py,sha256=Yof6otFi-mLWAs1rqjmeNJTOWIH9gn7BdU5EIjiL6Ts,13481
7
- jaxsim/api/common.py,sha256=DV-WZG28sikXopNv458aYvpLjmiAtFr5LRscOwXusuk,6640
7
+ jaxsim/api/common.py,sha256=bqQ__pIQZbh-j8rkoHUkYHAgGiJnDzjHG-q4Ny0OOYQ,6646
8
8
  jaxsim/api/contact.py,sha256=Cvr-EfQtHP3nymtWdo-9WWU24Bkta-2Pp3nKsdjo6uc,12778
9
9
  jaxsim/api/data.py,sha256=xfKJz6Rw0YTk-EHCGiT8BFQrs_ggOz01lRi1Qh1mb28,27256
10
10
  jaxsim/api/frame.py,sha256=0YXOrGmx3cSQqa4_Ky-n6zyup3I3xvXNEgub-Bc5xUw,6222
11
11
  jaxsim/api/joint.py,sha256=-5DogPg4g4mmLckyVIVNjwv-Rxz0IWS7_md9nDlhPWA,4581
12
12
  jaxsim/api/kin_dyn_parameters.py,sha256=zMca7OmCsCWK_cavLTSZSeYh9Qu1-409cdsyWvWPAUQ,26090
13
13
  jaxsim/api/link.py,sha256=rypTwkMf9HJ5UuAtHRJh0LqqdJWcLKTtTjWcjduEsF0,9842
14
- jaxsim/api/model.py,sha256=Wwg3Wp9jm2Ah7wjvzou7oZYdZk2iTlfzSidp6GNwfJ0,54263
15
- jaxsim/api/ode.py,sha256=6l-6i2YHagsQvR8Ac-_fmO6P0hBVT6NkHhwXnrdITEg,9785
14
+ jaxsim/api/model.py,sha256=Ii17tBzCkMHCa_G7plKPzNcW-bj3QGuGI9jCklPQStM,54294
15
+ jaxsim/api/ode.py,sha256=BfvV_14uu0szWecoDiV8rTu-dvSFLK7eyrO38ZqHB_w,10157
16
16
  jaxsim/api/ode_data.py,sha256=D6FzMkvY_qNuoFEImyp7sxAk-0pJOd3oZeSr9bBTcLk,23089
17
17
  jaxsim/api/references.py,sha256=Lvskf17r619KKxwCJP7hAAty2kaXgDXJX1uKqoDIDgo,15483
18
18
  jaxsim/integrators/__init__.py,sha256=hxvOD-VK_mmd6v31wtC-nb28AYve1gLuZCNLV9wS-Kg,103
@@ -58,8 +58,8 @@ jaxsim/utils/__init__.py,sha256=Y5zyoRevl3EMVQadhZ4EtSwTEkDt2vcnFoRhPJjKTZ0,215
58
58
  jaxsim/utils/jaxsim_dataclass.py,sha256=h26timZ_XrBL_Q_oymv-DkQd-EcUiHn8QexAaZXBY9c,11396
59
59
  jaxsim/utils/tracing.py,sha256=KDMoyVPlu2NJvFkhtZwq5AkqMMgajt3munvJom-vEjQ,650
60
60
  jaxsim/utils/wrappers.py,sha256=EJMcblYKUjxw9HJShVf81Ig3pHUJno6Dx6h-RnY--wM,2040
61
- jaxsim-0.2.1.dev98.dist-info/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
62
- jaxsim-0.2.1.dev98.dist-info/METADATA,sha256=_aAfq6LooqjTyZY6utw1p0NrkwVZr10NC9Gw-MqCR1Y,9744
63
- jaxsim-0.2.1.dev98.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
64
- jaxsim-0.2.1.dev98.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
65
- jaxsim-0.2.1.dev98.dist-info/RECORD,,
61
+ jaxsim-0.2.1.dev106.dist-info/LICENSE,sha256=eaYdFmdeMbiIoIiPzEK0MjP1S9wtFXjXNR5er49uLR0,1546
62
+ jaxsim-0.2.1.dev106.dist-info/METADATA,sha256=hyAYbI27iEsSMF31Xv4HXSuvgSghYQE2S6vWNNlEuJk,9745
63
+ jaxsim-0.2.1.dev106.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
64
+ jaxsim-0.2.1.dev106.dist-info/top_level.txt,sha256=LxGMA8FLtXjQ6oI7N5gd_R_oSUHxpXxUEOfT1xS_ni0,7
65
+ jaxsim-0.2.1.dev106.dist-info/RECORD,,