From be4391d6274fc3ff17a9ca004b648c3c1ac35a41 Mon Sep 17 00:00:00 2001 From: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:08:44 -0400 Subject: [PATCH] Added configuration files for sumo GUI settings (#154) Set Delay to 1000 ms per second to startup SUMO running at approximately real-time to avoid time sync issues with simulation and infrastructure # PR Details ## Description Due to this issue (https://github.com/usdot-fhwa-OPS/V2X-Hub/issues/540) the current time synchronization between infrastructure (V2X-Hub) and CDASim is non-time regulating, meaning Infrastructure does not currently have a way of notifying CDASim when it is ready for time to advance in simulation. Due to this, is simulation is running faster than real time, Infrastructure can begin to fall behind. To avoid this, this PR adds a GUI settings file to the SUMO GUI, which is used to play/pause/step through the simulation. In this settings file, we can configure the delay, a sumo GUI feature that controls how long, if at all, between time steps SUMO will wait before inform proceeding to the next time. Since SUMO's integration with CDASim is time regulating, this delay feature allow a use to modify the maximum speed at which the simulation can run. The new settings file configures this value to be 1000ms per 1s (~ real-time) at startup to avoid the need for manual configuration at start up ## Related Issue ## Motivation and Context Avoid (https://github.com/usdot-fhwa-OPS/V2X-Hub/issues/540) ## How Has This Been Tested? XIL-Cloud deployment ## Types of changes - [x] Defect fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that cause existing functionality to change) ## Checklist: - [ ] I have added any new packages to the sonar-scanner.properties file - [ ] My change requires a change to the documentation. - [] I have updated the documentation accordingly. - [x] I have read the **CONTRIBUTING** document. [CARMA Contributing Guide](Contributing.md) - [ ] I have added tests to cover my changes. - [x] All new and existing tests passed. --- .../assembly/resources/scenarios/Town04/sumo/Town04.sumocfg | 2 ++ .../assembly/resources/scenarios/Town04/sumo/gui.settings.xml | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 co-simulation/bundle/src/assembly/resources/scenarios/Town04/sumo/gui.settings.xml diff --git a/co-simulation/bundle/src/assembly/resources/scenarios/Town04/sumo/Town04.sumocfg b/co-simulation/bundle/src/assembly/resources/scenarios/Town04/sumo/Town04.sumocfg index f22dda7c..1c34184e 100644 --- a/co-simulation/bundle/src/assembly/resources/scenarios/Town04/sumo/Town04.sumocfg +++ b/co-simulation/bundle/src/assembly/resources/scenarios/Town04/sumo/Town04.sumocfg @@ -7,6 +7,8 @@ + + diff --git a/co-simulation/bundle/src/assembly/resources/scenarios/Town04/sumo/gui.settings.xml b/co-simulation/bundle/src/assembly/resources/scenarios/Town04/sumo/gui.settings.xml new file mode 100644 index 00000000..b02334f2 --- /dev/null +++ b/co-simulation/bundle/src/assembly/resources/scenarios/Town04/sumo/gui.settings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file