google-deepmind / mujoco

Multi-Joint dynamics with Contact. A general purpose physics simulator.
https://mujoco.org
Apache License 2.0
8.19k stars 819 forks source link

Is it possible for MJX to render in 'human' mode #1262

Closed gautica closed 11 months ago

gautica commented 11 months ago

Hi, I would like to ask if MJX offers similar render_mode as in gymnasium, where I can render in 'human' mode. And man can also control simulation with hot keys, for instance, whitespace to pause simulation, c to show the contact force, etc., thank you.

gautica commented 11 months ago

Another question is, can all environments be rendered during training in a way similar to isaacgym? Thanks

btaba commented 11 months ago

Hi @gautica have you tried the viewer here? This might be what you are looking for, let us know if not

For rendering during training, or saving policy checkpoints, you can use the following callback function

https://github.com/google/brax/blob/16304037a36b1d9c8c0b3084f57d1159627b636b/brax/training/agents/ppo/train.py#L102