run in docker terminal
This would be the ultimate headless test: run Open3D from a terminal attached to the running container. Open3D should find the virtual display and use it.
Currently running Tutorial/Basic/rgbd_redwood.py from the Docker terminal leads to a segmentation fault. The error message suggests that if GLFW would be able to find the virtual display maybe this could work.
GLFW Error: X11: The DISPLAY environment variable is missing
Failed to initialize GLFW
GLFW Error: The GLFW library is not initialized
Fatal Python error: Segmentation fault
Thread 0x00007f04fbdbd700 (most recent call first):
File "./test.py", line 22 in custom_draw_geometry
File "./test.py", line 29 in <module>
Segmentation fault (core dumped)
In order to run headless an Open3D python script in docker terminal:
- Run the Open3D container then attach to it.
- $
Xvfb :99 -screen 0 1920x1080x24 - $
DISPLAY=:99.0 - $
export DISPLAY - $
./test.py &
I tested it with the docker image I built for Open3D. This works great with the master branch and it doesn't need glfw 3.3. I'm taking this note here before putting it in the doc just so that I don't forget about it.
This is good news. Thanks @takanokage. What test.py does? Can it render and save frame buffers like Advanced/customized_visualization.py from terminal?
Related to #17.
test.py is just the first part of Advanced/customized_visualization.py:
1. Customized visualization to mimic DrawGeometry
Alright. Can you check Advanced/customized_visualization.py with docker solution you are working with? One of the major goal for headless rendering is to save images (color, depth, normal) remotely.
Yep, just tested and it works to save the images.
Closing this as I have a solution which will be included in the pull request for #17.