rohanpsingh / mujoco-python-viewer

Simple renderer for use with MuJoCo (>=2.1.2) Python Bindings.
BSD 2-Clause "Simplified" License
163 stars 24 forks source link

Added method to update window's title #20

Open rpapallas opened 1 year ago

rpapallas commented 1 year ago

I needed this small functionality and thought might be useful in general. I have multiple MuJoCo data that run in parallel and since I can only visualize one at a time, if I want to know which one I am looking at, I might need to update the window title.

rohanpsingh commented 1 year ago

I guess it doesn't hurt anyone so I can merge this.

since I can only visualize one at a time

Could you please elaborate what you mean by this?

rpapallas commented 1 year ago

I have had issues spinning up multiple viewer instances from the same code. On macOS, it gives an error. I haven't tried on Linux, I could try now and see if this is a macOS issue? Are you able to spin up multiple instances?

Edit: I see, on Linux I could have two viewers, and it won't throw an error like macOS does, but only one viewer can render, the other one is black (even with different mjData).

rohanpsingh commented 1 year ago

Hi @rpapallas I think in that case, I must try and make mutiple viewer instances work. Then, we can see if the method implemented in this PR is needed or not.