forked from Archive/PX4-Autopilot
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:
parent
4a7b2c490a
commit
c13266ad26
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue