openai / roboschool

DEPRECATED: Open-source software for robot simulation, integrated with OpenAI Gym.
Other
2.13k stars 488 forks source link

Add headless rendering with TinyRenderer #153

Open coord-e opened 6 years ago

coord-e commented 6 years ago

With this PR, roboschool environments can render rgb array without GUI. I added Camera::render_direct to cpp-household, and changed to use it when mode == 'rgb_array' in RoboschoolMujocoXmlEnv and RoboschoolUrdfEnv.

Also, this PR requires the latest bullet3 library to enable TinyRenderer. The latest bullet3 has COV_ENABLE_TINY_RENDERER flag to enable TinyRenderer

So this PR contains the minimal changes to use the latest bullet3. Upgrading to latest bullet may ought to be done in #62, but I committed the changes here because #62 has been left unmerged.

olegklimov commented 6 years ago

Looks good. But I didn't try yet.

olegklimov commented 6 years ago

image

Humanoids look funny!

olegklimov commented 6 years ago

@coord-e please take a look at newer_bullet_lib branch. It has some fixes on top of your changes.

https://github.com/openai/roboschool/tree/newer_bullet_lib

olegklimov commented 6 years ago

check_software_camera.py -- this is a script I wrote to test what is the result of render('rgb_array'), here is what it shows:

image

Humanoid doesn't look funny rendered this way, but playing field is missing.