diff --git a/Docs/CONTRIBUTING.md b/Docs/CONTRIBUTING.md
index 1f0c50781..bcd5e6bd7 100644
--- a/Docs/CONTRIBUTING.md
+++ b/Docs/CONTRIBUTING.md
@@ -63,6 +63,17 @@ please contact one of us (or send an email to carla.simulator@gmail.com).
[projectslink]: https://github.com/carla-simulator/carla/projects/1
+#### Where can I learn more about Unreal Engine?
+
+A basic introduction to C++ programming with UE4 can be found at Unreal's
+[C++ Programming Tutorials][ue4tutorials]. Then, if you want to dive into UE4
+C++ development there are few paying options online. The
+[Unreal C++ Course at Udemy][ue4course] it's pretty complete and there are
+usually offers that make it very affordable.
+
+[ue4tutorials]: https://docs.unrealengine.com/latest/INT/Programming/Tutorials/
+[ue4course]: https://www.udemy.com/unrealcourse/
+
#### What should I know before I get started?
Check out the ["CARLA Design"](carla_design.md) document to get an idea on the
@@ -71,6 +82,27 @@ the new feature. We are aware the developers documentation is still scarce,
please ask us in case of doubt, and of course don't hesitate to improve the
current documentation if you feel confident enough.
+#### Are there any examples in CARLA to see how Unreal programming works?
+
+You can find an example of how C++ classes work in UE4 in
+[`ASceneCaptureToDiskCamera`][capturelink] (and its parent class
+`ASceneCaptureCamera`). This class creates an actor that can be dropped into the
+scene. In the editor, type _"Scene Capture To Disk"_ in the Modes tab, and drag
+and drop the actor into the scene. Now searching for its detail tab you can find
+all the `UPROPERTY` members reflected. This shows the basic mechanism to use C++
+classes in Unreal Editor.
+
+For a more advanced example on how to extend C++ classes with blueprints, you
+can take a look at the _"VehicleSpawner"_ blueprint. It derives from the C++
+class `AVehicleSpawnerBase`. The C++ class decides where and when it spawns a
+vehicle, then calls the function `SpawnVehicle()`, which is implemented in the
+blueprint. The blueprint then decides model and color of the vehicle being
+spawned. Note that the blueprint can call back C++ functions, for instance for
+getting the random engine. This way there is a back-and-forth communication
+between C++ code and blueprints.
+
+[capturelink]: https://github.com/carla-simulator/carla/blob/master/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/SceneCaptureToDiskCamera.h
+
#### Coding standard
Please follow the current [coding standard](coding_standard.md) when submitting
diff --git a/Docs/cameras_and_sensors.md b/Docs/cameras_and_sensors.md
index 441cf46aa..08d141a4d 100644
--- a/Docs/cameras_and_sensors.md
+++ b/Docs/cameras_and_sensors.md
@@ -9,7 +9,7 @@ This document describes the details of the different cameras/sensors currently
available as well as the resulting images produced by them.
Although we plan to extend the sensor suite of CARLA in the near future, at the
-moment there are three different sensors available. These three sensors are
+moment there are only three different sensors available. These three sensors are
implemented as different post-processing effects applied to scene capture
cameras.
@@ -38,6 +38,8 @@ more human readable palette of colors. It can be found at
Scene final
-----------
+
+
The "scene final" camera provides a view of the scene after applying some
post-processing effects to create a more realistic feel. These are actually
stored on the Level, in an actor called [PostProcessVolume][postprolink] and not
@@ -55,6 +57,8 @@ in the Camera. We use the following post process effects:
Depth map
---------
+
+
The "depth map" camera provides an image with 24 bit floating precision point
codified in the 3 channels of the RGB color space. The order from less to more
significant bytes is R -> G -> B.
@@ -81,12 +85,14 @@ Our max render distance (far) is 1km.
Semantic segmentation
---------------------
+
+
The "semantic segmentation" camera classifies every object in the view by
displaying it in a different color according to the object class. E.g.,
pedestrians appear in a different color than vehicles.
-The server provides an image with the tag information encoded in the red
-channel. A pixel with a red value of x displays an object with tag x. The
+The server provides an image with the tag information **encoded in the red
+channel**. A pixel with a red value of x displays an object with tag x. The
following tags are currently available
Value | Tag
@@ -106,6 +112,13 @@ Value | Tag
12 | TrafficSigns
This is implemented by tagging every object in the scene before hand (either at
-begin play or on spawn). The objects are classified by their relative file
-system path in the project. E.g., every mesh stored in the "pedestrians" folder
-it's tagged as pedestrian.
+begin play or on spawn). The objects are classified by their relative file path
+in the project. E.g., every mesh stored in the
+_"Unreal/CarlaUE4/Content/Static/Pedestrians"_ folder it's tagged as pedestrian.
+
+!!! note
+ **Adding new tags**:
+ At the moment adding new tags is not very flexible and requires to modify
+ the C++ code. Add a new label to the `ECityObjectLabel` enum in "Tagger.h",
+ and its corresponding filepath check inside `GetLabelByFolderName()`
+ function in "Tagger.cpp".
diff --git a/Docs/carla_design.md b/Docs/carla_design.md
index b61701d36..a912c4911 100644
--- a/Docs/carla_design.md
+++ b/Docs/carla_design.md
@@ -12,6 +12,10 @@ CARLA is composed by the following modules
- Carla plugin for Unreal Engine: "Unreal/CarlaUE4/Plugins/Carla"
- CarlaServer: "Util/CarlaServer"
+!!! tip
+ Documentation for the C++ code can be generated by running
+ [Doxygen](http://www.doxygen.org) in the main folder of CARLA project.
+
Python client API
-----------------
diff --git a/Docs/carla_headless.md b/Docs/carla_headless.md
new file mode 100644
index 000000000..095ab2bd7
--- /dev/null
+++ b/Docs/carla_headless.md
@@ -0,0 +1,89 @@
+Running CARLA without Display and Selecting GPUs
+------
+
+
+This tutorial is designed for:
+- Remote server users that have several nvidia graphical cards and want to effectively use CARLA on all GPUs.
+- Desktop users who want to use the GPU that is not plugged on the screen for rendering CARLA.
+
+
+On this tutorial you will learn.
+- How to configure your server to have nvidia working on rendering without a display attached.
+- How to use VNC + VGL to simulate a display connected to any GPU you have in your machine.
+- And Finally, how to run CARLA in this environment
+
+This tutorial was tested in Ubuntu 16.04 and using NVIDIA 384.11 drivers.
+## Preliminaries
+
+A few things need to be working in your server before.
+ Latest NVIDIA Drivers, OpenGL, VirtualGL(VGL), TurboVNC 2.11, ,
+#### NVIDIA Drivers
+Download and install NVIDIA-drivers with typical tutorials
+http://www.nvidia.es/Download/index.aspx
+#### OpenGL
+Openg GL is necessary for Virtual GL. Normally OpenGL
+can be installed through apt.
+
+ sudo apt-get install freeglut3-dev mesa-utils
+#### VGL
+Follow this tutorial and install vgl:
+[Installing VGL](https://virtualgl.org/vgldoc/2_2_1/#hd004001)
+
+#### TurboVNC
+Follow the tutorial below to install TurboVNC 2.11:
+[Installing TurboVNC](https://cdn.rawgit.com/TurboVNC/turbovnc/2.1.1/doc/index.html#hd005001)
+
+WARNING: Take care on which VNC you install as it may not be compatible with Unreal. The one above was the only one that worked for me.
+#### Extra Packages
+These extra packages were necessary to make unreal to work.
+
+ sudo apt install x11-xserver-utils libxrandr-dev
+
+
+
+
+#### Configure your X
+
+You must generate a X compatible with your nvdia and compatible to run without display. For that, the following command worked:
+
+ sudo nvidia-xconfig -a --use-display-device=None --virtual=1280x1024
+
+
+
+## Emulating The Virtual Display
+
+
+Run your own Xorg. Here I use number 7, but it could be labeled with any free number.
+
+ sudo nohup Xorg :7 &
+
+Run an auxiliary remote VNC-Xserver. This will create a
+virtual display "8".
+
+ /opt/TurboVNC/bin/vncserver :8
+
+If everything is working fine the following command
+should run smoothly.
+
+ DISPLAY=:8 vglrun -d :7.0 glxinfo
+Note. This will run glxinfo on Xserver 7, device 0. This means you are selecting the GPU 0 on your machine. To run on other GPU, such as GPU 1 run:
+
+ DISPLAY=:8 vglrun -d :7.1 glxinfo
+
+#### Extra
+
+If you want disable the need of sudo when creating the 'nohup Xorg'
+go to the '/etc/X11/Xwrapper.config' file and change 'allowed_users=console' to 'allowed_users=anybody'
+
+It may be needed to stop all Xorg servers before running nohup Xorg.
+The command for that could change depending on your system. Generally for Ubuntu 16.04
+you should use:
+
+ sudo service lightdm stop
+
+
+## Running CARLA
+
+Now, finally, to run CARLA on a certain gpu_number placed in a certain $CARLA_PATH, run.
+
+ DISPLAY=:8 vglrun -d :7. $CARLA_PATH/CarlaUE4/Binaries/Linux/CarlaUE4
diff --git a/Docs/faq.md b/Docs/faq.md
index b87bd32d2..9ba884469 100644
--- a/Docs/faq.md
+++ b/Docs/faq.md
@@ -152,3 +152,52 @@ rebuild of all the project files with
It takes a long time but fixes the issue. Sometimes a reboot is also needed.
+
+
+
+
+ Fatal error: 'carla/carla_server.h' file not found.
+
+
+This indicates that the CarlaServer dependency failed to compile.
+
+Please follow the instructions at
+[How to build on Linux](http://carla.readthedocs.io/en/latest/how_to_build_on_linux/).
+
+Make sure that the Setup script does print _"Success!"_ at the end
+
+ $ ./Setup.sh
+ ...
+ ...
+ ****************
+ *** Success! ***
+ ****************
+
+Then check if CarlaServer compiles without errors running make
+
+ $ make
+
+It should end printing something like
+
+```
+[1/1] Install the project...
+-- Install configuration: "Release"
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/shared/libc++abi.so.1
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/shared/libc++abi.so.1.0
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/shared/libc++.so.1
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/shared/libc++.so.1.0
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/shared/libc++.so
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/shared/libc++abi.so
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libc++abi.a
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libboost_system.a
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libprotobuf.a
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/include/carla
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/include/carla/carla_server.h
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libcarlaserver.a
+-- Installing: Unreal/CarlaUE4/Plugins/Carla/CarlaServer/bin/test_carlaserver
+-- Set runtime path of "Unreal/CarlaUE4/Plugins/Carla/CarlaServer/bin/test_carlaserver" to ""
+```
+
+If so you can safely run Rebuild.sh.
+
+
diff --git a/Docs/how_to_build_on_linux.md b/Docs/how_to_build_on_linux.md
index 4358a0df2..2f6f2751c 100644
--- a/Docs/how_to_build_on_linux.md
+++ b/Docs/how_to_build_on_linux.md
@@ -20,13 +20,15 @@ change your default clang version to compile Unreal
Build Unreal Engine
-------------------
+!!! note
+ Unreal Engine repositories are set to private. In order to gain access you
+ need to add your GitHub username when you sign up at
+ [www.unrealengine.com](https://www.unrealengine.com).
+
Download and compile Unreal Engine 4.17. Here we will assume you install it at
"~/UnrealEngine_4.17", but you can install it anywhere, just replace the path
where necessary.
-Unreal Engine repositories are set to private. In order to gain access you need
-to add your GitHub username when you sign up at https://unrealengine.com.
-
$ git clone --depth=1 -b 4.17 https://github.com/EpicGames/UnrealEngine.git ~/UnrealEngine_4.17
$ cd ~/UnrealEngine_4.17
$ ./Setup.sh && ./GenerateProjectFiles.sh && make
diff --git a/Docs/img/capture_depth.png b/Docs/img/capture_depth.png
new file mode 100644
index 000000000..5157dd042
Binary files /dev/null and b/Docs/img/capture_depth.png differ
diff --git a/Docs/img/capture_scenefinal.png b/Docs/img/capture_scenefinal.png
new file mode 100644
index 000000000..033257df0
Binary files /dev/null and b/Docs/img/capture_scenefinal.png differ
diff --git a/Docs/img/capture_semseg.png b/Docs/img/capture_semseg.png
new file mode 100644
index 000000000..cf7d036fd
Binary files /dev/null and b/Docs/img/capture_semseg.png differ
diff --git a/Docs/index.md b/Docs/index.md
index 40491ec84..3a4224a5f 100644
--- a/Docs/index.md
+++ b/Docs/index.md
@@ -7,6 +7,7 @@ CARLA Documentation
* [CARLA settings](carla_settings.md)
* [Measurements](measurements.md)
* [Cameras and sensors](cameras_and_sensors.md)
+ * [CARLA without Display and Selecting GPUs](carla_headless.md)
* [Benchmark](benchmark.md)
* [F.A.Q.](faq.md)
diff --git a/Docs/issue_template.md b/Docs/issue_template.md
index 024be87e5..c9430fefa 100644
--- a/Docs/issue_template.md
+++ b/Docs/issue_template.md
@@ -6,4 +6,7 @@ If you are asking a question please make sure your question was not asked before
by searching among the existing issues. Also make sure you have read our
documentation and FAQ at carla.readthedocs.io.
+If you are reporting an issue, please provide the CARLA version number you are
+using and your Platform/OS.
+
-->
diff --git a/README.md b/README.md
index 0988cfaab..ef87480d8 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@ CARLA Simulator
===============
[](https://travis-ci.org/carla-simulator/carla)
+[](https://carla.readthedocs.io)
+[](https://waffle.io/carla-simulator/carla)
CARLA is an open-source simulator for autonomous driving research. CARLA has
been developed from the ground up to support development, training, and
diff --git a/mkdocs.yml b/mkdocs.yml
index 6144dc8ed..6860f7a8d 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -9,6 +9,7 @@ pages:
- 'CARLA Settings': 'carla_settings.md'
- 'Measurements': 'measurements.md'
- 'Cameras and sensors': 'cameras_and_sensors.md'
+ - 'CARLA without Display and Selecting GPUs': 'carla_headless.md'
- 'Benchmark': 'benchmark.md'
- 'F.A.Q.': 'faq.md'
- Building from source: