Skip to content

Commit b15964d

Browse files
authored
[skip ci] Update README with new headless instructions
1 parent a420d72 commit b15964d

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

README.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ __PyRep is a toolkit for robot learning research, built on top of [CoppeliaSim](
55

66

77
- [Install](#install)
8+
- [Running Headless](#running-headless)
89
- [Getting Started](#getting-started)
910
- [Usage](#usage)
1011
- [Supported Robots](#supported-robots)
1112
- [Adding Robots](#adding-robots)
12-
- [Planned Future Updates](#planned-future-updates)
1313
- [Contributing](#contributing)
1414
- [Projects Using PyRep](#projects-using-pyrep)
15-
- [What Happened to V-REP?](#what-happened-to-v-rep?)
15+
- [What Happened to V-REP?](#what-happened-to-v-rep)
1616
- [Citation](#citation)
1717

1818

@@ -53,17 +53,6 @@ Try running one of the examples in the *examples/* folder.
5353

5454
_Although you can use CoppeliaSim on any platform, communication via PyRep is currently only supported on Linux._
5555

56-
#### Running Headless
57-
58-
If you plan to run on a headless machine, you will also need to run with a virtual framebuffer. E.g.
59-
60-
```bash
61-
sudo apt-get install xvfb
62-
xvfb-run python3 my_pyrep_app.py
63-
# or if you are using jupyter
64-
# xvfb-run jupyter notebook
65-
```
66-
6756
#### Troubleshooting
6857

6958
Below are some problems you may encounter during installation. If none of these solve your problem, please raise an issue.
@@ -73,6 +62,32 @@ Below are some problems you may encounter during installation. If none of these
7362
- error: command 'x86_64-linux-gnu-gcc' failed
7463
- You may be missing packages needed for building python extensions. Try: `sudo apt-get install python3-dev`, and then re-run the installation.
7564

65+
## Running Headless
66+
67+
You can run PyRep/CoppeliaSim headlessly with VirtualGL. VirtualGL is an open source toolkit that gives any Unix or Linux remote display software the ability to run OpenGL applications **with full 3D hardware acceleration**.
68+
First insure that you have the nVidia proprietary driver installed. I.e. you should get an output when running `nvidia-smi`. Now run the following commands:
69+
```bash
70+
sudo apt-get install xorg libxcb-randr0-dev libxrender-dev libxkbcommon-dev libxkbcommon-x11-0 libavcodec-dev libavformat-dev libswscale-dev
71+
sudo nvidia-xconfig -a --use-display-device=None --virtual=1280x1024
72+
# Install VirtualGL
73+
wget https://sourceforge.net/projects/virtualgl/files/2.5.2/virtualgl_2.5.2_amd64.deb/download -O virtualgl_2.5.2_amd64.deb
74+
sudo dpkg -i virtualgl*.deb
75+
rm virtualgl*.deb
76+
```
77+
You will now need to reboot, and then start the X server:
78+
```bash
79+
sudo reboot
80+
nohup sudo X &
81+
```
82+
Now we are good to go! To render the application with the first GPU, you can do the following:
83+
```bash
84+
export DISPLAY=:0.0
85+
python my_pyrep_app.py
86+
```
87+
To render with the second GPU, you will insetad set display as: `export DISPLAY=:0.1`, and so on.
88+
89+
**Acknowledgement**: Special thanks to Boyuan Chen (UC Berkeley) for bringing VirtualGL to my attention!
90+
7691
## Getting Started
7792

7893
1. First take a look at [Usage](#usage) and the examples in the *examples/* folder to see if PyRep might be able to accelerate your research.
@@ -227,11 +242,6 @@ If the robot you want is not currently supported, then why not add it in!
227242

228243
[Here is a tutorial for adding robots.](tutorials/adding_robots.md)
229244

230-
## Planned Future Updates
231-
232-
- Support for MuJoCo
233-
- Sim-to-Real support (e.g. domain randomization)
234-
235245
## Contributing
236246

237247
We want to make PyRep the best tool for rapid robot learning research. If you would like to get involved, then please [get in contact](https://www.doc.ic.ac.uk/~slj12/)!
@@ -251,6 +261,7 @@ If you use PyRep in your work, then get in contact and we can add you to the lis
251261
## Acknowledgements
252262

253263
- Georges Nomicos (Imperial College London) for the addition of mobile platforms.
264+
- Boyuan Chen (UC Berkeley) for bringing VirtualGL to my attention.
254265

255266
## What Happened to V-REP?
256267

0 commit comments

Comments
 (0)