Initial implementation of contact sensor for MJX JAX backend.

PiperOrigin-RevId: 786742643
Change-Id: Idabd98320a4716c597bb596e32a8a90f3cd5f356
This commit is contained in:
Taylor Howell
2025-07-24 09:58:39 -07:00
committed by Copybara-Service
parent 5eab59d026
commit ddb7eb07c7
7 changed files with 323 additions and 15 deletions
+1 -1
View File
@@ -432,13 +432,13 @@ def forward(m: Model, d: Data) -> Data:
d = sensor.sensor_vel(m, d)
d = fwd_actuation(m, d)
d = fwd_acceleration(m, d)
d = sensor.sensor_acc(m, d)
if d._impl.efc_J.size == 0:
d = d.replace(qacc=d.qacc_smooth)
return d
d = named_scope(solver.solve)(m, d)
d = sensor.sensor_acc(m, d)
return d