From af1b4c473e99e19adec69c23770f86bb1711d179 Mon Sep 17 00:00:00 2001 From: Jaeyoung-Lim Date: Sat, 16 Jan 2021 15:30:27 +0100 Subject: [PATCH] Start user camera plugin This commit starts the gazebo_user_camera_plugin together with the gzclient, so that it is always following the vehicle --- Tools/sitl_run.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Tools/sitl_run.sh b/Tools/sitl_run.sh index 35280c011f..4118a807de 100755 --- a/Tools/sitl_run.sh +++ b/Tools/sitl_run.sh @@ -84,6 +84,8 @@ for file in "$@"; do cp "$file" $rootfs/ done +export PX4_SIM_MODEL=${model} + SIM_PID=0 if [ "$program" == "jmavsim" ] && [ ! -n "$no_sim" ]; then @@ -161,7 +163,7 @@ elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]; then # gzserver needs to be running to avoid a race. Since the launch # is putting it into the background we need to avoid it by backing off sleep 3 - nice -n 20 gzclient --verbose & + nice -n 20 gzclient --verbose --gui-client-plugin libgazebo_user_camera_plugin.so & GUI_PID=$! fi else @@ -204,9 +206,6 @@ fi echo SITL COMMAND: $sitl_command -export PX4_SIM_MODEL=${model} - - if [ "$debugger" == "lldb" ]; then eval lldb -- $sitl_command elif [ "$debugger" == "gdb" ]; then