leap-hand / LEAP_Hand_Sim

http://leaphand.com/
MIT License
107 stars 18 forks source link

headless rendering #23

Open tarunc20 opened 3 months ago

tarunc20 commented 3 months ago

Hi,

I'm trying to do headless rendering of the LeapHandRot environment, i.e., I want to be able to use env.render(mode="rgb_array") but I seem to be running into a few issues here. First, the LeapHandRot environment seems to inherit from the Env class, which doesn't support headless rendering within its render function, so I took a look at the VecTaskEnv class, which does appear to. However, when I try implementing the same logic, i.e., moving the virtual display code from VecTaskEnv to LeapHandRot, I run into an issue where the viewer is needed, since otherwise the virtual display returns None as the image when virtual_display.grab() is called. I have a feeling that I'm potentially overcomplicating the issue, so if you have any suggestions, that would be greatly appreciated - thanks!