From b184ec652b1b8330ef4072c505caa88a165f95f2 Mon Sep 17 00:00:00 2001 From: Aidan Clear Date: Tue, 12 Mar 2019 15:58:11 +0100 Subject: [PATCH] Updating carla settings to allow user to disable rendering and set server tieout from the command line --- CHANGELOG.md | 1 + Docs/configuring_the_simulation.md | 2 ++ .../Plugins/Carla/Source/Carla/Settings/CarlaSettings.cpp | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6186fb4fc..52e85610c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## Latest Changes + * Allow user to disable rendering and set the server timeout from the command line * Allow usage of hostname for carla::Client and resolve them to IP address * Added `map.transform_to_geolocation` to transform Location to GNSS GeoLocation * Added `id` property to waypoints, uniquely identifying waypoints up to half centimetre precision diff --git a/Docs/configuring_the_simulation.md b/Docs/configuring_the_simulation.md index d229456e3..a70493964 100644 --- a/Docs/configuring_the_simulation.md +++ b/Docs/configuring_the_simulation.md @@ -88,6 +88,8 @@ Other command-line options * `-carla-port=N` Listen for client connections at port N, streaming port is set to N+1. * `-quality-level={Low,Epic}` Change graphics quality level, "Low" mode runs significantly faster. + * `-carla-server-timeout=10000ms` Set server timeout. + * `-no-rendering` Disable rendering. * [Full list of UE4 command-line arguments][ue4clilink]. [ue4clilink]: https://docs.unrealengine.com/en-US/Programming/Basics/CommandLineArguments diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.cpp index 23a32e745..0edb3476e 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Settings/CarlaSettings.cpp @@ -178,6 +178,14 @@ void UCarlaSettings::LoadSettings() { QualityLevel = QualityLevelFromString(StringQualityLevel, EQualityLevel::Epic); } + if (FParse::Value(FCommandLine::Get(), TEXT("-carla-server-timeout="), Value)) + { + ServerTimeOut = Value; + } + if (FParse::Param(FCommandLine::Get(), TEXT("-no-rendering"))) + { + bDisableRendering = true; + } } }