brax
brax copied to clipboard
Dump to json fails if mj model contains no meshes
I had a case where my mujoco model had only geometry (boxes, spheres, etc) and no meshes. When I tried to use the HTML visualizer with this model (HTML(html.render(brax_sys, rollout))
), I got an error in the json dumper because mj_mode.nmeshes
returned 0 and this value was not correctly handled.
https://github.com/google/brax/blob/3c109cfd131e01691a53891e8f2ec9b32cf97670/brax/io/json.py#L174
Thanks for the bug report! We'll send out a fix shortly
This should be fixed in 0825bcb74b53e36a62d50405a85e540fe2c25a95 , please let us know if that doesn't work! Closing for now