Skip to content

Commit d7b45c1

Browse files
committed
Merge branch 'dev'
2 parents 92111a2 + 25623bf commit d7b45c1

File tree

823 files changed

+50507
-2890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

823 files changed

+50507
-2890
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Util/Build
77
Install
88
Plugins
99
!Unreal/CarlaUE4/Plugins
10+
Unreal/CarlaUE4/Plugins/Streetmap
11+
Unreal/CarlaUE4/Plugins/HoudiniEngine
12+
1013

1114
/ExportedMaps
1215
/Import/*

.readthedocs.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Read the Docs configuration file for MkDocs projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
# Required
4+
5+
version: 2
6+
7+
# Set the version of Python and other tools you might need
8+
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.7"
13+
14+
mkdocs:
15+
configuration: mkdocs.yml
16+
17+
# Optionally declare the Python requirements required to build your docs
18+
19+
python:
20+
install:
21+
- requirements: Docs/requirements.txt

.readthedocs.yml

-14
This file was deleted.

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
## CARLA 0.9.15
2+
3+
* Added Digital Twins feature version 0.1. Now you can create your own map based on OpenStreetMaps
4+
* Added compatibility with SymReady Assets, using NVIDIA Omniverse
5+
* Added new maps: Town13 (is a large map) and Town15
6+
* The spectator will be used to load tiles and actor in Large Maps when no other actors with the rolename 'ego_vehicle' or 'hero' are present. Added the `spectator_as_ego` to the `carla.WorldSettings()` to allow users to disable this behavior.
7+
* Add keyword arguments for `carla.TrafficManager` Python API functions
8+
* Added build support for VS2022 and Ninja for LibCarla and osm2odr on Windows
9+
* Added empty actor
10+
* Restored gamma value to 2.2 instead of 2.4
11+
* CarlaExporter tool now exports the box collider and convex collider of the object if it has one, otherwise the mesh
12+
* Pedestrians with AI or in replayer are now faster around 10x. They have collisions disabled until they hit a vehicle.
13+
* Added API function to avoid replaying the spectator
14+
* `Client.set_replayer_ignore_spectator(bool)`
15+
* `start_replaying.py` using flag `--move-spectator`
16+
* Surface non-unity build mode by passing ARGS=--no-unity to make; allows IWYU-type errors to be unmasked and fixed.
17+
* Added maps, vehicles, pedestrians and props catalogues to the documentation
18+
* Collisions detected by the CollisionSensor no longer generate more than one event per frame.
19+
* Added API function to load a map only if it is different from the current one.
20+
* Fixed a bug in the TrafficManager causing vehicles that reached an ending lane to have abnormal behavior while lane changing.
21+
* Fixed bug causing the TM's unstuck logic to incorrectly remove the vehicles in some situations.
22+
* Fixed the extra data in Directx textures, so we need to copy row by row on Windows to remove extra bytes on images
23+
* Fixed vertices of big meshes (more than 65k vertices) in CarlaExporter
24+
* Fixed sensors to check for the stream to be ready (race condition)
25+
* Fixed bug causing the `FPixelReader::SavePixelsToDisk(PixelData, FilePath)` function to crash due to pixel array not set correctly.
26+
* Fixed segfaults in Python API due to incorrect GIL locking under Python 3.10.
27+
* Fixed the import script, where could use any other TilesInfo.txt if the destination folder has many
28+
129
## CARLA 0.9.14
230

331
* Fixed tutorial for adding a sensor to CARLA.
@@ -29,6 +57,7 @@
2957
* Python agents now accept a carla.Map and GlobalRoutePlanner instances as inputs, avoiding the need to recompute them.
3058
* Python agents now have a function to lane change.
3159
* Python agents now detect vehicle in adjacent lanes if invaded due to the offset.
60+
* Python agents now have the offset exposed.
3261
* Fixed bug causing the python agents to sometimes not detect a blocking actor if there were severral actors around it.
3362
* Improved Python agents performance for large maps.
3463
* Fix a bug at `Map.get_topology()`, causing lanes with no successors to not be part of it.

Docs/adv_digital_twin.md

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
!!! note
2+
The __Digital Twin Tool__ is currently an __experimental feature__ and is not considered *production ready* at this stage. Some parts of maps may be undecorated or untextured. Hence it should only be used for experimental research projects.
3+
4+
# Digital Twin Tool
5+
6+
![digital_twin_pipeline](img/pipeline.jpg)
7+
8+
- [__Downloading and preparing OSM map data__](#downloading-and-preparing-osm-map-data)
9+
- [__OpenStreetMap browser__](#openstreetmap-browser)
10+
- [__Procedural environment generation__](#procedural-environment-generation)
11+
- [Road decoration](#overview)
12+
- [Buildings](#alsm)
13+
- [__Generate the map__](#generate-the-map)
14+
- [__Save the map__](#save-the-map)
15+
16+
The __Digital Twin Tool__ enables procedural generation of unique 3D environments based on road networks derived from the [OpenStreetMap](https://www.openstreetmap.org) (OSM) service. Through the Digital Twin Tool interface in CARLA's Unreal Engine editor a user can select a region of map from OSM and download the road network as the basis for a new CARLA map. The tool then fills the spaces between the roads with procedurally generated 3D buildings that adjust to the layout of the road, creating a realistic 3D road environment with high variability.
17+
18+
## Building the OSM renderer
19+
20+
If you are using Linux, you have the option of using the OSM renderer in the CARLA interface to navigate a large OSM map region that you have downloaded. You first need to build the OSM renderer. Run `make osmrenderer` inside the CARLA root directory. You may need to upgrade your version of CMake to v3.2 or above in order for this to work. This will create two folders in your build directory called `libosmcout-source` and `libosmcout-build`. Windows users do not have the option of using the OSM renderer and must use directly a URL.
21+
22+
## Downloading and preparing OSM map data
23+
24+
![osm_website](img/osm_export.png)
25+
26+
In a web-browser, go to the [OpenStreetMap website](https:/www.openstreetmap.org) and choose an area of the map which you would like to use. Define your region and then export the data as an `.osm` file, or you can use a URL, as explained later. Alternatively, you could use other tools based on the OpenStreetMap service such as [GeoFabrik](https://download.geofabrik.de/), which allows specific map regions such as states or territories to be extracted from the OSM data.
27+
28+
There are two ways to use the OSM data. Using a URL or downloading an OSM file:
29+
30+
### Using a URL
31+
32+
In the [OpenStreetMap website](https:/www.openstreetmap.org) website, navigate to an area of interest, then press `Export`, you may also want to use the `Manually select a different area` option. Then, right click on `Overpass API` and select `Copy link` from the context menu. You must ensure that the file will be no bigger than 1 Gb. Take this link and paste it into the URL field of the interface.
33+
34+
### Downloading an OSM file and navigating in the interface
35+
36+
This option is only available to Linux users. You may download a larger region of map, for example an entire state or territory, then use the OSM interface in CARLA to navigate the map using the arrow and zoom buttons. Download your desired region of OSM data as a `.osm` file, then place this file in the `{CARLA_ROOT}/Build/libosmcout-source/maps/` folder. Open a terminal inside this folder and run the following command:
37+
38+
```sh
39+
cd {CARLA_ROOT}/Build/libosmcout-source/maps/
40+
./build.sh <path_to_osm_file>
41+
```
42+
43+
## OpenStreetMap browser
44+
45+
To open the OSM browser, open the content browser and navigate to `CarlaToolsContent/OnroadMapGenerator`. Right click on *UW_OnRoadMainWidget* and select *Launch Editor Utility Widget* from the context menu. This will open the tool's interface.
46+
47+
![osm_interface_open](img/digital_twins_widget.png)
48+
49+
The interface enables browsing of a region of OSM map that has been downloaded from the OSM database and baked. First, you should enter the directory location where you stored the processed OSM data in the previous step in the *Select OSM Database* field in the interface. If you are using a URL directly, paste it into the `OSM URL` field, you will not be able to use the navigator in this case.
50+
51+
![osm_interface](img/digital_twins_interface.png)
52+
53+
Use the directional arrows and the zoom icons to navigate the map and find a part of the road network you want to turn into a CARLA map. The square region you see in the preview will be the extent of your map. Enter an appropriate name in the `File Name` field and then press *generate* to start the procedural generation process. The map generation process may take several minutes, or more if you are using a large region.
54+
55+
## Procedural environment generation
56+
57+
### Road decoration
58+
59+
The tool extracts the road network from the OSM data as the basis of the map. The road surface is decorated with realistic surface irregularities, road markings and textures.
60+
61+
![road_markings](img/road_surface.jpg)
62+
63+
### Buildings
64+
65+
The empty spaces between the roads are populated with buildings or open areas that will adjust their shape and dimensions to fill the space between the roads.
66+
67+
![procedural_buildings](img/procedural_building_generation.jpg)
68+
69+
The procedural generation tool extracts the building footprints and height information from the OSM data to generate virtual buildings with similar dimensions. Detailed cladding is applied to simulate windows, doors and balconies. Different decoration styles are applied depending upon the dimensions of the building, with the tallest buildings having an office style, smaller buildings have a commercial or residential style applied according to the area of the building footprint.
70+
71+
![procedural_cities](img/digital_twins_vegetation.jpg)
72+
73+
Vegetation is also added to the pavements in the next step step for additional detail.
74+
75+
![residential_building_style](img/digital_twins_buildings.jpg)
76+
*Digital Twin Tool building styles*
77+
78+
The buildings are in a variety of styles that are randomly distributed throughout the city, the architectural style of an area is chosen based on the characteristic dimensions of the buildings extracted from the OSM data.
79+
80+
## Generate the map
81+
82+
The generation step will take around 10 minutes for a 2x2 km<sup>2</sup> region, larger regions will take longer. Once the generation process has finished, you can examine the map in 3D in the Unreal Engine editor.
83+
84+
## Save the map
85+
86+
If you are satisfied with the generated map then you can press *Save Map* button to save the map. __This step will take a significant amount of time__, it may take over an hour and could take several. You should prepare to leave your computer running for several hours while this step is completed. Once this step is completed, the map will be available through the Unreal Engine editor or through the CARLA API, the same as any other map.
87+

Docs/adv_procedural_building_tool.md

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
!!! note
2+
The __Procedural Building Tool__ is currently an __experimental feature__ and is not considered *production ready* at this stage. Hence it should only be used for experimental research projects.
3+
4+
# Procedural Building Tool
5+
6+
The __Procedural Building Tool__ facilitates the generation of virtual 3D buildings for which the dimensions and decoration styles can be modulated to create a near infinite array of variations through a simple interface. The footprint dimensions and height in stories can be chosen through the interface. Then users can select a variety of styles for the building lobby, the body and the top floor or penthouse. A variety of facia element styles can be chosen for features such as corners windows and balconies from the CARLA asset library.
7+
8+
- [__Opening the tool__](#opening-the-procedural-building-tool)
9+
- [__Base parameters__](#base-parameters)
10+
- [__Mesh parameters__](#mesh-parameters)
11+
- [__Mesh elements__](#mesh-elements)
12+
- [Sockets](#sockets)
13+
- [__Facade materials__](#facade-materials)
14+
- [__Cooking__](#cooking)
15+
16+
## Opening the Procedural Building Tool
17+
18+
Firstly, you need to add a procedural building actor to the scene. Navigate to `Content>Carla>Blueprints>LevelDesign` and drag the *BP_ProceduralBuilding* blueprint into your map. Move the asset to the position where you wish to visualize the building. Choose a place where you have space so you can see the result clearly. Then to open the tool, launch the Procedural Building tool by right clicking on the *WD_ProceduralBuilding* widget and selecting *Run editor utility widget* from the context menu. This will open the tool's interface.
19+
20+
![open_pb_tool](img/open_pb_tool.png)
21+
22+
!!! note
23+
You must complete this step before opening the tool, an instance of the *BP_ProceduralBuilding* blueprint must exist in the map before the tool can function. You must also ensure that the *BP_ProceduralBuilding* entity is selected in the *World outliner* before proceeding.
24+
25+
## Base parameters
26+
27+
![base_parameters](img/pb_base_parameters.png)
28+
29+
In the base parameters section you select the fundamental properties of your building, such as the footprint and the height in floors.
30+
31+
!!! note
32+
Until you have selected mesh pieces in the [mesh parameters](#mesh-parameters) section, you will not see any changes in the Unreal Engine viewport when you adjust the base parameters
33+
34+
The available parameters are as follows:
35+
36+
- __Seed__: sets the random seed for the procedural generation, this enables variations on the building with the same settings.
37+
- __Num floors__: sets the number of stories or floors the building will have, and henceforth defines the height of the building.
38+
- __Length X/Y__: defines the size of the footprint of the building in the X and Y dimensions. These are unitless, the number denotes the number repeating sections, each section is a column of windows.
39+
- __Create automatically__: if this option is selected, the building will automatically update in the viewport so you can see the effect of your adjustments.
40+
- __Corners__: allows corner pieces to be added to the building, you can choose these pieces in the Mesh Parameters section.
41+
- __Walls__: replace the middle pieces of the left/right/front/back of the building with alternate pieces that can be selected using the [Mesh parameters](#mesh-parameters) menu.
42+
- __Doors__: array allowing the placement of a door in the lobby level. The door is placed at the chosen index position.
43+
44+
## Mesh parameters
45+
46+
![mesh_parameters](img/pb_mesh_parameters.png)
47+
48+
In the Mesh Parameters tab in the interface, we choose the mesh pieces that will be used to clad the exterior of the building. There are 5 categories of mesh pieces for different parts of the building:
49+
50+
- __Lobby__: mesh pieces to decorate the lobby of the building.
51+
- __Midsection__: mesh pieces to decorate the midsection of the building, every floor between the lobby and the top floor.
52+
- __Penthouse__: mesh pieces to decorate the penthouse level.
53+
- __Doors__: mesh pieces to add doors to the lobby
54+
- __Walls__: mesh pieces to decorate the walls of the building
55+
56+
In each category you will find numerous options for mesh pieces. Click on one or more such that they turn red, these will be added to the respective section of your building. If you choose more than one, the tool will randomly alternate between the choices. As you select the mesh pieces for each section of your building, if you have *Create automatically* selected in the base parameters section, you will see the building taking shape in the editor viewport.
57+
58+
![building_parts](img/pb_building_parts.png)
59+
60+
## Mesh elements
61+
62+
![mesh_elements](img/pb_mesh_elements.png)
63+
64+
In this section you can select the more detailed elements of the building such as windows, columns, plant pots, air conditioning units and antennas. Each type of decoration has slightly different properties.
65+
66+
There are numerous types of decoration for details of the building:
67+
68+
- __Vertical/Horizontal window meshes__: these mesh pieces define the style of the window frames in the building. Vertical window meshes will occupy the window spaces that are taller than their width, while horizontal window meshes will occupy the window spaces that are wider than their height. If you select multiple options, they will alternate.
69+
70+
- __Column meshes__: these simulate brickwork column details that span the height of the building
71+
72+
- __Top/Bottom window details__: these meshes decorate the top of the windows with lintels and sunshades and the bottom of the windows with window sills and plant boxes.
73+
74+
- __Window columns__: brickwork columns that separate windows
75+
76+
- __Curtain meshes__: curtains and blinds to go inside the windows
77+
78+
- __Pot meshes__: plant pots that are added to window sills and plant boxes at specified socket points
79+
80+
- __Air conditioner meshes__: air conditioning units that are added to the windows at specified socket points
81+
82+
- __Pipe meshes__: pipes that descend the building vertically mimicking drainage pipes for the roof
83+
84+
- __Wire meshes__: wires that descend the building vertically mimicking TV aerial extensions and lightning grounding wires
85+
86+
- __Antenna meshes__: TV antennas that protrude from the windows
87+
88+
![mesh_variations](img/pb_detail_variations.webp)
89+
90+
The parameters work as follows:
91+
92+
__Common parameters__:
93+
94+
* __Percentage__: controls the amount pieces that will be placed on the building, 100% means all available spaces will be occupied
95+
* __Offset__: spacial offset of the piece from the body of the building
96+
97+
__Blinds and curtains__:
98+
99+
* __Min/Max size__: selects the min/max length of the blinds or curtains with random variation between the values. 1.0 is fully shut, 0.0 is fully open.
100+
101+
__Pipes and wires__:
102+
103+
* __Index__: defines the face of the building where the pipe will be placed
104+
* __Offset side/front__: adds a spatial offset to the piece from the center of the face of the building
105+
106+
!!! note
107+
You may find in some cases that when you choose detail mesh pieces such as plant pots, antennas and air conditioning units, you don't see any change in the building. This is most likely because the pieces you are using don't have the appropriate sockets needed to add the pieces you chose. Refer to the [sockets section](#sockets) to learn how to use sockets
108+
109+
### Sockets
110+
111+
![socket_details](img/pb_detail_section.png)
112+
113+
Sockets are anchor points which define where to place detail meshes on another mesh piece. To add sockets to the mesh pieces in the procedural building, with the procedural building selected, go to the *details panel*, normally on the right hand side of the UE editor interface. In there, you will find the *Meshes* and *Detail meshes* panels. Open the relevant section to open the mesh piece where you wish to place the socket.
114+
115+
![mesh_details](img/pb_mesh_details.png)
116+
117+
Find the mesh on which you want to place a socket and double click the icon to open it in the editor. Click *create socket* to add a socket and name it using the following convention:
118+
119+
* Air conditioning unit: aa_*
120+
* Antennas: ant_*
121+
* Plant pots: pot_*
122+
123+
Replace the asterisk with an index, depending upon how many sockets you have, i.e. aa_0, aa_2, aa_3...
124+
125+
![socket_details](img/pb_add_socket.png)
126+
127+
When you click *Create socket* the socket will be instantiated in the editor with a 3D handle. Drag the socket to the desired position on the mesh, this is where your detail piece will appear attached to the unit.
128+
129+
## Facade materials
130+
131+
![facade_materials](img/pb_facade_materials.png)
132+
133+
In the facade materials tab, you can browse and preview the material that you want to decorate the walls of your building.
134+
135+
![facade_changes](img/pb_facade_changes.webp)
136+
137+
## Cooking
138+
139+
In the cooking tab, you initiate the combination of all the mesh pieces and materials you've selected into a single static mesh with associated materials and textures. An LOD texture of the building will also be created for the LOD. Specify a folder name in the interface where the assets for your new building will be saved.
140+
141+
Once you have cooked your building, you will then be able to place instances of the building in the map just like any other CARLA assets.
142+
143+
144+
145+
146+
147+
148+
149+
150+
151+
152+
153+

0 commit comments

Comments
 (0)