From eeb90ac70aa63eaf7ade9060003004c587559c04 Mon Sep 17 00:00:00 2001 From: Beniamino Pozzan Date: Thu, 23 Mar 2023 21:58:26 -0700 Subject: [PATCH] gazebo-classic/sitl_mutliple_run.sh: start spawning drones from index 1 (#21183) Fix microdds key session collision when drones with index 0 and 1 are used together Signed-off-by: Beniamino Pozzan --- Tools/simulation/gazebo-classic/sitl_multiple_run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/simulation/gazebo-classic/sitl_multiple_run.sh b/Tools/simulation/gazebo-classic/sitl_multiple_run.sh index 9b15f652c3..114003163a 100755 --- a/Tools/simulation/gazebo-classic/sitl_multiple_run.sh +++ b/Tools/simulation/gazebo-classic/sitl_multiple_run.sh @@ -119,7 +119,7 @@ if [ -z ${SCRIPT} ]; then fi while [ $n -lt $num_vehicles ]; do - spawn_model ${vehicle_model} $n + spawn_model ${vehicle_model} $(($n + 1)) n=$(($n + 1)) done else @@ -140,7 +140,7 @@ else m=0 while [ $m -lt ${target_number} ]; do export PX4_SIM_MODEL=gazebo-classic_${target_vehicle} - spawn_model ${target_vehicle}${LABEL} $n $target_x $target_y + spawn_model ${target_vehicle}${LABEL} $(($n + 1)) $target_x $target_y m=$(($m + 1)) n=$(($n + 1)) done