Merge branch 'dev' of github.com:carla-simulator/carla into ruben/jenkins_migration

This commit is contained in:
Ruben Abad 2024-01-25 16:17:47 +01:00
commit bf385474db
60 changed files with 739 additions and 291 deletions

View File

@ -1,3 +1,7 @@
## Latest Changes
* Prevent from segfault on failing SignalReference identification when loading OpenDrive files
* Added vehicle doors to the recorder
## CARLA 0.9.15
* Added Digital Twins feature version 0.1. Now you can create your own map based on OpenStreetMaps

View File

@ -1,52 +1,49 @@
# Carla Multi-GPU feature
Multi-GPU in carla means that the user can start several servers (called secondary servers) that will do render work for the main server (called primary server) for different sensors.
Multi-GPU in carla means that the user can start several servers (called secondary servers) that will do render work for the main server (called primary server) using a dedicated GPU from the system. The primary server will distribute the sensors, that are created by the user, to the different secondary servers available.
![Multi-GPU example with 2 secondary servers](img/multigpu-example.png)
We need to start the primary server (usually with a flag to avoid using any GPU). This server will process all physics and synchronize the scene data to the others secondary servers. Then we can start any secondary server as we want (usually one per dedicated GPU in the system), using the parameters we will describe further. After this, the client can connect (always to the primary server) and proceed as usual.
All the system is transparent to the user, who don't need to know from which server comes the sensor data, he just receives the data directly from a secondary server.
## Primary server
The steps are: first, start the primary server without any render capability. The parameters we can use are:
The steps are, first, start the primary server without any render capability.
The parameters we can use are:
* `-nullrhi`: disables any render capabilities (GPU free)
* `-carla-primary-port`: TCP port used to listen for secondary servers (default 2002)
* `-nullrhi`
* `-carla-primary-port`
For example
Run the following from the command line:
**./CarlaUE4.sh --nullrhi**
```sh
./CarlaUE4.sh -nullrhi
```
The primary server will use by default the port 2002 to listen for secondary servers. If you need to listen on another port, then you can change it with the flag
The primary server will use, by default, the port 2002 to listen for secondary servers. If you need to listen on another port, then you can change it with the port flag:
```sh
./CarlaUE4.sh -nullrhi -carla-primary-port=3002
```
**./CarlaUE4.sh --nullrhi -carla-primary-port=3002**
## Secondary servers
We may then start as many servers as we need, but the ideal is to have as many secondary servers as the number of GPUs installed in the computer. Through parameters we need to specify the GPU we want the server use and also the host/port where the primary server is listening, with the flags:
Then we need to start as many servers as we want, but the ideal is to have as many secondary servers as GPU. Through parameters we need to specify the GPU we want the server use and also the host/port where the primary server is listenning, with the flags:
* `-carla-rpc-port`: TCP port to accept client connections (for secondary servers it is not needed, but the port needs to be free)
* `-carla-primary-host`: IP of the primary server to connect
* `-carla-primary-port`: TCP port of the primary server to connect
* `-ini:[/Script/Engine.RendererSettings]:r.GraphicsAdapter`: tells which GPU device to use for this secondary server
* `-carla-rpc-port`
* `-carla-primary-host`
* `-carla-primary-port`
* `-ini:[/Script/Engine.RendererSettings]:r.GraphicsAdapter`
For example, if the primary server is executing in the same computer than the secondary servers and with the default port, we can use this:
For example, if the primary server is executing in the same computer than the secondary servers and with the default port, we can use this command:
```sh
./CarlaUE4.sh -carla-rpc-port=3000 -carla-primary-host=127.0.0.1 -ini:[/Script/Engine.RendererSettings]:r.GraphicsAdapter=0
```
**./CarlaUE4.sh -carla-rpc-port=3000 -carla-primary-host=127.0.0.1 -ini:[/Script/Engine.RendererSettings]:r.GraphicsAdapter=0**
Here, the secondary server will use port 3000 as the RPC server to avoid conflicts with other ports (but it will never be used), and will connect to the primary server located at IP 127.0.0.1 (localhost) in the default port (2002), and also this server will use the GPU device 0.
If we want to start another secondary server using another GPU, we could use the following command:
If we want to start another secondary server in the same machine using another GPU, we could use this command:
```sh
./CarlaUE4.sh -carla-rpc-port=4000 -carla-primary-host=127.0.0.1 -carla-primary-port=2002 -ini:[/Script/Engine.RendererSettings]:r.GraphicsAdapter=1
```
**./CarlaUE4.sh -carla-rpc-port=4000 -carla-primary-host=127.0.0.1 -carla-primary-port=2002 -ini:[/Script/Engine.RendererSettings]:r.GraphicsAdapter=1**
This secondary server will use port 4000 as the RPC server to avoid conflicts with other ports and will connect to the primary server located at IP 127.0.0.1 in port 2002, and also this server will use the GPU device 1.
This secondary server will use port 4000 as the RPC server to avoid conflicts with other ports and will connect to the primary server located at IP 127.0.0.1 in the port 2002, and also this server will use the GPU device 1.
## Pipeline
## Synchronous mode
After the first secondary server connects to the primary server, the system is setup to synchronous mode automatically, with the default values of 1/20 delta seconds.
After the first secondary server connects to the primary server, it will set up the synchronous mode automatically, with the default values of 1/20 delta seconds.

View File

@ -59,7 +59,7 @@ As a reminder, the feature is only available for the Linux build so far.
### Dependencies
There are additional prerequisites required for building RSS and its dependencies. Take a look at the [official documentation](https://intel.github.io/ad-rss-lib/BUILDING)) to know more about this.
There are additional prerequisites required for building RSS and its dependencies. Take a look at the [official documentation](https://intel.github.io/ad-rss-lib/BUILDING) to know more about this.
Dependencies provided by Ubunutu (>= 16.04).
```sh

View File

@ -48,6 +48,16 @@ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add
To avoid compatibility issues between Unreal Engine and the CARLA dependencies, use the same compiler version and C++ runtime library to compile everything. The CARLA team uses clang-8 (or clang-10 in Ubuntu 20.04) and LLVM's libc++. Change the default clang version to compile Unreal Engine and the CARLA dependencies.
__Ubuntu 22.04__.
```sh
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu focal main universe"
sudo apt-get update
sudo apt-get install build-essential clang-10 lld-10 g++-7 cmake ninja-build libvulkan1 python python3 python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git git-lfs
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-10/bin/clang++ 180 &&
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-10/bin/clang 180 &&
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 180
```
__Ubuntu 20.04__.
```sh
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main"

View File

@ -69,22 +69,22 @@ Releases are listed in __Development__ in the CARLA repository. There is also a
</p>
<p>
<a href="http://carla-releases.s3.amazonaws.com/Linux/Dev/CARLA_Latest.tar.gz" target="_blank" class="btn btn-neutral" title="Go to the linux nightly CARLA build">
<a href="https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/Dev/CARLA_Latest.tar.gz" target="_blank" class="btn btn-neutral" title="Go to the linux nightly CARLA build">
<span class="icon fa-cloud-download"></span> Get the linux nightly build</a>
</p>
<p>
<a href="http://carla-releases.s3.amazonaws.com/Linux/Dev/AdditionalMaps_Latest.tar.gz" target="_blank" class="btn btn-neutral" title="Go to the linux nightly AdditionalMaps build">
<a href="https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/Dev/AdditionalMaps_Latest.tar.gz" target="_blank" class="btn btn-neutral" title="Go to the linux nightly AdditionalMaps build">
<span class="icon fa-cloud-download"></span> Get the linux nightly build additional maps</a>
</p>
<p>
<a href="http://carla-releases.s3.amazonaws.com/Windows/Dev/CARLA_Latest.zip" target="_blank" class="btn btn-neutral" title="Go to the windows nightly CARLA build">
<a href="https://carla-releases.s3.us-east-005.backblazeb2.com/Windows/Dev/CARLA_Latest.zip" target="_blank" class="btn btn-neutral" title="Go to the windows nightly CARLA build">
<span class="icon fa-cloud-download"></span> Get the windows nightly build</a>
</p>
<p>
<a href="http://carla-releases.s3.amazonaws.com/Windows/Dev/AdditionalMaps_Latest.zip" target="_blank" class="btn btn-neutral" title="Go to the windows nightly AdditionalMaps build">
<a href="https://carla-releases.s3.us-east-005.backblazeb2.com/Windows/Dev/AdditionalMaps_Latest.zip" target="_blank" class="btn btn-neutral" title="Go to the windows nightly AdditionalMaps build">
<span class="icon fa-cloud-download"></span> Get the windows nightly build additional maps</a>
</p>

View File

@ -40,7 +40,7 @@ In this section you will find details of system requirements, minor and major so
#### Minor installations
* [__CMake__](https://cmake.org/download/) generates standard build files from simple configuration files.
* [__CMake__](https://cmake.org/download/) generates standard build files from simple configuration files. __We recommend you use version 3.15+__.
* [__Git__](https://git-scm.com/downloads) is a version control system to manage CARLA repositories.
* [__Make__](http://gnuwin32.sourceforge.net/packages/make.htm) generates the executables. It is necessary to use __Make version 3.81__, otherwise the build may fail. If you have multiple versions of Make installed, check that you are using version 3.81 in your PATH when building CARLA. You can check your default version of Make by running `make --version`.
* [__7Zip__](https://www.7-zip.org/) is a file compression software. This is required for automatic decompression of asset files and prevents errors during build time due to large files being extracted incorrectly or partially.

View File

@ -10,10 +10,10 @@
> branch. It contains the very latest fixes and features that will be part of the
> next release, but also some experimental changes. Use at your own risk!
- [CARLA Nightly Build (Linux)](https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/Dev/CARLA_Latest.tar.gz)
- [AdditionalMaps Nightly Build (Linux)](https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/Dev/AdditionalMaps_Latest.tar.gz)
- [CARLA Nightly Build (Windows)](https://carla-releases.s3.eu-west-3.amazonaws.com/Windows/Dev/CARLA_Latest.zip)
- [AdditionalMaps Nightly Build (Windows)](https://carla-releases.s3.eu-west-3.amazonaws.com/Windows/Dev/AdditionalMaps_Latest.zip)
- [CARLA Nightly Build (Linux)](https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/Dev/CARLA_Latest.tar.gz)
- [AdditionalMaps Nightly Build (Linux)](https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/Dev/AdditionalMaps_Latest.tar.gz)
- [CARLA Nightly Build (Windows)](https://carla-releases.s3.us-east-005.backblazeb2.com/Windows/Dev/CARLA_Latest.zip)
- [AdditionalMaps Nightly Build (Windows)](https://carla-releases.s3.us-east-005.backblazeb2.com/Windows/Dev/AdditionalMaps_Latest.zip)
### Versions 0.9.x

66
Docs/ecosys_simready.md Normal file
View File

@ -0,0 +1,66 @@
# SimReady content with NVIDIA Omniverse
NVIDIA's [__SimReady__](https://developer.nvidia.com/omniverse/simready-assets) specification supports the preparation of __3D content that is purpose-built for simulation__ to help streamline content creation pipelines for simulating 3D virtual environments for machine learning purposes in robotics and autonomous driving. Through the Omniverse Unreal Engine plugin now integrated into CARLA users can import, in just a few clicks, SimReady content such as vehicles already configured with working lights, doors and wheels and props ready for use instantaneously to decorate CARLA maps. CARLA's Omniverse integration boasts to significantly accelerate your environment building pipeline and opens the door to a whole world of applications in the [__Omniverse ecosystem__](https://www.nvidia.com/en-us/omniverse/ecosystem/).
!!! note
The Omniverse Unreal Engine Connector is currently only available in Windows.
Follow these steps to start using Omniverse and using SimReady content in CARLA:
Before anything else, you should first [install NVIDIA Omniverse](https://docs.omniverse.nvidia.com/install-guide/latest/index.html)
### 1. Installing the Unreal Engine Omniverse Connector
1. Launch the NVIDIA Omniverse Launcher
2. Navigate to the **Exchange** tab
3. Locate the __Epic Games Unreal Engine 4.26 Omniverse Connector__
4. Ensure the install version is **Release 105.1.578**
5. Click *Install*
6. Omniverse will not be able to find Unreal Engine, click **OK**.
7. It will prompt you to find your Unreal Engine installation, select this path: {UE4_ROOT}\Engine\Plugins\Marketplace\NVIDIA
8. Press *Install*.
### 2. Set Up Local Omniverse Server
1. Open NVIDIA Omniverse with the launcher
2. Navigate to the *Nucleus* tab
3. Click on *Create Local Server*
4. Create administrator details
5. Select the folder icon next to *Local Nucleus Service*, this should open your localhost server in your web browser
### 3. Connecting to CARLA Simulator
1. Launch CARLA using `make launch` from the command line the CARLA root folder
2. If an existing server is active and you want to restart the setup, click on *Clean Local Assets* (optional)
3. Select the *Omniverse* icon and click on *Add Server*
4. Name the server and click *Add to Content Browser*
5. A login form should launch in your browser, click *Create Account*
6. Create administrator details
7. Omniverse folders should now be visible in your Content/Omniverse folder in the Unreal Engine content browser
8. Go to your web browser again
9. Click on *Connect to a Server*
10. Authenticate using the server name you set for the CARLA server
11. Use the administrator details that you set for the CARLA server
12. The server folders should now show up in your browser
### 4. Importing a SimReady asset
1. Navigate to the Projects folder within the browser navigator
2. Right click, and select *Upload Folder*
3. Select your SimReady folders
4. Upload the files
### 5. Using the Omniverse Connector to Load the Vehicle to CARLA
1. Open the CARLA project in Unreal Engine
2. Navigate to `CarlaTools/Content/USDImporter`
3. Right click on *UW_USDVehicleImporterEditorWidget*
4. Select *Run Editor Utility Widget*
5. Find the Vehicle within your Omniverse browser navigator
6. Copy the path (should look something like: omniverse://localhost/Projects/SimReadyUSD.../vehicle.usd)
7. Paste it inside the Omiverse URL tab within the Widget
8. Select *Import Asset*
9. You should see the vehicle show up in the engine within the folder that you specified in the *Import destination* field
10. Open another map scene (it may have opened a new scene with the imported data) a *Save Content* prompt should appear. Uncheck the *Untitled* scene, and click on *Save selected* to save new content
11. The vehicle is now usable within CARLA and will be available through the Python API

56
Docs/ecosys_synkrotron.md Normal file
View File

@ -0,0 +1,56 @@
<img src="../img/synkrotron.jpg" alt= “synkrotron_logo” style="display: block; margin-left: auto; margin-right: auto; width: 70%;">
# Synkrotron simulation solutions
Synkrotron provides advanced solutions for autonomous driving simulation built on top of CARLA. Synkrotron's product suite OASIS supports a broad range of applications including scenario generation, sensor modelling, traffic simulation and data management. Based on a flexible architecture OASIS can be deployed on the cloud at scale, or in a developer's local environment for prototyping.
---
<img src="../img/oasis_logo.png" alt= “synkrotron_logo” style="display: block; margin-left: auto; margin-right: auto; width: 70%;">
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;">
<iframe src="https://www.youtube.com/embed/YRI67aar3S0" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
</div>
<br>
## [__OASIS simulation platform__](https://www.synkrotron.ai/sim.html)
OASIS Sim is a fully-fledged, scalable simulation platform with CARLA at its core. It supports the complete life-cycle of AD simulation:
- scenario import & editing with a graphical user interface
- sensor configuration
- distributed task management
- diagnosis through rich simulation data and logs
Both cloud and local deployment are available through containerized packaging. Comprehensive APIs are exposed for integration with DevOps too. You can [request a trial](https://synkrotron.ai/contact.html) from Synkrotron.
## [__OASIS data platform__](https://www.synkrotron.ai/data.html)
OASIS Data is a platform for managing the high volume of data flowing through the autonomous driving R&D pipeline. Data-driven development of AD systems are made possible with OASIS Data via the following functionalities:
* data acquisition and anonymization
* multi-stage filtering based on structured data (CAN bus signals, active-safety triggering, etc.) and unstructured data (sensor readings)
* information mapping and environment reconstruction with LIDAR and/or vision-only strategy
* auto-labeling of data with pre-trained perception models
* scenario tagging and reconstruction with OpenX format output
The processed data from the platform supports downstream applications such as scenario re-simulation with Oasis Sim, retraining of perception models with new labeled data and operational fleet management.
## __Synkrotron Tools and Services__
In addition to the complete solutions introduced above, Synkrotron also offers the following developer tools and services to facilitate AD simulation development.
| Product/service | Description |
| -----------| ------ |
| __Sensor model__: fish-eye camera | Fisheye camera with configurable distortion parameters |
| __Sensor model__: LIDAR | Advanced lidar model with configurable shutter mode and material reflections |
| __SOTIF__ scenario generation tool | Given the ODD description from user, identify important scenario elements and generate critical scenarios to help uncover unknown unsafe domains of the autonomous driving systems, achieved by using an ontology-based method combined with iterative optimizations against evaluations in Carla |
| __Map creation__ | Given lidar scan data (can also provide road-test data collection equipments & service), create HD maps for the user and output OpenDrive files which can be loaded in Carla for PnC tests or logsim |
| __Sensor model__: physics models for camera | Supports CMOS simulations and outputs 12bit raw sensor data, for customers who develop ISP algorithms or who has ECUs that need raw data from camera instead of RGBs |
| __Static scene creation__ | Combined HD mapping, 3D asset development and procedural modeling to create 3D static scenes/digital twins for users |
| __Dynamic scenario reconstruction__ | On top of static scenes, also detect and track various traffic participants from user's road-test data; the recovered trajectories/behaviors are turned into OpenScenario 1.0 files and can be re-simulated in CARLA |

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
Docs/img/oasis_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
Docs/img/synkrotron.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -5,7 +5,7 @@
Town 13 is a Large Map with dimensions of 10x10 km<sup>2</sup>. It is divided into 36 tiles, most with dimensions of 2x2 km<sup>2</sup> (some edge tiles are smaller). There are numerous contrasting regions to the city including urban, residential and rural areas, along with a large highway system surrounding the city with a ringroad. The architectural styles reflect those of many medium to large cities across North America.
!!! note
Town 13 has been designed as an adjunct to Town 13, such that they can serve as a __train-test pair__. The towns share many common features, but also many differences in the styles of buildings, road textures, pavement textures and also vegetation. Using one of the pair to produce training data and then using the other for testing is ideal for exposing overfitting issues that might be arising while developing an AD stack.
Town 13 has been designed as an adjunct to Town 12, such that they can serve as a __train-test pair__. The towns share many common features, but also many differences in the styles of buildings, road textures, pavement textures and also vegetation. Using one of the pair to produce training data and then using the other for testing is ideal for exposing overfitting issues that might be arising while developing an AD stack.
## Navigator

View File

@ -13,7 +13,7 @@ This tutorial details how to add a new vehicle to CARLA. There are two sections,
---
## Add a 4 wheeled vehicle
Vehicles added to CARLA need to use a __common base skeleton__ which is found [__here__](https://carla-assets.s3.eu-west-3.amazonaws.com/fbx/VehicleSkeleton.rar). This link will download a folder called `VehicleSkeleton.rar` which contains the base skeleton in two different `.fbx` formats, one in ASCII and the other in binary. The format you use will depend on your 3D modeling software requirements.
Vehicles added to CARLA need to use a __common base skeleton__ which is found [__here__](https://carla-assets.s3.us-east-005.backblazeb2.com/fbx/VehicleSkeleton.rar). This link will download a folder called `VehicleSkeleton.rar` which contains the base skeleton in two different `.fbx` formats, one in ASCII and the other in binary. The format you use will depend on your 3D modeling software requirements.
__The positions of the skeleton bones can be changed but any other manipulation such as rotation, addition of new bones, or changing the current hierarchy will lead to errors. __
@ -52,7 +52,7 @@ We recommend that you divide the vehicle into the following materials:
- __Lights__: Headlights, indicator lights, etc.
- __LightGlass_Ext__: A layer of glass that allows visibility from the outside to the inside of the light.
- __LightGlass_Int__: A layer of glass that allows visibility from the inside to the outside of the light.
- __LicensePlate__: A rectangular plane of 29x12 cm. You can use the CARLA provided `.fbx` for best results, download it [here](https://carla-assets.s3.eu-west-3.amazonaws.com/fbx/LicensePlate.rar). The texture will be assigned automatically in Unreal Engine.
- __LicensePlate__: A rectangular plane of 29x12 cm. You can use the CARLA provided `.fbx` for best results, download it [here](https://carla-assets.s3.us-east-005.backblazeb2.com/fbx/LicensePlate.rar). The texture will be assigned automatically in Unreal Engine.
- __Interior__: Any other details that don't fit in the above sections can go into _Interior_.
Materials should be named using the format `M_CarPart_CarName`, e.g., `M_Bodywork_Mustang`.
@ -278,7 +278,7 @@ All other parameters such as engine, transmission, steering curve, are the same
---
## Add a 2 wheeled vehicle
Adding 2 wheeled vehicles is similar to adding a 4 wheeled one but due to the complexity of the animation you'll need to set up aditional bones to guide the driver's animation. [Here](https://carla-assets.s3.eu-west-3.amazonaws.com/fbx/BikeSkeleton.rar) is the link to the reference skeleton for 2 wheeled vehicles.
Adding 2 wheeled vehicles is similar to adding a 4 wheeled one but due to the complexity of the animation you'll need to set up aditional bones to guide the driver's animation. [Here](https://carla-assets.s3.us-east-005.backblazeb2.com/fbx/BikeSkeleton.rar) is the link to the reference skeleton for 2 wheeled vehicles.
As with the 4 wheeled vehicles, orient the model towards positive "x" and every bone axis towards
positive x and with the z axis facing upwards.

View File

@ -23,9 +23,9 @@ In CARLA, there is a set of master materials that are used as templates for the
* __M_CarInterior_Master__ — Material applied to the inside of the car.
* __M_CarLightsGlass_Master__ — Material applied to the glass covering car lights.
* __M_CarWindows_Master__ — Material applied to the windows.
* __M_CarLicensePlate_Master__ — Material applied to the license plate.
* __M_CarVehicleLights_Master__ — Material applied to the car lights as an emissive texure.
* __M_CarVehicleLigthsSirens_Master__ — Material applied to the sirens, if applicable.
* __M_LicensePlate_Master__ — Material applied to the license plate.
* __M_VehicleLights_Master__ — Material applied to the car lights as an emissive texure.
* __M_VehicleLights_Sirens_Master__ — Material applied to the sirens, if applicable.
---
## Customize car materials
@ -142,7 +142,7 @@ Similarly to car materials, a building material can be greatly changed if desire
* `Color` — Tint to be applied based on the white area on the __Diffuse__ `Alpha` texture.
* `Emissive Texture` — Enable the usage of an __Emissive__ texture.
* `EmissiveColor` — Tint to be applied based on the white area on the __ORME__ `Emissive mask` texture.
* `Emissive atenuance` — Factor that divides the intensity stated in __BP_Lights__ to obtain proper emissive values.
* `Emissive attenuance` — Factor that divides the intensity stated in __BP_Lights__ to obtain proper emissive values.
* `RoughnessCorrection` — Changes the intensity of the roughness map.
* `MetallicCorrection` — Changes the intensity of the metallic map.
* `NormalFlatness` — Changes the intensity of the normal map.

View File

@ -67,7 +67,7 @@ __4.3__ Press `Compile` in the toolbar above and save the changes.
## Physics colliders
!!! Important
This tutorial is based on a [contribution](https://bitbucket.org/yankagan/carla-content/wiki/Home) made by __[yankagan](https://github.com/yankagan)__! The contributor also wants to aknowledge __Francisco E__ for the tutorial on [how to import custom collisions in UE](https://www.youtube.com/watch?v=SEH4f0HrCDM).
This tutorial is based on a [contribution](https://bitbucket.org/yankagan/carla-content/wiki/Home) made by __[yankagan](https://github.com/yankagan)__! The contributor also wants to acknowledge __Francisco E__ for the tutorial on [how to import custom collisions in UE](https://www.youtube.com/watch?v=SEH4f0HrCDM).
[This video](https://www.youtube.com/watch?v=CXK2M2cNQ4Y) shows the results achieved after following this tutorial.

View File

@ -25,7 +25,7 @@ This page shows you how to generate a `.sim` file, explains how vehicle dimensio
__For Ubuntu__:
1. Download the plugin [here](https://www.carsim.com/users/unreal_plugin/unreal_plugin_2020_0.php).
2. Replace the file `CarSim.Build.cs` with the file found [here](https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/CarSim.Build.cs) in order to use the correct solver for Ubuntu.
2. Replace the file `CarSim.Build.cs` with the file found [here](https://carla-assets.s3.us-east-005.backblazeb2.com/Backup/CarSim.Build.cs) in order to use the correct solver for Ubuntu.
3. This step can be skipped if you are using the packaged version of CARLA. The packaged version has already been compiled using this flag but if you are building CARLA from source then you will need to compile the server with the `--carsim` flag.

View File

@ -147,7 +147,7 @@ def build_projection_matrix(w, h, fov):
## Build the skeleton
Now we can put the moving parts together. First, gather the bone coordinates from the simulation using `pedestrian.get_bones()` and then put together the skeleton and project it onto the 2D imaging plane of the camera sensor. The bones are joined into the complete skeleton using the pairs defined in __skeleton.txt__ that can be downloaded [__here__](https://carla-assets.s3.eu-west-3.amazonaws.com/fbx/skeleton.txt).
Now we can put the moving parts together. First, gather the bone coordinates from the simulation using `pedestrian.get_bones()` and then put together the skeleton and project it onto the 2D imaging plane of the camera sensor. The bones are joined into the complete skeleton using the pairs defined in __skeleton.txt__ that can be downloaded [__here__](https://carla-assets.s3.us-east-005.backblazeb2.com/fbx/skeleton.txt).
We need a function to iterate through the bone pairs defined in __skeleton.txt__ and join the bone coordinates into lines that can be overlayed onto a camera sensor image.

View File

@ -568,7 +568,7 @@ The script places the sensor on the hood of the car, and rotated a bit upwards.
The callback is a bit more complex this time, showing more of its capabilities. It will draw the points captured by the radar on the fly. The points will be colored depending on their velocity regarding the ego vehicle.
* __Blue__ for points approaching the vehicle.
* __Read__ for points moving away from it.
* __Red__ for points moving away from it.
* __White__ for points static regarding the ego vehicle.
```py

View File

@ -8,7 +8,7 @@ Firstly, we need to load the Unreal Editor and load a CARLA map, follow the inst
![select_building](../img/tuto_G_texture_streaming/building_selected.png)
We have selected __BP_Apartment04_v5_Opt__ for texture manipulation, the name can be seen in the World Outliner panel. __Make sure to hover over the name in the World Outliner and use the name defined in the tooltip__. The the internal name may differ from the title displayed in the list. In this case, the internal name is actually __BP_Apartment04_v5_Opt_2__.
We have selected __BP_Apartment04_v05_Opt__ for texture manipulation, the name can be seen in the World Outliner panel. __Make sure to hover over the name in the World Outliner and use the name defined in the tooltip__. The the internal name may differ from the title displayed in the list. In this case, the internal name is actually __BP_Apartment04_v05_Opt_2__.
![tooltip](../img/tuto_G_texture_streaming/tooltip.png)

View File

@ -403,7 +403,7 @@ Navigate to the vegetation folder in the CARLA content library: `Carla > Static
A useful tool for trees and vegetation is the [__Unreal Engine foliage tool__](https://docs.unrealengine.com/4.27/en-US/BuildingWorlds/Foliage/). Activate the tool by selecting the `mode` from the mode dropdown in the toolbar.
![foliage_tool](img/tuto_content_authoring_maps/select_foliage_tool.png)
![foliage_tool](img/tuto_content_authoring_maps/select_foliage_tool.gif)
Drag your desired foliage item into the box labeled `+ Drop Foliage Here`. Set an appropriate density in the density field, then paint into the map with your foliage item.

View File

@ -53,7 +53,7 @@ For ease and consistency we recommend that you divide the vehicle into the follo
- __Lights__: Headlights, indicator lights, etc.
- __LightGlass_Ext__: A layer of glass that allows visibility from the outside to the inside of the light.
- __LightGlass_Int__: A layer of glass that allows visibility from the inside to the outside of the light.
- __LicensePlate__: A rectangular plane of 29x12 cm. You can use the CARLA provided `.fbx` for best results, download it [here](https://carla-assets.s3.eu-west-3.amazonaws.com/fbx/LicensePlate.rar). The texture will be assigned automatically in Unreal Engine.
- __LicensePlate__: A rectangular plane of 29x12 cm. You can use the CARLA provided `.fbx` for best results, download it [here](https://carla-assets.s3.us-east-005.backblazeb2.com/fbx/LicensePlate.rar). The texture will be assigned automatically in Unreal Engine.
- __Interior__: Any other details that don't fit in the above sections can go into _Interior_.
Materials should be named using the format `M_CarPart_CarName`, e.g, `M_Bodywork_Mustang`.

View File

@ -6,40 +6,40 @@ Here you will find the multitude of tutorials available to help you understand h
### CARLA features
[__Retrieve simulation data__](tuto_G_retrieve_data.md) — A step by step guide to properly gather data using the recorder.
[__Traffic manager__](tuto_G_traffic_manager.md) — How to use traffic manager to guide traffic around your town.
[__Texture streaming__](tuto_G_texture_streaming.md) — Modify textures of map objects in real time to add variation.
[__Instance segmentation camera__](tuto_G_instance_segmentation_sensor.md) — Use an instance segmentation camera to distinguish objects of the same class.
[__Bounding boxes__](tuto_G_bounding_boxes.md) — Project bounding boxes from CARLA objects into the camera.
[__Pedestrian bones__](tuto_G_pedestrian_bones.md) — Project pedestrian skeleton into camera plane.
[__Control walker skeletons__](tuto_G_control_walker_skeletons.md) — Animate walkers using skeletons.
* [__Retrieve simulation data__](tuto_G_retrieve_data.md) — A step by step guide to properly gather data using the recorder.
* [__Traffic manager__](tuto_G_traffic_manager.md) — How to use traffic manager to guide traffic around your town.
* [__Texture streaming__](tuto_G_texture_streaming.md) — Modify textures of map objects in real time to add variation.
* [__Instance segmentation camera__](tuto_G_instance_segmentation_sensor.md) — Use an instance segmentation camera to distinguish objects of the same class.
* [__Bounding boxes__](tuto_G_bounding_boxes.md) — Project bounding boxes from CARLA objects into the camera.
* [__Pedestrian bones__](tuto_G_pedestrian_bones.md) — Project pedestrian skeleton into camera plane.
* [__Control walker skeletons__](tuto_G_control_walker_skeletons.md) — Animate walkers using skeletons.
### Building and integration
[__Build Unreal Engine and CARLA in Docker__](build_docker_unreal.md) — Build Unreal Engine and CARLA in Docker.
[__CarSim Integration__](tuto_G_carsim_integration.md) — Tutorial on how to run a simulation using the CarSim vehicle dynamics engine.
[__RLlib Integration__](tuto_G_rllib_integration.md) — Find out how to run your own experiment using the RLlib library.
[__Chrono Integration__](tuto_G_chrono.md) — Use the Chrono integration to simulation physics.
[__PyGame control__](tuto_G_pygame.md) — Use PyGame to display the output of camera sensors.
* [__Build Unreal Engine and CARLA in Docker__](build_docker_unreal.md) — Build Unreal Engine and CARLA in Docker.
* [__CarSim Integration__](tuto_G_carsim_integration.md) — Tutorial on how to run a simulation using the CarSim vehicle dynamics engine.
* [__RLlib Integration__](tuto_G_rllib_integration.md) — Find out how to run your own experiment using the RLlib library.
* [__Chrono Integration__](tuto_G_chrono.md) — Use the Chrono integration to simulation physics.
* [__PyGame control__](tuto_G_pygame.md) — Use PyGame to display the output of camera sensors.
## Assets and maps
[__Generate maps with OpenStreetMap__](tuto_G_openstreetmap.md) — Use OpenStreetMap to generate maps for use in simulations.
[__Add a new vehicle__](tuto_A_add_vehicle.md) — Prepare a vehicle to be used in CARLA.
[__Add new props__](tuto_A_add_props.md) — Import additional props into CARLA.
[__Create standalone packages__](tuto_A_create_standalone.md) — Generate and handle standalone packages for assets.
[__Material customization__](tuto_A_material_customization.md) — Edit vehicle and building materials.
* [__Generate maps with OpenStreetMap__](tuto_G_openstreetmap.md) — Use OpenStreetMap to generate maps for use in simulations.
* [__Add a new vehicle__](tuto_A_add_vehicle.md) — Prepare a vehicle to be used in CARLA.
* [__Add new props__](tuto_A_add_props.md) — Import additional props into CARLA.
* [__Create standalone packages__](tuto_A_create_standalone.md) — Generate and handle standalone packages for assets.
* [__Material customization__](tuto_A_material_customization.md) — Edit vehicle and building materials.
## Developers
[__How to upgrade content__](tuto_D_contribute_assets.md) — Add new content to CARLA.
[__Create a sensor__](tuto_D_create_sensor.md) — Develop a new sensor to be used in CARLA.
[__Create semantic tags__](tuto_D_create_semantic_tags.md) — Define customized tags for semantic segmentation.
[__Customize vehicle suspension__](tuto_D_customize_vehicle_suspension.md) — Modify the suspension system of a vehicle.
[__Generate detailed colliders__](tuto_D_generate_colliders.md) — Create detailed colliders for vehicles.
[__Make a release__](tuto_D_make_release.md) — How to make a release of CARLA
* [__How to upgrade content__](tuto_D_contribute_assets.md) — Add new content to CARLA.
* [__Create a sensor__](tuto_D_create_sensor.md) — Develop a new sensor to be used in CARLA.
* [__Create semantic tags__](tuto_D_create_semantic_tags.md) — Define customized tags for semantic segmentation.
* [__Customize vehicle suspension__](tuto_D_customize_vehicle_suspension.md) — Modify the suspension system of a vehicle.
* [__Generate detailed colliders__](tuto_D_generate_colliders.md) — Create detailed colliders for vehicles.
* [__Make a release__](tuto_D_make_release.md) — How to make a release of CARLA
## Video tutorials
[__Fundamentals__](https://www.youtube.com/watch?v=pONr1R1dy88) — Learn the fundamental concepts of CARLA and start your first script. [__CODE__](https://carla-releases.s3.eu-west-3.amazonaws.com/Docs/Fundamentals.ipynb)
[__An in depth look at CARLA's sensors__](https://www.youtube.com/watch?v=om8klsBj4rc) — An in depth look at CARLA's sensors and how to use them. [__CODE__](https://carla-releases.s3.eu-west-3.amazonaws.com/Docs/Sensors_code.zip)
* [__Fundamentals__](https://www.youtube.com/watch?v=pONr1R1dy88) — Learn the fundamental concepts of CARLA and start your first script. [__CODE__](https://carla-releases.s3.us-east-005.backblazeb2.com/Docs/Fundamentals.ipynb)
* [__An in depth look at CARLA's sensors__](https://www.youtube.com/watch?v=om8klsBj4rc) — An in depth look at CARLA's sensors and how to use them. [__CODE__](https://carla-releases.s3.us-east-005.backblazeb2.com/Docs/Sensors_code.zip)

View File

@ -21,6 +21,18 @@ if (BUILD_RSS_VARIANT)
install(FILES ${spdlog_file} DESTINATION lib)
list(APPEND ADRSS_LIBS ${spdlog_file})
set(proj_include_dir ${ADRSS_INSTALL_DIR}/../../proj-install/include)
set(proj_lib ${ADRSS_INSTALL_DIR}/../../proj-install/lib/libproj.a)
install(DIRECTORY ${proj_include_dir} DESTINATION include/system)
list(APPEND ADRSS_INCLUDE_DIRS ${proj_include_dir})
install(FILES ${proj_lib} DESTINATION lib)
list(APPEND ADRSS_LIBS ${proj_lib})
# as long as the libosm2odr uses the same odrSprial interface it is enough to copy the built static library
set(odr_lib ${ADRSS_INSTALL_DIR}/../src/ad-rss-lib/dependencies/map/dependencies/odrSpiral/lib/libodrSpiral.a)
install(FILES ${odr_lib} DESTINATION lib)
list(APPEND ADRSS_LIBS ${odr_lib})
foreach(ad_lib ad_physics ad_rss ad_map_access ad_map_opendrive_reader ad_rss_map_integration)
set(${ad_lib}_file ${ADRSS_INSTALL_DIR}/${ad_lib}/lib/lib${ad_lib}.a)
install(FILES ${${ad_lib}_file} DESTINATION lib)

View File

@ -1232,6 +1232,7 @@ namespace road {
while(s_current < s_end){
if(lane->GetWidth(s_current) != 0.0f){
const auto edges = lane->GetCornerPositions(s_current, 0);
if (edges.first == edges.second) continue;
geom::Vector3D director = edges.second - edges.first;
geom::Vector3D treeposition = edges.first - director.MakeUnitVector() * distancefromdrivinglineborder;
geom::Transform lanetransform = lane->ComputeTransform(s_current);

View File

@ -761,14 +761,11 @@ std::map<road::Lane::LaneType , std::vector<std::unique_ptr<Mesh>>> MeshFactory:
case carla::road::element::LaneMarking::Type::Solid: {
size_t currentIndex = out_mesh.GetVertices().size() + 1;
std::pair<geom::Vector3D, geom::Vector3D> edges = lane.GetCornerPositions(s_current, 0);
geom::Vector3D director = edges.second - edges.first;
director /= director.Length();
geom::Vector3D endmarking = edges.first + director * lane_mark_info.width;
std::pair<geom::Vector3D, geom::Vector3D> edges =
ComputeEdgesForLanemark(lane_section, lane, s_current, lane_mark_info.width);
out_mesh.AddVertex(edges.first);
out_mesh.AddVertex(endmarking);
out_mesh.AddVertex(edges.second);
out_mesh.AddIndex(currentIndex);
out_mesh.AddIndex(currentIndex + 1);
@ -785,28 +782,21 @@ std::map<road::Lane::LaneType , std::vector<std::unique_ptr<Mesh>>> MeshFactory:
size_t currentIndex = out_mesh.GetVertices().size() + 1;
std::pair<geom::Vector3D, geom::Vector3D> edges =
lane.GetCornerPositions(s_current, road_param.extra_lane_width);
geom::Vector3D director = edges.second - edges.first;
director /= director.Length();
geom::Vector3D endmarking = edges.first + director * lane_mark_info.width;
ComputeEdgesForLanemark(lane_section, lane, s_current, lane_mark_info.width);
out_mesh.AddVertex(edges.first);
out_mesh.AddVertex(endmarking);
out_mesh.AddVertex(edges.second);
s_current += road_param.resolution * 3;
if (s_current > s_end)
{
s_current = s_end;
}
edges = lane.GetCornerPositions(s_current, road_param.extra_lane_width);
director = edges.second - edges.first;
director /= director.Length();
endmarking = edges.first + director * lane_mark_info.width;
edges = ComputeEdgesForLanemark(lane_section, lane, s_current, lane_mark_info.width);
out_mesh.AddVertex(edges.first);
out_mesh.AddVertex(endmarking);
out_mesh.AddVertex(edges.second);
out_mesh.AddIndex(currentIndex);
out_mesh.AddIndex(currentIndex + 1);
@ -864,13 +854,12 @@ std::map<road::Lane::LaneType , std::vector<std::unique_ptr<Mesh>>> MeshFactory:
const carla::road::element::RoadInfoMarkRecord* road_info_mark = lane.GetInfo<carla::road::element::RoadInfoMarkRecord>(s_current);
if (road_info_mark != nullptr) {
carla::road::element::LaneMarking lane_mark_info(*road_info_mark);
std::pair<geom::Vector3D, geom::Vector3D> edges = lane.GetCornerPositions(s_end, 0);
geom::Vector3D director = edges.second - edges.first;
director /= director.Length();
geom::Vector3D endmarking = edges.first + director * lane_mark_info.width;
std::pair<geom::Vector3D, geom::Vector3D> edges =
ComputeEdgesForLanemark(lane_section, lane, s_end, lane_mark_info.width);
out_mesh.AddVertex(edges.first);
out_mesh.AddVertex(endmarking);
out_mesh.AddVertex(edges.second);
}
inout.push_back(std::make_unique<Mesh>(out_mesh));
}
@ -928,28 +917,20 @@ std::map<road::Lane::LaneType , std::vector<std::unique_ptr<Mesh>>> MeshFactory:
size_t currentIndex = out_mesh.GetVertices().size() + 1;
std::pair<geom::Vector3D, geom::Vector3D> edges =
lane.GetCornerPositions(s_current, road_param.extra_lane_width);
geom::Vector3D director = edges.second - edges.first;
director /= director.Length();
geom::Vector3D endmarking = edges.first + director * lane_mark_info.width;
ComputeEdgesForLanemark(lane_section, lane, s_current, lane_mark_info.width);
out_mesh.AddVertex(edges.first);
out_mesh.AddVertex(endmarking);
out_mesh.AddVertex(edges.second);
s_current += road_param.resolution * 3;
if (s_current > s_end) {
s_current = s_end;
}
edges = lane.GetCornerPositions(s_current, road_param.extra_lane_width);
director = edges.second - edges.first;
director /= director.Length();
endmarking = edges.first + director * lane_mark_info.width;
edges = ComputeEdgesForLanemark(lane_section, lane, s_current, lane_mark_info.width);
out_mesh.AddVertex(edges.first);
out_mesh.AddVertex(endmarking);
out_mesh.AddVertex(edges.second);
out_mesh.AddIndex(currentIndex);
out_mesh.AddIndex(currentIndex + 1);
@ -1150,6 +1131,33 @@ std::map<road::Lane::LaneType , std::vector<std::unique_ptr<Mesh>>> MeshFactory:
return std::make_unique<Mesh>(out_mesh);
}
std::pair<geom::Vector3D, geom::Vector3D> MeshFactory::ComputeEdgesForLanemark(
const road::LaneSection& lane_section,
const road::Lane& lane,
const double s_current,
const double lanemark_width) const {
std::pair<geom::Vector3D, geom::Vector3D> edges =
lane.GetCornerPositions(s_current, road_param.extra_lane_width);
geom::Vector3D director;
if (edges.first != edges.second) {
director = edges.second - edges.first;
director /= director.Length();
} else {
const std::map<road::LaneId, road::Lane> & lanes = lane_section.GetLanes();
for (const auto& lane_pair : lanes) {
std::pair<geom::Vector3D, geom::Vector3D> another_edge =
lane_pair.second.GetCornerPositions(s_current, road_param.extra_lane_width);
if (another_edge.first != another_edge.second) {
director = another_edge.second - another_edge.first;
director /= director.Length();
break;
}
}
}
geom::Vector3D endmarking = edges.first + director * lanemark_width;
return std::make_pair(edges.first, endmarking);
}
} // namespace geom
} // namespace carla

View File

@ -148,6 +148,15 @@ namespace geom {
RoadParameters road_param;
private:
// Calculate the points on both sides of the lane mark for the specified s_current
std::pair<geom::Vector3D, geom::Vector3D> ComputeEdgesForLanemark(
const road::LaneSection& lane_section,
const road::Lane& lane,
const double s_current,
const double lanemark_width) const;
};
} // namespace geom

View File

@ -309,17 +309,17 @@ void RssSensor::TickRssSensor(const client::Timestamp &timestamp, CallbackFuncti
auto const settings = GetWorld().GetSettings();
if ( settings.synchronous_mode ) {
_rss_check->GetLogger()->trace("RssSensor[{}] sync-tick", timestamp.frame);
_rss_check->GetLogger()->info("RssSensor[{}] sync-tick", timestamp.frame);
TickRssSensorThreadLocked(timestamp, actors, callback);
}
else {
// store the future to prevent the destructor of the future from blocked waiting
_rss_check->GetLogger()->trace("RssSensor[{}] async-tick", timestamp.frame);
_rss_check->GetLogger()->info("RssSensor[{}] async-tick", timestamp.frame);
_tick_future = std::async(&RssSensor::TickRssSensorThreadLocked, this, timestamp, actors, callback);
}
} else {
if (bool(_rss_check)){
_rss_check->GetLogger()->debug("RssSensor[{}] tick dropped", timestamp.frame);
_rss_check->GetLogger()->info("RssSensor[{}] tick dropped", timestamp.frame);
}
}
}

View File

@ -55,7 +55,7 @@ def get_libcarla_extensions():
os.path.join(pwd, 'dependencies/lib/libxerces-c.a')]
extra_link_args += ['-lz']
extra_compile_args = [
'-isystem', 'dependencies/include/system', '-fPIC', '-std=c++14',
'-isystem', os.path.join(pwd, 'dependencies/include/system'), '-fPIC', '-std=c++14',
'-Werror', '-Wall', '-Wextra', '-Wpedantic', '-Wno-self-assign-overloaded',
'-Wdeprecated', '-Wno-shadow', '-Wuninitialized', '-Wunreachable-code',
'-Wpessimizing-move', '-Wold-style-cast', '-Wnull-dereference',
@ -77,6 +77,7 @@ def get_libcarla_extensions():
extra_link_args += [os.path.join(pwd, 'dependencies/lib/libad_physics.a')]
extra_link_args += [os.path.join(pwd, 'dependencies/lib/libad_map_opendrive_reader.a')]
extra_link_args += [os.path.join(pwd, 'dependencies/lib/libboost_program_options.a')]
extra_link_args += [os.path.join(pwd, 'dependencies/lib/libodrSpiral.a')]
extra_link_args += [os.path.join(pwd, 'dependencies/lib/libspdlog.a')]
extra_link_args += ['-lrt']
extra_link_args += ['-ltbb']

View File

@ -135,6 +135,7 @@ class World(object):
def __init__(self, carla_world, args):
self.world = carla_world
self.sync = args.sync
self.actor_role_name = args.rolename
self.dim = (args.width, args.height)
try:
@ -161,10 +162,7 @@ class World(object):
sys.exit(1)
self.restart()
self.world_tick_id = self.world.on_tick(self.on_world_tick)
def on_world_tick(self, world_snapshot):
self.hud.on_world_tick(world_snapshot)
self.world_tick_id = self.world.on_tick(self.hud.on_world_tick)
def toggle_pause(self):
settings = self.world.get_settings()
@ -235,6 +233,11 @@ class World(object):
self.rss_sensor = RssSensor(self.player, self.world,
self.rss_unstructured_scene_visualizer, self.rss_bounding_box_visualizer, self.hud.rss_state_visualizer)
if self.sync:
self.world.tick()
else:
self.world.wait_for_tick()
def tick(self, clock):
self.hud.tick(self.player, clock)
@ -384,7 +387,7 @@ class VehicleControl(object):
print('\nReceived signal {}. Trigger stopping...'.format(signum))
VehicleControl.signal_received = True
def parse_events(self, world, clock):
def parse_events(self, world, clock, sync_mode):
if VehicleControl.signal_received:
print('\nAccepted signal. Stopping loop...')
return True
@ -806,13 +809,27 @@ def game_loop(args):
(args.width, args.height),
pygame.HWSURFACE | pygame.DOUBLEBUF)
world = World(client.get_world(), args)
sim_world = client.get_world()
original_settings = sim_world.get_settings()
settings = sim_world.get_settings()
if args.sync != settings.synchronous_mode:
args.sync = True
settings.synchronous_mode = True
settings.fixed_delta_seconds = 0.05
sim_world.apply_settings(settings)
traffic_manager = client.get_trafficmanager()
traffic_manager.set_synchronous_mode(True)
world = World(sim_world, args)
controller = VehicleControl(world, args.autopilot)
clock = pygame.time.Clock()
while True:
if args.sync:
sim_world.tick()
clock.tick_busy_loop(60)
if controller.parse_events(world, clock):
if controller.parse_events(world, clock, args.sync):
return
world.tick(clock)
world.render(display)
@ -875,6 +892,10 @@ def main():
'--externalActor',
action='store_true',
help='attaches to externally created actor by role name')
argparser.add_argument(
'--sync',
action='store_true',
help='Activate synchronous mode execution')
args = argparser.parse_args()
args.width, args.height = [int(x) for x in args.res.split('x')]

View File

@ -334,6 +334,9 @@ class RssSensor(object):
self.map_log_level = self.map_log_level-1
self.sensor.set_map_log_level(self.map_log_level)
def drop_route(self):
self.sensor.drop_route()
@staticmethod
def get_default_parameters():
ego_dynamics = ad.rss.world.RssDynamics()

View File

@ -1,7 +1,6 @@
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/carla/badge/?version=latest)](http://carla.readthedocs.io)
[![carla.org](Docs/img/btn/web.png)](http://carla.org)
@ -15,29 +14,38 @@ validation of autonomous driving systems. In addition to open-source code and pr
vehicles) that were created for this purpose and can be used freely. The simulation platform supports flexible specification of sensor suites and
environmental conditions.
[![CARLA Video](Docs/img/video_thumbnail_0910.jpg)](https://www.youtube.com/watch?v=7jej46ALVRE)
[![CARLA Video](Docs/img/0_9_15_thumbnail.webp)](https://www.youtube.com/watch?v=q4V9GYjA1pE )
If you want to benchmark your model in the same conditions as in our CoRL17
paper, check out
[Benchmarking](https://github.com/carla-simulator/driving-benchmarks).
### Download CARLA
Linux:
* [**Get CARLA overnight build**](http://carla-releases.s3.amazonaws.com/Linux/Dev/CARLA_Latest.tar.gz)
* [**Get AdditionalMaps overnight build**](http://carla-releases.s3.amazonaws.com/Linux/Dev/AdditionalMaps_Latest.tar.gz)
* [**Get CARLA overnight build**](https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/Dev/CARLA_Latest.tar.gz)
* [**Get AdditionalMaps overnight build**](https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/Dev/AdditionalMaps_Latest.tar.gz)
Windows:
* [**Get CARLA overnight build**](http://carla-releases.s3.amazonaws.com/Windows/Dev/CARLA_Latest.zip)
* [**Get AdditionalMaps overnight build**](http://carla-releases.s3.amazonaws.com/Windows/Dev/AdditionalMaps_Latest.zip)
* [**Get CARLA overnight build**](https://carla-releases.s3.us-east-005.backblazeb2.com/Windows/Dev/CARLA_Latest.zip)
* [**Get AdditionalMaps overnight build**](https://carla-releases.s3.us-east-005.backblazeb2.com/Windows/Dev/AdditionalMaps_Latest.zip)
### Recommended system
* Intel i7 gen 9th - 11th / Intel i9 gen 9th - 11th / AMD ryzen 7 / AMD ryzen 9
* +16 GB RAM memory
* NVIDIA RTX 2070 / NVIDIA RTX 2080 / NVIDIA RTX 3070, NVIDIA RTX 3080
* Ubuntu 18.04
* +32 GB RAM memory
* NVIDIA RTX 3070 / NVIDIA RTX 3080 / NVIDIA RTX 4090
* Ubuntu 20.04
## Documentation
The [CARLA documentation](https://carla.readthedocs.io/en/latest/) is hosted on ReadTheDocs. Please see the following key links:
- [Building on Linux](https://carla.readthedocs.io/en/latest/build_linux/)
- [Building on Windows](https://carla.readthedocs.io/en/latest/build_windows/)
- [First steps](https://carla.readthedocs.io/en/latest/tuto_first_steps/)
- [CARLA asset catalogue](https://carla.readthedocs.io/en/latest/catalogue/)
- [Python API reference](https://carla.readthedocs.io/en/latest/python_api/)
- [Blueprint library](https://carla.readthedocs.io/en/latest/bp_library/)
## CARLA Ecosystem
Repositories associated to the CARLA simulation platform:
Repositories associated with the CARLA simulation platform:
* [**CARLA Autonomous Driving leaderboard**](https://leaderboard.carla.org/): Automatic platform to validate Autonomous Driving stacks
* [**Scenario_Runner**](https://github.com/carla-simulator/scenario_runner): Engine to execute traffic scenarios in CARLA 0.9.X
@ -46,8 +54,10 @@ Repositories associated to the CARLA simulation platform:
* [**Conditional Imitation-Learning**](https://github.com/felipecode/coiltraine): Training and testing Conditional Imitation Learning models in CARLA
* [**AutoWare AV stack**](https://github.com/carla-simulator/carla-autoware): Bridge to connect AutoWare AV stack to CARLA
* [**Reinforcement-Learning**](https://github.com/carla-simulator/reinforcement-learning): Code for running Conditional Reinforcement Learning models in CARLA
* [**RoadRunner**](https://www.mathworks.com/products/roadrunner.html): MATLAB GUI based application to create road networks in OpenDrive format
* [**Map Editor**](https://github.com/carla-simulator/carla-map-editor): Standalone GUI application to enhance RoadRunner maps with traffic lights and traffic signs information
**Like what you see? Star us on GitHub to support the project!**
Paper
@ -74,24 +84,22 @@ Felipe Codevilla, Antonio Lopez, Vladlen Koltun; PMLR 78:1-16
Building CARLA
--------------
Use `git clone` or download the project from this page. Note that the master branch contains the most recent release of CARLA with the latest fixes and features.
Clone this repository locally from GitHub:
Then follow the instruction at [How to build on Linux][buildlinuxlink] or [How to build on Windows][buildwindowslink].
The Linux build needs for an UE patch to solve some visualization issues regarding Vulkan. Those already working with a Linux build should install the patch and make the UE build again using the following commands.
```sh
# Download and install the UE patch
cd ~/UnrealEngine_4.24
wget https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/UE_Patch/430667-13636743-patch.txt ~/430667-13636743-patch.txt
patch --strip=4 < ~/430667-13636743-patch.txt
# Build UE
./Setup.sh && ./GenerateProjectFiles.sh && make
git clone https://github.com/carla-simulator/carla.git .
```
Unfortunately we don't have official instructions to build on Mac yet, please check the progress at [issue #150][issue150].
Also, clone the [CARLA fork of the Unreal Engine](https://github.com/CarlaUnreal/UnrealEngine) into an appropriate location:
```sh
git clone --depth 1 -b carla https://github.com/CarlaUnreal/UnrealEngine.git .
```
Once you have cloned the repositories, follow the instructions for [building in Linux][buildlinuxlink] or [building in Windows][buildwindowslink].
[buildlinuxlink]: https://carla.readthedocs.io/en/latest/build_linux/
[buildwindowslink]: https://carla.readthedocs.io/en/latest/build_windows/
[issue150]: https://github.com/carla-simulator/carla/issues/150
Contributing
------------
@ -106,29 +114,6 @@ F.A.Q.
If you run into problems, check our
[FAQ](https://carla.readthedocs.io/en/latest/build_faq/).
CARLA Talks
------
The team creates some additional content for users, besides the docs. This is a great way to cover different subjects such as detailed explanations for a specific module, latest improvements in a feature, future work and much more.
__CARLA Talks 2020 (May):__
* __General__
* Art improvements: environment and rendering — [video](https://youtu.be/ZZaHevsz8W8) | [slides](https://drive.google.com/file/d/1l9Ztaq0Q8fNN5YPU4-5vL13eZUwsQl5P/view?usp=sharing)
* Core implementations: synchrony, snapshots and landmarks — [video](https://youtu.be/nyyTLmphqY4) | [slides](https://drive.google.com/file/d/1yaOwf1419qWZqE1gTSrrknsWOhawEWh_/view?usp=sharing)
* Data ingestion — [video](https://youtu.be/mHiUUZ4xC9o) | [slides](https://drive.google.com/file/d/10uNBAMreKajYimIhwCqSYXjhfVs2bX31/view?usp=sharing)
* Pedestrians and their implementation — [video](https://youtu.be/Uoz2ihDwaWA) | [slides](https://drive.google.com/file/d/1Tsosin7BLP1k558shtbzUdo2ZXVKy5CB/view?usp=sharing)
* Sensors in CARLA — [video](https://youtu.be/T8qCSet8WK0) | [slides](https://drive.google.com/file/d/1UO8ZAIOp-1xaBzcFMfn_IoipycVkUo4q/view?usp=sharing)
* __Modules__
* Improvements in the Traffic Manager — [video](https://youtu.be/n9cufaJ17eA) | [slides](https://drive.google.com/file/d/1R9uNZ6pYHSZoEBxs2vYK7swiriKbbuxo/view?usp=sharing)
* Integration of autoware and ROS — [video](https://youtu.be/ChIgcC2scwU) | [slides](https://drive.google.com/file/d/1uO6nBaFirrllb08OeqGAMVLApQ6EbgAt/view?usp=sharing)
* Introducing ScenarioRunner — [video](https://youtu.be/dcnnNJowqzM) | [slides](https://drive.google.com/file/d/1zgoH_kLOfIw117FJGm2IVZZAIRw9U2Q0/view?usp=sharing)
* OpenSCENARIO support — [slides](https://drive.google.com/file/d/1g6ATxZRTWEdstiZwfBN1_T_x_WwZs0zE/view?usp=sharing)
* __Features__
* Co-Simulations with SUMO and PTV-Vissim — [video](https://youtu.be/PuFSbj1PU94) | [slides](https://drive.google.com/file/d/10DgMNUBqKqWBrdiwBiAIT4DdR9ObCquI/view?usp=sharing)
* Integration of RSS-lib — [slides](https://drive.google.com/file/d/1whREmrCv67fOMipgCk6kkiW4VPODig0A/view?usp=sharing)
* The External Sensor Interface (ESI) — [video](https://youtu.be/5hXHPV9FIeY) | [slides](https://drive.google.com/file/d/1VWFaEoS12siW6NtQDUkm44BVO7tveRbJ/view?usp=sharing)
* The OpenDRIVE Standalone Mode — [video](https://youtu.be/U25GhofVV1Q) | [slides](https://drive.google.com/file/d/1D5VsgfX7dmgPWn7UtDDid3-OdS1HI4pY/view?usp=sharing)
Licenses
-------

View File

@ -304,6 +304,15 @@ void ACarlaRecorder::AddVehicleLight(FCarlaActor *CarlaActor)
AddLightVehicle(LightVehicle);
}
void ACarlaRecorder::AddVehicleDoor(const ACarlaWheeledVehicle &Vehicle, const EVehicleDoor SDoors, bool bIsOpen)
{
CarlaRecorderDoorVehicle DoorVehicle;
DoorVehicle.DatabaseId = Episode->GetActorRegistry().FindCarlaActor(&Vehicle)->GetActorId();
DoorVehicle.Doors = static_cast<CarlaRecorderDoorVehicle::VehicleDoorType>(SDoors);
DoorVehicle.bIsOpen = bIsOpen;
AddDoorVehicle(DoorVehicle);
}
void ACarlaRecorder::AddActorKinematics(FCarlaActor *CarlaActor)
{
check(CarlaActor != nullptr);
@ -478,6 +487,7 @@ void ACarlaRecorder::Clear(void)
PhysicsControls.Clear();
TrafficLightTimes.Clear();
WalkersBones.Clear();
DoorVehicles.Clear();
Wheels.Clear();
Bikers.Clear();
}
@ -496,6 +506,7 @@ void ACarlaRecorder::Write(double DeltaSeconds)
EventsDel.Write(File);
EventsParent.Write(File);
Collisions.Write(File);
DoorVehicles.Write(File);
// positions and states
Positions.Write(File);
@ -652,6 +663,14 @@ void ACarlaRecorder::AddLightVehicle(const CarlaRecorderLightVehicle &LightVehic
}
}
void ACarlaRecorder::AddDoorVehicle(const CarlaRecorderDoorVehicle &DoorVehicle)
{
if (Enabled)
{
DoorVehicles.Add(DoorVehicle);
}
}
void ACarlaRecorder::AddEventLightSceneChanged(const UCarlaLight* Light)
{
if (Enabled)

View File

@ -33,7 +33,9 @@
#include "CarlaRecorderState.h"
#include "CarlaRecorderVisualTime.h"
#include "CarlaRecorderWalkerBones.h"
#include "CarlaRecorderDoorVehicle.h"
#include "CarlaReplayer.h"
#include "Carla/Vehicle/CarlaWheeledVehicle.h"
#include "CarlaRecorder.generated.h"
@ -67,6 +69,7 @@ enum class CarlaRecorderPacketId : uint8_t
FrameCounter,
WalkerBones,
VisualTime,
VehicleDoor,
AnimVehicleWheels,
AnimBiker
};
@ -137,6 +140,10 @@ public:
void AddActorBones(FCarlaActor *CarlaActor);
void AddVehicleDoor(const ACarlaWheeledVehicle& Vehicle, const EVehicleDoor SDoors, bool bIsOpen);
void AddDoorVehicle(const CarlaRecorderDoorVehicle &DoorVehicle);
// set episode
void SetEpisode(UCarlaEpisode *ThisEpisode)
{
@ -208,6 +215,7 @@ private:
CarlaRecorderTrafficLightTimes TrafficLightTimes;
CarlaRecorderWalkersBones WalkersBones;
CarlaRecorderVisualTime VisualTime;
CarlaRecorderDoorVehicles DoorVehicles;
// replayer
CarlaReplayer Replayer;

View File

@ -0,0 +1,75 @@
// Copyright (c) 2023 Computer Vision Center (CVC) at the Universitat Autonoma
// de Barcelona (UAB).
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#include "CarlaRecorderDoorVehicle.h"
#include "CarlaRecorder.h"
#include "CarlaRecorderHelpers.h"
void CarlaRecorderDoorVehicle::Write(std::ostream &OutFile)
{
// database id
WriteValue<uint32_t>(OutFile, this->DatabaseId);
WriteValue<VehicleDoorType>(OutFile, this->Doors);
WriteValue<bool>(OutFile, this->bIsOpen);
}
void CarlaRecorderDoorVehicle::Read(std::istream &InFile)
{
// database id
ReadValue<uint32_t>(InFile, this->DatabaseId);
ReadValue<VehicleDoorType>(InFile, this->Doors);
ReadValue<bool>(InFile, this->bIsOpen);
}
// ---------------------------------------------
void CarlaRecorderDoorVehicles::Clear(void)
{
Vehicles.clear();
}
void CarlaRecorderDoorVehicles::Add(const CarlaRecorderDoorVehicle &Vehicle)
{
Vehicles.push_back(Vehicle);
}
void CarlaRecorderDoorVehicles::Write(std::ostream &OutFile)
{
// write the packet id
WriteValue<char>(OutFile, static_cast<char>(CarlaRecorderPacketId::VehicleDoor));
// write a dummy packet size
uint32_t Total = 2 + Vehicles.size() * sizeof(CarlaRecorderDoorVehicle);
WriteValue<uint32_t>(OutFile, Total);
// write total records
Total = Vehicles.size();
WriteValue<uint16_t>(OutFile, Total);
for (auto& Vehicle : Vehicles)
{
Vehicle.Write(OutFile);
}
}
void CarlaRecorderDoorVehicles::Read(std::istream &InFile)
{
uint16_t Total;
CarlaRecorderDoorVehicle DoorVehicle;
// read Total walkers
ReadValue<uint16_t>(InFile, Total);
for (uint16_t i = 0; i < Total; ++i)
{
DoorVehicle.Read(InFile);
Add(DoorVehicle);
}
}
const std::vector<CarlaRecorderDoorVehicle>& CarlaRecorderDoorVehicles::GetDoorVehicles()
{
return Vehicles;
}

View File

@ -0,0 +1,45 @@
// Copyright (c) 2023 Computer Vision Center (CVC) at the Universitat Autonoma
// de Barcelona (UAB).
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#pragma once
#include <sstream>
#include <vector>
#include <type_traits>
#pragma pack(push, 1)
struct CarlaRecorderDoorVehicle
{
// Use same type as carla::vehicle::CarlaWheeledVehicle::EVehicleDoor
using VehicleDoorType = uint8_t;
uint32_t DatabaseId;
VehicleDoorType Doors;
bool bIsOpen;
void Read(std::istream &InFile);
void Write(std::ostream &OutFile);
};
#pragma pack(pop)
struct CarlaRecorderDoorVehicles
{
public:
void Add(const CarlaRecorderDoorVehicle &InObj);
void Clear(void);
void Write(std::ostream &OutFile);
void Read(std::istream &InFile);
const std::vector<CarlaRecorderDoorVehicle>& GetDoorVehicles();
private:
std::vector<CarlaRecorderDoorVehicle> Vehicles;
};

View File

@ -19,6 +19,8 @@
#include <carla/rpc/VehiclePhysicsControl.h>
#include <compiler/enable-ue4-macros.h>
#include <Carla/Vehicle/CarlaWheeledVehicle.h>
inline bool CarlaRecorderQuery::ReadHeader(void)
{
if (File.eof())
@ -271,6 +273,49 @@ std::string CarlaRecorderQuery::QueryInfo(std::string Filename, bool bShowAll)
SkipPacket();
break;
// vehicle door animations
case static_cast<char>(CarlaRecorderPacketId::VehicleDoor):
if (bShowAll)
{
ReadValue<uint16_t>(File, Total);
if (Total > 0 && !bFramePrinted)
{
PrintFrame(Info);
bFramePrinted = true;
}
Info << " Vehicle door animations: " << Total << std::endl;
for (i = 0; i < Total; ++i)
{
DoorVehicle.Read(File);
CarlaRecorderDoorVehicle::VehicleDoorType doorVehicle;
doorVehicle = DoorVehicle.Doors;
EVehicleDoor eDoorVehicle = static_cast<EVehicleDoor>(doorVehicle);
std::string opened_doors_list;
Info << " Id: " << DoorVehicle.DatabaseId << std::endl;
Info << " Doors opened: ";
if (eDoorVehicle == EVehicleDoor::FL)
Info << " Front Left " << std::endl;
if (eDoorVehicle == EVehicleDoor::FR)
Info << " Front Right " << std::endl;
if (eDoorVehicle == EVehicleDoor::RL)
Info << " Rear Left " << std::endl;
if (eDoorVehicle == EVehicleDoor::RR)
Info << " Rear Right " << std::endl;
if (eDoorVehicle == EVehicleDoor::Hood)
Info << " Hood " << std::endl;
if (eDoorVehicle == EVehicleDoor::Trunk)
Info << " Trunk " << std::endl;
if (eDoorVehicle == EVehicleDoor::All)
Info << " All " << std::endl;
}
}
else
SkipPacket();
break;
// vehicle light animations
case static_cast<char>(CarlaRecorderPacketId::VehicleLight):
if (bShowAll)

View File

@ -26,6 +26,7 @@
#include "CarlaRecorderPosition.h"
#include "CarlaRecorderState.h"
#include "CarlaRecorderWalkerBones.h"
#include "CarlaRecorderDoorVehicle.h"
class CarlaRecorderQuery
{
@ -69,6 +70,7 @@ private:
CarlaRecorderPhysicsControl PhysicsControl;
CarlaRecorderTrafficLightTime TrafficLightTime;
CarlaRecorderWalkerBones WalkerBones;
CarlaRecorderDoorVehicle DoorVehicle;
// read next header packet
bool ReadHeader(void);

View File

@ -378,6 +378,14 @@ void CarlaReplayer::ProcessToTime(double Time, bool IsFirstTime)
SkipPacket();
break;
// vehicle door animation
case static_cast<char>(CarlaRecorderPacketId::VehicleDoor):
if (bFrameFound)
ProcessDoorVehicle();
else
SkipPacket();
break;
// scene lights animation
case static_cast<char>(CarlaRecorderPacketId::SceneLight):
if (bFrameFound)
@ -649,6 +657,25 @@ void CarlaReplayer::ProcessLightVehicle(void)
}
}
void CarlaReplayer::ProcessDoorVehicle(void)
{
uint16_t Total;
CarlaRecorderDoorVehicle DoorVehicle;
// read Total walkers
ReadValue<uint16_t>(File, Total);
for (uint16_t i = 0; i < Total; ++i)
{
DoorVehicle.Read(File);
DoorVehicle.DatabaseId = MappedId[DoorVehicle.DatabaseId];
// check if ignore this actor
if (!(IgnoreHero && IsHeroMap[DoorVehicle.DatabaseId]))
{
Helper.ProcessReplayerDoorVehicle(DoorVehicle);
}
}
}
void CarlaReplayer::ProcessLightScene(void)
{
uint16_t Total;

View File

@ -158,6 +158,8 @@ private:
void ProcessLightVehicle(void);
void ProcessLightScene(void);
void ProcessDoorVehicle(void);
void ProcessWalkerBones(void);
// positions

View File

@ -416,6 +416,24 @@ void CarlaReplayerHelper::ProcessReplayerAnimVehicle(CarlaRecorderAnimVehicle Ve
}
}
// set the openings and closings of vehicle doors
void CarlaReplayerHelper::ProcessReplayerDoorVehicle(CarlaRecorderDoorVehicle DoorVehicle)
{
check(Episode != nullptr);
FCarlaActor * CarlaActor = Episode->FindCarlaActor(DoorVehicle.DatabaseId);
if (CarlaActor)
{
ACarlaWheeledVehicle * Vehicle = Cast<ACarlaWheeledVehicle>(CarlaActor->GetActor());
if (Vehicle) {
if(DoorVehicle.bIsOpen){
Vehicle->OpenDoor(static_cast<EVehicleDoor>(DoorVehicle.Doors));
}else{
Vehicle->CloseDoor(static_cast<EVehicleDoor>(DoorVehicle.Doors));
}
}
}
}
// set the lights for vehicles
void CarlaReplayerHelper::ProcessReplayerLightVehicle(CarlaRecorderLightVehicle LightVehicle)
{

View File

@ -15,6 +15,7 @@
#include "CarlaRecorderAnimVehicleWheels.h"
#include "CarlaRecorderLightVehicle.h"
#include "CarlaRecorderLightScene.h"
#include "CarlaRecorderDoorVehicle.h"
#include "CarlaRecorderWalkerBones.h"
#include <unordered_map>
@ -65,6 +66,9 @@ public:
// set the animation for walkers
void ProcessReplayerAnimWalker(CarlaRecorderAnimWalker Walker);
// set the openings and closing of vehicle doors
void ProcessReplayerDoorVehicle(CarlaRecorderDoorVehicle DoorVehicle);
// set the animation for bikers
void ProcessReplayerAnimBiker(CarlaRecorderAnimBiker Biker);

View File

@ -4,7 +4,7 @@
#include "Carla/Game/CarlaGameInstance.h"
#include "Carla/Settings/CarlaSettings.h"
#include "Carla/Game/CarlaGameInstance.h"
#include "Async.h"
#include "Components/StaticMeshComponent.h"
#include "Engine/DirectionalLight.h"

View File

@ -36,11 +36,15 @@ void UYieldSignComponent::InitializeSign(const carla::road::Map &Map)
if(lane == 0)
continue;
auto signal_waypoint = Map.GetWaypoint(
RoadId, lane, SignalReference->GetS()).get();
if(Map.GetLane(signal_waypoint).GetType() != cr::Lane::LaneType::Driving)
auto signal_waypoint_optional = Map.GetWaypoint(RoadId, lane, SignalReference->GetS());
if (!signal_waypoint_optional) {
carla::log_warning("YieldSignComponent::InitializeSignsignal() waypoint seems to be invalid, ignoring. RoadId:", RoadId, " LaneId:", lane, " s:", SignalReference->GetS());
continue;
}
auto signal_waypoint = signal_waypoint_optional.value();
if(Map.GetLane(signal_waypoint).GetType() != cr::Lane::LaneType::Driving) {
continue;
}
auto box_waypoint = signal_waypoint;
// Prevent adding the bounding box inside the intersection

View File

@ -1019,6 +1019,8 @@ void ACarlaWheeledVehicle::OpenDoorPhys(const EVehicleDoor DoorIdx)
{
(*CollisionDisable)->InitComponentConstraint();
}
RecordDoorChange(DoorIdx, true);
}
void ACarlaWheeledVehicle::CloseDoorPhys(const EVehicleDoor DoorIdx)
@ -1032,6 +1034,16 @@ void ACarlaWheeledVehicle::CloseDoorPhys(const EVehicleDoor DoorIdx)
DoorComponent->SetWorldTransform(DoorInitialTransform);
DoorComponent->AttachToComponent(
GetMesh(), FAttachmentTransformRules(EAttachmentRule::KeepWorld, true));
RecordDoorChange(DoorIdx, false);
}
void ACarlaWheeledVehicle::RecordDoorChange(const EVehicleDoor DoorIdx, bool bIsOpen)
{
auto * Recorder = UCarlaStatics::GetRecorder(GetWorld());
if (Recorder && Recorder->IsEnabled())
{
Recorder->AddVehicleDoor(*this, DoorIdx, bIsOpen);
}
}
void ACarlaWheeledVehicle::ApplyRolloverBehavior()

View File

@ -406,6 +406,9 @@ public:
UFUNCTION(Category = "CARLA Wheeled Vehicle", BlueprintCallable)
void CloseDoorPhys(const EVehicleDoor DoorIdx);
UFUNCTION(Category = "CARLA Wheeled Vehicle", BlueprintCallable)
void RecordDoorChange(const EVehicleDoor DoorIdx, const bool bIsOpen);
virtual FVector GetVelocity() const override;
//-----CARSIM--------------------------------

View File

@ -19,7 +19,7 @@ for /F "delims=" %%a in (%CONTENT_VERSIONS%) do (
set "lastLine=%%a"
)
set CONTENT_ID=%lastLine:~-16,16%
set CONTENT_LINK=http://carla-assets.s3.amazonaws.com/%CONTENT_ID%.tar.gz
set CONTENT_LINK=http://carla-assets.s3.us-east-005.backblazeb2.com/%CONTENT_ID%.tar.gz
if "%CONTENT_ID:~0,2%"=="20" (
set CONTENT_FILE=%CONTENT_FOLDER%/%CONTENT_ID%.tar.gz
set CONTENT_FILE_TAR=%CONTENT_FOLDER%/%CONTENT_ID%.tar

View File

@ -47,7 +47,7 @@ pushd "$SCRIPT_DIR" >/dev/null
CONTENT_FOLDER="${SCRIPT_DIR}/Unreal/CarlaUE4/Content/Carla"
CONTENT_ID=$(tac $SCRIPT_DIR/Util/ContentVersions.txt | egrep -m 1 . | rev | cut -d' ' -f1 | rev)
CONTENT_LINK=http://carla-assets.s3.amazonaws.com/${CONTENT_ID}.tar.gz
CONTENT_LINK=http://carla-assets.s3.us-east-005.backblazeb2.com/${CONTENT_ID}.tar.gz
VERSION_FILE="${CONTENT_FOLDER}/.version"

View File

@ -29,7 +29,7 @@ IFS="," read -r -a PY_VERSION_LIST <<< "${PY_VERSION_LIST}"
# -- Get ad-rss -------------------------------------------
# ==============================================================================
ADRSS_VERSION=4.4.3
ADRSS_VERSION=4.4.4
ADRSS_BASENAME=ad-rss-${ADRSS_VERSION}
ADRSS_COLCON_WORKSPACE="${CARLA_BUILD_FOLDER}/${ADRSS_BASENAME}"
ADRSS_SRC_DIR="${ADRSS_COLCON_WORKSPACE}/src"
@ -40,10 +40,13 @@ if [[ ! -d "${ADRSS_SRC_DIR}" ]]; then
mkdir -p "${ADRSS_SRC_DIR}"
# clone ad-rss with all submodules, but remove proj, as CARLA already uses it
pushd "${ADRSS_SRC_DIR}" >/dev/null
git clone --depth=1 -b v1.7.0 https://github.com/gabime/spdlog.git
git clone --depth=1 -b v2.4.5_hotfix https://github.com/carla-simulator/map.git
git clone --depth=1 -b v${ADRSS_VERSION} https://github.com/intel/ad-rss-lib.git
git clone -b v${ADRSS_VERSION} https://github.com/intel/ad-rss-lib.git && cd ad-rss-lib && git submodule update --init --recursive && rm -rf dependencies/map/dependencies/PROJ4 && cd ..
# ADRSS_VERSION is designed for older boost, update datatype from boost::array to std::array
grep -rl "boost::array" | xargs sed -i 's/boost::array/std::array/g'
grep -rl "find_package(Boost" | xargs sed -i 's/find_package(Boost/find_package(Boost 1.80/g'
popd
cat >"${ADRSS_COLCON_WORKSPACE}/colcon.meta" <<EOL
@ -56,7 +59,8 @@ if [[ ! -d "${ADRSS_SRC_DIR}" ]]; then
"cmake-args": ["-DBUILD_PYTHON_BINDING=ON", "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DBUILD_SHARED_LIBS=OFF", "-DDISABLE_WARNINGS_AS_ERRORS=ON"]
},
"ad_map_opendrive_reader": {
"cmake-args": ["-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DBUILD_SHARED_LIBS=OFF", "-DDISABLE_WARNINGS_AS_ERRORS=ON"]
"cmake-args": ["-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DBUILD_SHARED_LIBS=OFF", "-DDISABLE_WARNINGS_AS_ERRORS=ON"],
"dependencies": ["odrSpiral"]
},
"ad_rss": {
"cmake-args": ["-DBUILD_PYTHON_BINDING=ON", "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DBUILD_SHARED_LIBS=OFF", "-DDISABLE_WARNINGS_AS_ERRORS=ON"]
@ -78,13 +82,16 @@ fi
# ==============================================================================
ADRSS_INSTALL_DIR="${CARLA_BUILD_FOLDER}/${ADRSS_BASENAME}/install"
CARLA_LLVM_VERSION_MAJOR=$(cut -d'.' -f1 <<<"$(clang --version | head -n 1 | sed -r 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/')")
if [ -z "$CARLA_LLVM_VERSION_MAJOR" ] ; then
fatal_error "Failed to retrieve the installed version of the clang compiler."
else
echo "Using clang-$CARLA_LLVM_VERSION_MAJOR as the CARLA compiler."
fi
# Automation doesn't work if the clang installed within the system is not matching the one that is provided by Unreal
# Setup.sh would have to be adapted to reflect it
# so we need to change
#CARLA_LLVM_VERSION_MAJOR=$(cut -d'.' -f1 <<<"$(clang --version | head -n 1 | sed -r 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/')")
#if [ -z "$CARLA_LLVM_VERSION_MAJOR" ] ; then
# fatal_error "Failed to retrieve the installed version of the clang compiler."
#else
# echo "Using clang-$CARLA_LLVM_VERSION_MAJOR as the CARLA compiler."
#fi
CXX_TAG=c10
#
# Since it it not possible with boost-python to build more than one python version at once (find_package has some bugs)
@ -99,15 +106,17 @@ for PY_VERSION in ${PY_VERSION_LIST[@]} ; do
log "Building ${ADRSS_BASENAME} for python${PY_VERSION}"
pushd "${ADRSS_COLCON_WORKSPACE}" >/dev/null
if [ "${CMAKE_PREFIX_PATH}" == "" ]; then
CMAKE_PREFIX_PATH="${CARLA_BUILD_FOLDER}/boost-1.72.0-c$CARLA_LLVM_VERSION_MAJOR-install;${CARLA_BUILD_FOLDER}/proj-install"
if [[ "${CMAKE_PREFIX_PATH}" == "" ]]; then
CMAKE_PREFIX_PATH="${CARLA_BUILD_FOLDER}/boost-1.80.0-$CXX_TAG-install;${CARLA_BUILD_FOLDER}/proj-install"
else
CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${CARLA_BUILD_FOLDER}/boost-1.72.0-c$CARLA_LLVM_VERSION_MAJOR-install;${CARLA_BUILD_FOLDER}/proj-install"
CMAKE_PREFIX_PATH="${CARLA_BUILD_FOLDER}/boost-1.80.0-$CXX_TAG-install;${CARLA_BUILD_FOLDER}/proj-install;${CMAKE_PREFIX_PATH}"
fi
# get the python version of the binding to be built
# get the python version of the binding to be built, need to query the binary,
# because might be just provided a '3' as PY_VERSION and then the symbolic linked python3 is called
PYTHON_VERSION=$(/usr/bin/env python${PY_VERSION} -V 2>&1)
PYTHON_BINDING_VERSIONS=${PYTHON_VERSION:7:3}
PYTHON_BINDING_VERSIONS=${PYTHON_VERSION:7}
PYTHON_BINDING_VERSIONS=${PYTHON_BINDING_VERSIONS%.*}
echo "PYTHON_BINDING_VERSIONS=${PYTHON_BINDING_VERSIONS}"
# enforce sequential executor to reduce the required memory for compilation

View File

@ -146,7 +146,7 @@ function build_libcarla {
M_TOOLCHAIN=${LIBSTDCPP_TOOLCHAIN_FILE}
M_BUILD_FOLDER=${LIBCARLA_BUILD_CLIENT_FOLDER}.rss.$(echo "$2" | tr '[:upper:]' '[:lower:]')
M_INSTALL_FOLDER=${LIBCARLA_INSTALL_CLIENT_FOLDER}
CMAKE_EXTRA_OPTIONS="${CMAKE_EXTRA_OPTIONS:+${CMAKE_EXTRA_OPTIONS} }-DBUILD_RSS_VARIANT=ON -DADRSS_INSTALL_DIR=${CARLA_BUILD_FOLDER}/ad-rss-4.4.3/install"
CMAKE_EXTRA_OPTIONS="${CMAKE_EXTRA_OPTIONS:+${CMAKE_EXTRA_OPTIONS} }-DBUILD_RSS_VARIANT=ON -DADRSS_INSTALL_DIR=${CARLA_BUILD_FOLDER}/ad-rss-4.4.4/install"
else
fatal_error "Invalid build configuration \"$1\""
fi

View File

@ -367,7 +367,7 @@ FOR /F "usebackq tokens=1,2" %%i in ("%VERSION_FILE%") do (
set ASSETS_VERSION=%%i
set HASH=%%j
)
set URL=http://carla-assets.s3.amazonaws.com/%HASH%.tar.gz
set URL=http://carla-assets.s3.us-east-005.backblazeb2.com/%HASH%.tar.gz
rem ============================================================================
rem -- Generate CMake ----------------------------------------------------------

View File

@ -96,7 +96,7 @@ for PY_VERSION in ${PY_VERSION_LIST[@]} ; do
# try to use the backup boost we have in Jenkins
if [ ! -f "${BOOST_PACKAGE_BASENAME}.tar.gz" ] || [[ $(sha256sum "${BOOST_PACKAGE_BASENAME}.tar.gz") != "${BOOST_SHA256SUM}" ]] ; then
log "Using boost backup"
wget "https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/${BOOST_PACKAGE_BASENAME}.tar.gz" || true
wget "https://carla-releases.s3.us-east-005.backblazeb2.com/Backup/${BOOST_PACKAGE_BASENAME}.tar.gz" || true
fi
log "Extracting boost for Python ${PY_VERSION}."
@ -393,7 +393,7 @@ else
# try to use the backup boost we have in Jenkins
if [[ ! -f "${XERCESC_BASENAME}.tar.gz" ]] ; then
log "Using xerces backup"
wget "https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/${XERCESC_BASENAME}.tar.gz" || true
wget "https://carla-releases.s3.us-east-005.backblazeb2.com/Backup/${XERCESC_BASENAME}.tar.gz" || true
fi
log "Extracting xerces-c."

View File

@ -25,7 +25,7 @@
#
# You can download it directly from
#
# http://carla-assets.s3.amazonaws.com/PUT_FILE_ID_HERE.tar.gz
# http://carla-assets.s3.us-east-005.backblazeb2.com/PUT_FILE_ID_HERE.tar.gz
0.9.5: 20190404_c7b464a
0.9.6: 20190710_0097e66

View File

@ -28,8 +28,8 @@ fi
CARLA_VERSION=$1
CARLA_DIR=carla-simulator-${CARLA_VERSION}
CARLA_RELEASE_URL=https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_${CARLA_VERSION}.tar.gz
ADDITIONAL_MAPS_URL=https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/AdditionalMaps_${CARLA_VERSION}.tar.gz
CARLA_RELEASE_URL=https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/CARLA_${CARLA_VERSION}.tar.gz
ADDITIONAL_MAPS_URL=https://carla-releases.s3.us-east-005.backblazeb2.com/Linux/AdditionalMaps_${CARLA_VERSION}.tar.gz
# Adding maintainer name.
DEBFULLNAME=Carla\ Simulator\ Team

View File

@ -95,7 +95,7 @@ if not exist "%BOOST_SRC_DIR%" (
)
if "!_checksum!" == "1" (
echo %FILE_N% Using Boost backup
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/%BOOST_TEMP_FILE%', '%BOOST_TEMP_FILE_DIR%')"
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://carla-releases.s3.us-east-005.backblazeb2.com/Backup/%BOOST_TEMP_FILE%', '%BOOST_TEMP_FILE_DIR%')"
call :CheckSumEvaluate %BOOST_TEMP_FILE_DIR%,%BOOST_SHA256SUM%,_checksum
)
if "!_checksum!" == "1" goto error_download

View File

@ -81,7 +81,7 @@ if not exist "%LIBPNG_SRC_DIR%" (
)
if not exist "%LIBPNG_TEMP_FILE_DIR%" (
echo %FILE_N% Using %LIBPNG_BASENAME% from backup.
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/libpng-%LIBPNG_VERSION%-src.zip', '%LIBPNG_TEMP_FILE_DIR%')"
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://carla-releases.s3.us-east-005.backblazeb2.com/Backup/libpng-%LIBPNG_VERSION%-src.zip', '%LIBPNG_TEMP_FILE_DIR%')"
)
if %errorlevel% neq 0 goto error_download
rem Extract the downloaded library

View File

@ -58,7 +58,7 @@ rem ../xerces-c-x.x.x-src.zip
set XERCESC_TEMP_FILE_DIR=%BUILD_DIR%%XERCESC_TEMP_FILE%
set XERCESC_REPO=https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-%XERCESC_VERSION%.zip
set XERCESC_BACKUP_REPO=https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/xerces-c-%XERCESC_VERSION%.zip
set XERCESC_BACKUP_REPO=https://carla-releases.s3.us-east-005.backblazeb2.com/Backup/xerces-c-%XERCESC_VERSION%.zip
rem ../xerces-c-x.x.x-source/
set XERCESC_SRC_DIR=%BUILD_DIR%%XERCESC_BASENAME%-%XERCESC_VERSION%-source\

View File

@ -55,7 +55,7 @@ set ZLIB_TEMP_FILE=%ZLIB_TEMP_FOLDER%.zip
set ZLIB_TEMP_FILE_DIR=%BUILD_DIR%%ZLIB_TEMP_FILE%
set ZLIB_REPO=https://www.zlib.net/zlib%ZLIB_VERSION:.=%.zip
set ZLIB_BACKUP_REPO=https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/zlib%ZLIB_VERSION:.=%.zip
set ZLIB_BACKUP_REPO=https://carla-releases.s3.us-east-005.backblazeb2.com/Backup/zlib%ZLIB_VERSION:.=%.zip
set ZLIB_SRC_DIR=%BUILD_DIR%%ZLIB_BASENAME%-source\
set ZLIB_INSTALL_DIR=%BUILD_DIR%%ZLIB_BASENAME%-install\

View File

@ -41,12 +41,14 @@ nav:
- 'CarSIM': 'tuto_G_carsim_integration.md'
- 'Chrono': 'tuto_G_chrono.md'
- 'MathWorks': 'large_map_roadrunner.md'
- 'NVIDIA SimReady': 'ecosys_simready.md'
- 'OpenDRIVE': 'adv_opendrive.md'
- 'PTV Vissim': 'adv_ptv.md'
- 'RSS': 'adv_rss.md'
- 'ROS': https://carla.readthedocs.io/projects/ros-bridge/en/latest/
- 'Scenic': 'tuto_G_scenic.md'
- 'SUMO': 'adv_sumo.md'
- 'SYNKROTRON': 'ecosys_synkrotron.md'
- Contributing:
- 'Guidelines': 'cont_contribution_guidelines.md'