From 01b280f7ae1e0b222ed0ea91062392e43b8d2c85 Mon Sep 17 00:00:00 2001 From: JaeyoungLim Date: Wed, 19 Feb 2020 09:46:38 +0100 Subject: [PATCH] Limit the number of vehicles --- Tools/gazebo_sitl_multiple_run.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tools/gazebo_sitl_multiple_run.sh b/Tools/gazebo_sitl_multiple_run.sh index 2f1b99fbe3..41cb6acd04 100755 --- a/Tools/gazebo_sitl_multiple_run.sh +++ b/Tools/gazebo_sitl_multiple_run.sh @@ -35,6 +35,12 @@ then exit 1 fi +if [ $num_vehicles -gt 255 ] +then + echo "Tried spawning $num_vehicles vehicles. The maximum number of supported vehicles is 255" + exit 1 +fi + SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" src_path="$SCRIPT_DIR/.."