Repository navigation
add parity test for acceleration sensors on static and mocap bodies - #1805
Conversation
mj_objectAcceleration returns zero for bodies welded to a dof-less body. accelerometer, framelinacc and frameangacc read cacc directly, so a site on the world, a static body or a mocap body reported -gravity. Signed-off-by: Dundy Pasupuleti <dundysm@gmail.com>
|
Thanks @dundysm! Good catch fixing acceleration sensor parity for static and mocap bodies; a few minor recommendations below before merging. 1.
|
Signed-off-by: Dundy Pasupuleti <dundysm@gmail.com>
|
thanks @thowell, all three are in 3741c69:
|
|
@dundysm lets update the branch in order to resolve the ci failures. thanks! |
|
@adenzler-nvidia this is approved by thowell and green after the main merge; it zeros acceleration sensors on static and mocap bodies. could you merge it when you get a chance? |
|
@thowell @adenzler-nvidia correction to my last comment: the stable-dependencies (3.14) failure does come from this pr. mujoco 4.0 (google-deepmind/mujoco@fdf1412) now reports gravity in accelerometer and framelinacc on static and mocap bodies, which is what warp already does on main, so the zeroing here now breaks parity ( so i think this pr is superseded. i'm fine closing it; or i can drop the |
|
@dundysm lets refactor the pr to just include the test. thanks! |
mujoco 4.0 reports gravity in accelerometer and framelinacc on static and mocap bodies, which warp already matches on main, so drop the sensor.py zeroing and keep the test as a parity check against mujoco. Signed-off-by: Dundy Pasupuleti <dundysm@gmail.com>
|
thanks @thowell; done in 794da06. it merges main and reverts the |
related to #1804
mujoco 4.0 (google-deepmind/mujoco@fdf1412) now reports gravity in accelerometer and framelinacc on static and mocap bodies, which is what warp already does on main, so the original sensor.py zeroing is no longer needed. per review, this pr now only adds a parity test.
tests:
sensor_test.test_acc_sensors_dofless_bodychecks accelerometer, framelinacc and frameangacc sites on the world, a mocap body, a static body and a hinged body against mujoco 4.0.2, pre-fillingsensordatawithwp.infand callingmjw.sensor_accdirectly. it passes on main and fails with the old zeroing change applied.pytest mujoco_warp/_src/sensor_test.pygives 70 passed on cpu; ruff format clean.