Merge branch 'master' into lidar

This commit is contained in:
nsubiron 2018-02-03 13:20:07 +01:00
commit b5b609e7e1
15 changed files with 218 additions and 9 deletions

View File

@ -48,6 +48,18 @@
},
"build_systems":
[
{
"name": "CARLA - Pylint",
"working_dir": "${project_path}",
"file_regex": "^\\[([^:]*):([0-9]+):?([0-9]+)?\\]:? (.*)$",
"shell_cmd": "pylint --disable=R,C --rcfile=PythonClient/.pylintrc PythonClient/carla PythonClient/*.py --msg-template='[{path}:{line:3d}:{column}]: {msg_id} {msg}'"
},
{
"name": "CARLA - CppCheck",
"working_dir": "${project_path}",
"file_regex": "^\\[([^:]*):([0-9]+):?([0-9]+)?\\]:? (.*)$",
"shell_cmd": "cppcheck . -iBuild -i.pb.cc --error-exitcode=0 --enable=warning --quiet"
},
{
"name": "CARLA - Rebuild script",
"working_dir": "${project_path}",

View File

@ -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

View File

@ -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
-----------
![SceneFinal](img/capture_scenefinal.png)<br>
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
---------
![Depth](img/capture_depth.png)
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
---------------------
![SemanticSegmentation](img/capture_semseg.png)
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".

View File

@ -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
-----------------

89
Docs/carla_headless.md Normal file
View File

@ -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: <br>
[Installing VGL](https://virtualgl.org/vgldoc/2_2_1/#hd004001)
#### TurboVNC
Follow the tutorial below to install TurboVNC 2.11:<br>
[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.<gpu_number> $CARLA_PATH/CarlaUE4/Binaries/Linux/CarlaUE4

View File

@ -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.
</details>
<!-- ======================================================================= -->
<details>
<summary><h5 style="display:inline">
Fatal error: 'carla/carla_server.h' file not found.
</h4></summary>
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.
</details>

View File

@ -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

BIN
Docs/img/capture_depth.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
Docs/img/capture_semseg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -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)

View File

@ -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.
-->

View File

@ -2,6 +2,8 @@ CARLA Simulator
===============
[![Build Status](https://travis-ci.org/carla-simulator/carla.svg?branch=master)](https://travis-ci.org/carla-simulator/carla)
[![Documentation](https://readthedocs.org/projects/docs/badge/?version=latest)](https://carla.readthedocs.io)
[![Waffle.io](https://badge.waffle.io/carla-simulator/carla.svg?columns=Next,In%20Progress,Review)](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

View File

@ -8,3 +8,4 @@
0.6.0: 1Gw8sw01hDEV4FtpHEZZwvS-6XN0jmaLT
0.7.0: 11PKC_lG7L80L1ZxiMlzV17utU45UcRnT
0.7.1: 1gf3YaFIjwr1EaK6qxq2V-a510Brt9Imq
Latest: 1Coa1iX19TKR5DMxPPQSWsT83l-Ize0Jk

View File

@ -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: