First iteration 01

This commit is contained in:
sergi-e 2020-06-03 14:21:14 +02:00 committed by Marc Garcia Puig
parent 81db4204d9
commit 9b6e9fc2b0
4 changed files with 47 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -2340,7 +2340,7 @@ Will return <b>None</b> if the lane does not exist.
---
## carla.WeatherParameters<a name="carla.WeatherParameters"></a>
This class defines objects containing lightning and weather specifications that can later be applied in [carla.World](#carla.World). So far, these conditions only intervene with [sensor.camera.rgb](ref_sensors.md#rgb-camera). They neither affect the actor's physics nor other sensors.
This class defines objects containing lighting and weather specifications that can later be applied in [carla.World](#carla.World). So far, these conditions only intervene with [sensor.camera.rgb](ref_sensors.md#rgb-camera). They neither affect the actor's physics nor other sensors.
Each of these parameters acts indepently from the rest. Increasing the rainfall will not automatically create puddles nor change the road's humidity. That makes for a better customization but means that realistic conditions need to be scripted. However an example of dynamic weather conditions working realistically can be found [here](https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/dynamic_weather.py).
<h3>Instance Variables</h3>
@ -2352,8 +2352,10 @@ Rain intensity values range from 0 to 100, being 0 none at all and 100 a heavy r
Determines the creation of puddles. Values range from 0 to 100, being 0 none at all and 100 a road completely capped with water. Puddles are created with static noise, meaning that they will always appear at the same locations.
- <a name="carla.WeatherParameters.wind_intensity"></a>**<font color="#f8805a">wind_intensity</font>** (_float_)
Controls the strenght of the wind with values from 0, no wind at all, to 100, a strong wind. The wind does affect rain direction and leaves from trees, so this value is restricted to avoid animation issues.
- <a name="carla.WeatherParameters.falloff"></a>**<font color="#f8805a">falloff</font>** (_float_)
Density of the fog (as in specific mass). The bigger the value, the more dense and heavy it will be, and the fog will reach smaller heights. Corresponds to <a href="https://docs.unrealengine.com/en-US/Engine/Actors/FogEffects/HeightFog/index.html#:~:text=Using%20Exponential%20Height%20Fog%20Features,-The%20sections%20below&text=Add%20a%20second%20fog%20layer,height%20falloff%2C%20and%20height%20offset">Fog Height Falloff</a> in the UE docs. <br> If the value is 0, the fog will be lighter than air, and will cover the whole scene. <br> A value of 1 is approximately as dense as the air, and reaches normal-sized buildings. <br> For values greater than 5, the air will be so dense that it will be compressed on ground level.
- <a name="carla.WeatherParameters.fog_density"></a>**<font color="#f8805a">fog_density</font>** (_float_)
Fog density. It only affects the RGB camera sensor. Values range from 0 to 100.
Fog concentration or thickness. It only affects the RGB camera sensor. Values range from 0 to 100.
- <a name="carla.WeatherParameters.fog_distance"></a>**<font color="#f8805a">fog_distance</font>** (_float_)
Fog start distance (in meters). Values range from 0 to infinite.
- <a name="carla.WeatherParameters.wetness"></a>**<font color="#f8805a">wetness</font>** (_float_)

View File

@ -10,6 +10,9 @@ There are several tools provided by the CARLA team that allow users to edit maps
* [__Procedural buildings__](#add-serial-meshes)
* [Building structure](#building-structure)
* [Structure modifications](#structure-modifications)
* [__Weather customization__](#weather-customization)
* [BP_Weather](#bp_weather)
* [BP_Sky](#bp_sky)
!!! Important
This tutorial only applies to users that work with a build from source, and have access to the Unreal Editor.
@ -111,7 +114,7 @@ For each of them, except the __Roof__, there is a mesh to fill the center of the
The __Base parameters__ set the dimensions of the building.
* ___Num Floors__ — Floors of the building. Repetitions of the __Body__ meshes.
* __Num Floors__ — Floors of the building. Repetitions of the __Body__ meshes.
* __Length X and Length Y__ — Area of the building. Repetitions of the central meshes for each side of the building.
![bp_procedural_building_full](img/map_customization/BP_Procedural_Building_Full.jpg)
@ -129,6 +132,38 @@ There are some additional options to modify the general structure of the buildin
![bp_procedural_building_extras](img/map_customization/BP_Procedural_Building_Extras.jpg)
<div style="text-align: right"><i>On the left, a building with no cornes and one door. <br> On the right, a building with a wall applied to one side of the building. The wall is a texture with no fire escape.</i></div>
---
## Weather customization
The weather can be easily customized by the users in CARLA using the PythonAPI. However, there is some configuration that users can do in order to set the default weather for a map. The weather parameters available for configuration by the following blueprints, are the same accessible from the API. These are described [here](https://carla.readthedocs.io/en/latest/python_api/#carlaweatherparameters).
### BP_Weather
This blueprint is loaded into the world when the simulation starts. It contains the default weather parameters for every map, and these can be modified at will.
__1. Open the BP_Weather__ in `Content/Carla/Blueprints/Weather`.
__2. Go to the Weather group__ in the blueprint.
__3. Choose the desired town__ and modify the parameters.
![bp_weather_pic](img/map_customization/BP_Weather.jpg)<br>
<div style="text-align: right">
<i>Array containing default weather parameters for every CARLA map. Town01 opened.</i></div>
### BP_Sky
This blueprint groups all the weather parameters. It can be loaded into the scene when there is no CARLA server running, and used to easily test different configurations before setting a new default weather.
__1. Find the BP_Sky__ in `Content/Carla/Blueprints/Weather`.
__2. Load the blueprint in the scene.__ Drag it into the scene view.
__3. Edit the weather parameters.__ The weather in the scene will be updated accordingly.
!!! Important
If more than one blueprint is loaded into the scene, the weather will be duplicated with weird results, such as having two suns.
---
That is all there is so far, regarding the different map customization tools available in CARLA.

View File

@ -6,7 +6,7 @@
- class_name: WeatherParameters
# - DESCRIPTION ------------------------
doc: >
This class defines objects containing lightning and weather specifications that can later be applied in carla.World. So far, these conditions only intervene with [sensor.camera.rgb](ref_sensors.md#rgb-camera). They neither affect the actor's physics nor other sensors.
This class defines objects containing lighting and weather specifications that can later be applied in carla.World. So far, these conditions only intervene with [sensor.camera.rgb](ref_sensors.md#rgb-camera). They neither affect the actor's physics nor other sensors.
Each of these parameters acts indepently from the rest. Increasing the rainfall will not automatically create puddles nor change the road's humidity. That makes for a better customization but means that realistic conditions need to be scripted. However an example of dynamic weather conditions working realistically can be found [here](https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/dynamic_weather.py).
# - PROPERTIES -------------------------
instance_variables:
@ -30,10 +30,15 @@
doc: >
Controls the strenght of the wind with values from 0, no wind at all, to 100, a strong wind. The wind does affect rain direction and leaves from trees, so this value is restricted to avoid animation issues.
# --------------------------------------
- var_name: falloff
type: float
doc: >
Density of the fog (as in specific mass). The bigger the value, the more dense and heavy it will be, and the fog will reach smaller heights. Corresponds to <a href="https://docs.unrealengine.com/en-US/Engine/Actors/FogEffects/HeightFog/index.html#:~:text=Using%20Exponential%20Height%20Fog%20Features,-The%20sections%20below&text=Add%20a%20second%20fog%20layer,height%20falloff%2C%20and%20height%20offset">Fog Height Falloff</a> in the UE docs. <br> If the value is 0, the fog will be lighter than air, and will cover the whole scene. <br> A value of 1 is approximately as dense as the air, and reaches normal-sized buildings. <br> For values greater than 5, the air will be so dense that it will be compressed on ground level.
# --------------------------------------
- var_name: fog_density
type: float
doc: >
Fog density. It only affects the RGB camera sensor. Values range from 0 to 100.
Fog concentration or thickness. It only affects the RGB camera sensor. Values range from 0 to 100.
# --------------------------------------
- var_name: fog_distance
type: float