mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Tools: add env variable to disable follow mode
This adds the env variable PX4_NO_FOLLOW_MODE to disable the follow mode in Gazebo.
This commit is contained in:
@@ -49,6 +49,13 @@ else
|
||||
verbose=""
|
||||
fi
|
||||
|
||||
# Disable follow mode
|
||||
if [[ "$PX4_NO_FOLLOW_MODE" != "1" ]]; then
|
||||
follow_mode="--gui-client-plugin libgazebo_user_camera_plugin.so"
|
||||
else
|
||||
follow_mode=""
|
||||
fi
|
||||
|
||||
if [ "$program" == "jmavsim" ]; then
|
||||
jmavsim_pid=`ps aux | grep java | grep "\-jar jmavsim_run.jar" | awk '{ print $2 }'`
|
||||
if [ -n "$jmavsim_pid" ]; then
|
||||
@@ -163,7 +170,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 --gui-client-plugin libgazebo_user_camera_plugin.so &
|
||||
nice -n 20 gzclient --verbose $follow_mode &
|
||||
GUI_PID=$!
|
||||
fi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user