Closed rpapallas closed 1 year ago
with MujocoViewer(model, data) as viewer:
viewer.render()
While this functionality is useful, I will probably introduce this in a future release. For now, https://github.com/rohanpsingh/mujoco-python-viewer/pull/15 solves the original problem this intended to solve.
Thanks a lot for making the PR!
This allows a client to use the class in the following way:
and it will call viewer.close() when it goes out of scope, so the client doesn't have to.