From 3cb68ba6185bf198313e63a4dc7c4644e67c4b07 Mon Sep 17 00:00:00 2001 From: sergi-e Date: Wed, 15 Apr 2020 02:51:17 +0200 Subject: [PATCH] New iteration with ptv --- Docs/adv_ptv.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ Docs/adv_sumo.md | 2 +- Docs/index.md | 4 +++- mkdocs.yml | 1 + 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 Docs/adv_ptv.md diff --git a/Docs/adv_ptv.md b/Docs/adv_ptv.md new file mode 100644 index 000000000..9f1357286 --- /dev/null +++ b/Docs/adv_ptv.md @@ -0,0 +1,57 @@ +# PTV-Vissim co-simulation + +CARLA has developed a co-simulation feature with SUMO. This allows to distribute the tasks at will, and exploit the capabilities of each simulation in favour of the user. + +* [__Requisites__](#requisites) + * [Prepare a SUMO environment](#prepare-a-sumo-environment) +* [__Run the co-simulation__](#run-the-co-simulation) + * [Spawn vehicles](#spawn-vehicles) + +--- +## Requisites + +First and foremost, it is necessary to [__install SUMO__](https://sumo.dlr.de/docs/Installing.html) to run the co-simulation. + +Once that is done, the SUMO environment has to be set to run the co-simulation. + +### Prepare a PTV-Vissim environment + + + +--- +## Run the co-simulation + +Everything related with this feature can be found in `Co-Simulation/PTV-Vissim`. Several examples are provided for some CARLA maps, specifically __Town01__, and __Town03__. These contain some basic PTV-Vissim environments that will ease the usage of the feature. + +```sh +python3 run_synchronization.py examples/Town03/Town03.inpx +``` + +Both simulations will run in synchrony. The actions or events happening in one simulator will propagate to the other, e.g. positions, spawning, vehicle lights, etc. + +Traffic lights As long as they are defined in the OpenDRIVE road map, they will be generated in SUMO. Now the synchronization script has some additional arguments. +> Landmarks? +> Pedestrians? + +!!! Important + SUMO Traffic lights will not be generated in the released CARLA maps. They were added manually and cannot be retrieved from the OpenDRIVE. + + +### Spawn vehicles + +> Not exactly the same. Similar characteristics. +> Amount of vehicles spawned in CARLA must be stated previously. Default is one. + + +--- + +That is all there is so far, regarding for the PTV-Vissim co-simulation with CARLA. + +Open CARLA and mess around for a while. If there are any doubts, feel free to post these in the forum. + +
+

+ +CARLA forum +

+
diff --git a/Docs/adv_sumo.md b/Docs/adv_sumo.md index 377a13e13..adc2b8465 100644 --- a/Docs/adv_sumo.md +++ b/Docs/adv_sumo.md @@ -77,7 +77,7 @@ python spawn_sumo_npc.py -n 10 --tls-manager carla --sumo-gui --- -That sets the basics regarding the RSS sensor in CARLA. Find out more about the specific attributes and parameters in the [sensor reference](ref_sensors.md#rss-sensor). +That is all there is so far, regarding for the SUMO co-simulation with CARLA. Open CARLA and mess around for a while. If there are any doubts, feel free to post these in the forum. diff --git a/Docs/index.md b/Docs/index.md index a8b135794..bc9689cf0 100644 --- a/Docs/index.md +++ b/Docs/index.md @@ -60,7 +60,9 @@ CARLA forum ## Advanced steps

[__OpenDRIVE standalone mode__](adv_opendrive.md) - — Use any OpenDRIVE file as a CARLA map. + — Use any OpenDRIVE file as a CARLA map. + [__PTV-Vissim co-simulation__](adv_ptv.md) + — Run a synchronous simulation between CARLA and PTV-Vissim. [__Recorder__](adv_recorder.md) — Register the events in a simulation and play it again. [__Rendering options__](adv_rendering_options.md) diff --git a/mkdocs.yml b/mkdocs.yml index b7cb8c193..b4b73e233 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -25,6 +25,7 @@ nav: - '4th. Sensors and data': 'core_sensors.md' - Advanced steps: - 'OpenDRIVE standalone mode': 'adv_opendrive.md' + - 'PTV-Vissim co-simulation': 'adv_ptv.md' - 'Recorder': 'adv_recorder.md' - 'Rendering options': 'adv_rendering_options.md' - 'RSS sensor': 'adv_rss.md'