Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
bernatx committed Dec 22, 2020
2 parents b69df0b + 2e5f66e commit 78e7ea1
Show file tree
Hide file tree
Showing 246 changed files with 10,580 additions and 4,875 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ TrafficManager/build
Util/Build
Install
Plugins
!Unreal/CarlaUE4/Plugins

/ExportedMaps
/Import/*
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
## CARLA 0.9.11

* Improved the documentation for use with pandoc tool by converting html tags to their markdown equivalent
* Refactored FAQ section of docs to use minimal html and fix broken layout
* Extended the local planner with a lateral `offset`
* Upgraded to DirectX 12 on Windows
* Added the new core pipeline for the simulator
* Added parameter to carla settings to control culling
* Added fully deterministic option for Traffic Manager, sorting vehicles by ID and avoiding race conditions
* Added the option to sweep the wheel shape for collision. This requires to patch the engine
* Added the possibility of changing physics substepping options from client
* Added 'noise_seed' to sensors to initialize the random generators
* API extensions:
- Added `actor.set_enable_gravity()` function to enable/disable the gravity affecting the actor
- Added `load_map_layer` and `unload_map_layer` to control map layers on new maps that support subleveling
- Added `get_environment_objects`call to get all the placed objects in the level
- Added `enable_environment_objects`call to enable/disable objects of the level
- Added `horizontal_fov` parameter to lidar sensor to allow for restriction of its field of view
- Added `WorldSettings.deterministic_ragdolls` to enable deterministic or physically based ragdolls
* Fixed RSSSensor python3 build and import of open drive maps by updating to ad-rss v4.2.0 and ad-map-access v2.3.0. Python import of dependent 'ad' python modules reflects now the namespaces of the C++ interface and follow doxygen documentation
* Fixed sensor transformations and sensor data transformations mismatch in IMU and camera-based sensors
* Fixed random dead-lock on synchronous mode at high frame rate
* Fixed bug on Windows causing sun reflection artifacts
* Fixed bug in `waypoint.get_landmarks()` causing some landmarks to be missed when s = 0
* Fixed the `actor.set_simulate_physics()` for pedestrians and vehicles
* Fixed bug causing camera-based sensors to stop sending data
* Fixed the lack of determinism on the output of raycast sensors
* Fixed missing `laneChange` record in converted OSM maps
* Fixed bug in the actor's id returned by the semantic lidar
* Fixed error when using `--config` parameter in `make package`
* Fixed dependency of library **Xerces-c** on package
* Fixed minor typo in the simulation data section of the documentation
* Fixed the `config.py` to read the `.osm ` files in proper `utf-8` encoding

## CARLA 0.9.10

* Added retrieval of bounding boxes for all the elements of the level
Expand Down
3 changes: 3 additions & 0 deletions Co-Simulation/Sumo/run_synchronization.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def __init__(self,
settings.fixed_delta_seconds = self.carla.step_length
self.carla.world.apply_settings(settings)

traffic_manager = self.carla.client.get_trafficmanager()
traffic_manager.set_synchronous_mode(True)

def tick(self):
"""
Tick to simulation synchronization
Expand Down
198 changes: 65 additions & 133 deletions Docs/adv_recorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,16 @@ A playback can be started at any point during a simulation. Besides the path to
client.replay_file("recording01.log", start, duration, camera)
```

<table class ="defTable">
<thead>
<th>Parameter</th>
<th>Description</th>
<th>Notes</th>
</thead>
<tbody>
<td><code>start</code> </td>
<td>Recording time in seconds to start the simulation at.</td>
<td>If positive, time will be considered from the beginning of the recording. <br>If negative, it will be considered from the end.</td>
<tr>
<td><code>duration</code></td>
<td>Seconds to playback. 0 is all the recording.</td>
<td>By the end of the playback, vehicles will be set to autopilot and pedestrians will stop.</td>
<tr>
<td><code>camera</code></td>
<td>ID of the actor that the camera will focus on. </td>
<td>Set it to <code>0</code> to let the spectator move freely.</td>
</tbody>
</table>
| Parameter | Description | Notes |
| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `start` | Recording time in seconds to start the simulation at. | If positive, time will be considered from the beginning of the recording. <br> If negative, it will be considered from the end. |
| `duration` | Seconds to playback. 0 is all the recording. | By the end of the playback, vehicles will be set to autopilot and pedestrians will stop. |
| `camera` | ID of the actor that the camera will focus on. | Set it to `0` to let the spectator move freely. |

<br>



### Setting a time factor

The time factor will determine the playback speed. It can be changed any moment without stopping the playback.
Expand All @@ -92,22 +80,14 @@ The time factor will determine the playback speed. It can be changed any moment
client.set_replayer_time_factor(2.0)
```

<table class ="defTable">
<thead>
<th>Parameter</th>
<th>Default</th>
<th>Fast motion</th>
<th>Slow motion</th>
</thead>
<tbody>
<td><code>time_factor</code> </td>
<td><b>1.0</b></td>
<td><b>>1.0</b></td>
<td><b> <1.0 </b></td>
</tbody>
</table>
| Parameter | Default | Fast motion | Slow motion |
| ------------- | ------------- | ------------- | ------------- |
| `time_factor` | **1\.0** | **\>1.0** | ** <1.0 ** |

<br>



!!! Important
If `time_factor>2.0`, the actors' position interpolation is disabled and just updated. Pedestrians' animations are not affected by the time factor.

Expand Down Expand Up @@ -221,23 +201,14 @@ Detects vehicles that where stucked during the recording. An actor is considered
print(client.show_recorder_actors_blocked("recording01.log", min_time, min_distance))
```

<table class ="defTable">
<thead>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</thead>
<tbody>
<td><code>min_time</code> </td>
<td>Minimum seconds to move `min_distance`.</td>
<td>30secs.</td>
<tr>
<td><code>min_distance</code> </td>
<td>Minimum centimeters to move to not be considered blocked.</td>
<td>10cm.</td>
</tbody>
</table>
<br>
| Parameter | Description | Default |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `min_time` | Minimum seconds to move \`min\_distance\`. | 30secs. |
| `min_distance` | Minimum centimeters to move to not be considered blocked. | 10cm. |



---

!!! Note
Sometimes vehicles are stopped at traffic lights for longer than expected.
Expand Down Expand Up @@ -277,102 +248,63 @@ client.replay_file("col3.log", 34, 0, 173)

Some of the provided scripts in `PythonAPI/examples` facilitate the use of the recorder.



* __start_recording.py__ starts the recording. The duration of the recording can be set, and actors can be spawned at the beginning of it.

<table class ="defTable">
<thead>
<th>Parameter</th>
<th>Description</th>
</thead>
<tbody>
<td><code>-f</code> </td>
<td>Filename.</td>
<tr>
<td><code>-n</code><small> (optional)</small></td>
<td>Vehicles to spawn. Default is 10.</td>
<tr>
<td><code>-t</code><small> (optional)</small></td>
<td>Duration of the recording.</td>
</tbody>
</table>
<br>
| Parameter | Description |
| ------------------------------------------------------------- | ------------------------------------------------------------- |
| `-f` | Filename. |
| `-n`<small> (optional)</small> | Vehicles to spawn. Default is 10. |
| `-t`<small> (optional)</small> | Duration of the recording. |



* __start_replaying.py__ starts the playback of a recording. Starting time, duration, and actor to follow can be set.

<table class ="defTable">
<thead>
<th>Parameter</th>
<th>Description</th>
</thead>
<tbody>
<td><code>-f</code> </td>
<td>Filename.</td>
<tr>
<td><code>-s</code><small> (optional)</small></td>
<td>Starting time. Default is 10.</td>
<tr>
<td><code>-d</code><small> (optional)</small></td>
<td>Duration. Default is all.</td>
<tr>
<td><code>-c</code><small> (optional)</small></td>
<td>IDof the actor to follow.</td>
</tbody>
</table>
<br>

| Parameter | Description |
| ----------------------------- | ----------------------------- |
| `-f` | Filename. |
| `-s`<small> (optional)</small> | Starting time. Default is 10. |
| `-d`<small> (optional)</small> | Duration. Default is all. |
| `-c`<small> (optional)</small> | IDof the actor to follow. |




* __show_recorder_file_info.py__ shows all the information in the recording file. By default, it only shows frames where an event is recorded. However, all of them can be shown.

<table class ="defTable">
<thead>
<th>Parameter</th>
<th>Description</th>
</thead>
<tbody>
<td><code>-f</code> </td>
<td>Filename.</td>
<tr>
<td><code>-s</code><small> (optional)</small></td>
<td>Flag to show all details.</td>
</tbody>
</table>
<br>

| Parameter | Description |
| ------------------------------------------------------------- | ------------------------------------------------------------- |
| `-f` | Filename. |
| `-s`<small> (optional)</small> | Flag to show all details. |



* __show_recorder_collisions.py__ shows recorded collisions between two flags of actors of types __A__ and __B__. `-t = vv` would show all collisions between vehicles.

<table class ="defTable">
<thead>
<th>Parameter</th>
<th>Description</th>
</thead>
<tbody>
<td><code>-f</code> </td>
<td>Filename.</td>
<tr>
<td><code>-t</code></td>
<td>Flags of the actors involved. <br> <code>h</code> = hero <br> <code>v</code> = vehicle <br> <code>w</code> = walker <br> <code>t</code> = traffic light <br> <code>o</code> = other <br> <code>a</code> = any</td>
</tbody>
</table>
<br>

| Parameter | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-f` | Filename. |
| `-t` | Flags of the actors involved. <br>`h` = hero <br> `v` = vehicle <br> `w` = walker <br> `t` = traffic light <br>`o` = other <br>`a` = any |



* __show_recorder_actors_blocked.py__ lists vehicles considered blocked. Actors are considered blocked when not moving a minimum distance in a certain time.

<table class ="defTable">
<thead>
<th>Parameter</th>
<th>Description</th>
</thead>
<tbody>
<td><code>-f</code> </td>
<td>Filename.</td>
<tr>
<td><code>-t</code><small> (optional)</small></td>
<td>Time to move <code>-d</code> before being considered blocked.</td>
<tr>
<td><code>-d</code><small> (optional)</small></td>
<td>Distance to move to not be considered blocked.</td>
</tbody>
</table>
<br>

| Parameter | Description |
| -------------------------------------------------- | -------------------------------------------------- |
| `-f` | Filename. |
| `-t`<small> (optional)</small> | Time to move `-d` before being considered blocked. |
| `-d`<small> (optional)</small> | Distance to move to not be considered blocked. |





---
Now it is time to experiment for a while. Use the recorder to playback a simulation, trace back events, make changes to see new outcomes. Feel free to say your word in the CARLA forum about this matter.
Expand Down
26 changes: 11 additions & 15 deletions Docs/adv_rendering_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,17 @@ The simulation runs significantly faster in __Low__ mode. This is not only used

The images below compare both modes. The flag used is the same for Windows and Linux. There is no equivalent option when working with the build, but the UE editor has its own quality settings. Go to `Settings/Engine Scalability Settings` for a greater customization of the desired quality.

<table class ="defTable">
<tbody>
<td><b>Epic mode</b></td>
<tr>
<td><code>./CarlaUE4.sh -quality-level=Epic</code></td>
<tr>
<td><img src="../img/rendering_quality_epic.jpg"><br><br><div align="right"><i>Epic mode screenshot</i></div></td>
<tr>
<td><b>Low mode</b></td>
<tr>
<td><code>./CarlaUE4.sh -quality-level=Low</code></td>
<tr>
<td><img src="../img/rendering_quality_low.jpg"><br><br><div align="right"><i>Low mode screenshot</i></div></td>
</tbody>
</table>
#### Epic mode
`./CarlaUE4.sh -quality-level=Epic`

![Epic mode screenshot](img/rendering_quality_epic.jpg)
*Epic mode screenshot*

#### Low mode
`./CarlaUE4.sh -quality-level=Low`

![Low mode screenshot](img/rendering_quality_low.jpg)
*Low mode screenshot*

<br>

Expand Down
25 changes: 16 additions & 9 deletions Docs/adv_rss.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,24 @@ The following image sketches the integration of __RSS__ into the CARLA architect
![Interate RSS into CARLA](img/rss_carla_integration_architecture.png)

__1. The server.__
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__-__ Sends a camera image to the client. <small>(Only if the client needs visualization).</small>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__-__ Provides the RssSensor with world data.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__-__ Sends a physics model of the vehicle to the RssRestrictor. <small>(Only if the default values are overwritten).</small>

- Sends a camera image to the client. <small>(Only if the client needs visualization).</small>
- Provides the RssSensor with world data.
- Sends a physics model of the vehicle to the RssRestrictor. <small>(Only if the default values are overwritten).</small>

__2. The client.__
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__-__ Provides the *RssSensor* with some [parameters](https://intel.github.io/ad-rss-lib/ad_rss/Appendix-ParameterDiscussion/) to be considered.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__-__ Sends to the *RssResrictor* an initial [carla.VehicleControl](python_api.md#carla.VehicleControl).

- Provides the *RssSensor* with some [parameters](https://intel.github.io/ad-rss-lib/ad_rss/Appendix-ParameterDiscussion/) to be considered.
-Sends to the *RssResrictor* an initial [carla.VehicleControl](python_api.md#carla.VehicleControl).

__3. The RssSensor.__
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__-__ Uses the *ad-rss-lib* to extract situations, do safety checks, and generate a response.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__-__ Sends the *RssRestrictor* a response containing the proper response and aceleration restrictions to be applied.

- Uses the *ad-rss-lib* to extract situations, do safety checks, and generate a response.
- Sends the *RssRestrictor* a response containing the proper response and aceleration restrictions to be applied.

__4. The RssRestrictor__
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__-__ If the client asks for it, applies the response to the [carla.VehicleControl](python_api.md#carla.VehicleControl), and returns the resulting one.

- If the client asks for it, applies the response to the [carla.VehicleControl](python_api.md#carla.VehicleControl), and returns the resulting one.

[![RSS sensor in CARLA](img/rss_carla_integration.png)](https://www.youtube.com/watch?v=UxKPXPT2T8Q)
<div style="text-align: right"><i>Visualization of the RssSensor results.</i></div>
Expand Down Expand Up @@ -96,7 +103,7 @@ make package.rss

### RssSensor

[__carla.RssSensor__](python_api.md#carla.RssSensor) supports [ad-rss-lib v4.0.0 feature set](https://intel.github.io/ad-rss-lib/RELEASE_NOTES_AND_DISCLAIMERS) completely, including intersections, [stay on road](https://intel.github.io/ad-rss-lib/ad_rss_map_integration/HandleRoadBoundaries/) support and unstructured scenes (e.g. with pedestrians).
[__carla.RssSensor__](python_api.md#carla.RssSensor) supports [ad-rss-lib v4.2.0 feature set](https://intel.github.io/ad-rss-lib/RELEASE_NOTES_AND_DISCLAIMERS) completely, including intersections, [stay on road](https://intel.github.io/ad-rss-lib/ad_rss_map_integration/HandleRoadBoundaries/) support and [unstructured constellations (e.g. with pedestrians)](https://intel.github.io/ad-rss-lib/ad_rss/UnstructuredConstellations/).

So far, the server provides the sensor with ground truth data of the surroundings that includes the state of other traffic participants and traffic lights.

Expand Down
Loading

0 comments on commit 78e7ea1

Please # to comment.