Rendering simulations on EC2 instance?

Discussion in 'Visualization' started by Chris Garry, Jan 24, 2019.

  1. Hi I was wondering if there are any recommended methods for rendering simulations on a headless EC2 instance. Id like to, for example, view the shadow arm environment in OpenAI Gym on an EC2 instance. Thanks!
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    MuJoCo can use EGL for headless rendering (assuming you have hardware acceleration). Alternatively you can use OSMESA for software rendering. Either way, you would have to write code that extracts the bitmap from the OpenGL buffers, sends it to a machine with a display, and visualizes it. The code sample record.cpp illustrates headless rendering and saving to a file.

    If you just want to see the simulation state (as opposed to generating lots of images on the remote machine for computer vision purposes), there is an alternative: send the MuJoCo state to your local machine, then instantiate the state in MuJoCo locally and render it. This will be faster, because you are sending a small vector instead of a bitmap over the internet.