mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

Sensors in MuJoCo XLA?

Open eleninisioti opened this issue 1 year ago • 3 comments

I see in the documentation of MuJoCO XLA (https://mujoco.readthedocs.io/en/stable/mjx.html) that sensors are under development, any chance this feature has been added? If so, are there any examples?

eleninisioti avatar Mar 15 '24 10:03 eleninisioti

At this moment, I just implement them with jax functions following the logic implemented in c++: https://github.com/google-deepmind/mujoco/blob/main/src/engine/engine_sensor.c#L525

breakds avatar Mar 19 '24 00:03 breakds

Does anyone want to send us a PR implementing this in the MJX codebase? That would be welcome.

yuvaltassa avatar Mar 19 '24 01:03 yuvaltassa

Does anyone want to send us a PR implementing this in the MJX codebase? That would be welcome.

Never contributed to MuJoCo before, but I would like to give it a try if no one is currently working on it.

My current implementation is very pre-mature, and does not respect <sensor> tag yet. It is a function that takes a mjx.Data as input.

breakds avatar Mar 28 '24 18:03 breakds

Sensors will be part of the next MJX release.

kevinzakka avatar Aug 30 '24 19:08 kevinzakka