brax icon indicating copy to clipboard operation
brax copied to clipboard

Dump to json fails if mj model contains no meshes

Open Nate711 opened this issue 1 year ago • 1 comments

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

Nate711 avatar Feb 23 '24 16:02 Nate711

Thanks for the bug report! We'll send out a fix shortly

btaba avatar Feb 27 '24 02:02 btaba

This should be fixed in 0825bcb74b53e36a62d50405a85e540fe2c25a95 , please let us know if that doesn't work! Closing for now

btaba avatar Feb 28 '24 00:02 btaba