forked from Archive/PX4-Autopilot
sitl: add possibility to not run gazebo when running make
This commit is contained in:
parent
dd98ed565e
commit
93c1ad3103
|
@ -93,6 +93,8 @@ then
|
|||
elif [ "$program" == "gazebo" ] && [ ! -n "$no_sim" ]
|
||||
then
|
||||
if [ -x "$(command -v gazebo)" ]
|
||||
then
|
||||
if [[ -z "$DONT_RUN" ]]
|
||||
then
|
||||
# Set the plugin path so Gazebo finds our model and sim
|
||||
source $src_path/Tools/setup_gazebo.bash ${src_path} ${build_path}
|
||||
|
@ -109,6 +111,7 @@ then
|
|||
nice -n 20 gzclient --verbose &
|
||||
GUI_PID=`echo $!`
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "You need to have gazebo simulator installed!"
|
||||
exit 1
|
||||
|
@ -124,8 +127,11 @@ sitl_command="$sudo_enabled $sitl_bin $no_pxh $chroot_enabled $src_path $src_pat
|
|||
|
||||
echo SITL COMMAND: $sitl_command
|
||||
|
||||
if [[ -n "$DONT_RUN" ]]
|
||||
then
|
||||
echo "Not running simulation (\$DONT_RUN is set)."
|
||||
# Start Java simulator
|
||||
if [ "$debugger" == "lldb" ]
|
||||
elif [ "$debugger" == "lldb" ]
|
||||
then
|
||||
lldb -- $sitl_command
|
||||
elif [ "$debugger" == "gdb" ]
|
||||
|
@ -153,6 +159,8 @@ else
|
|||
$sitl_command
|
||||
fi
|
||||
|
||||
if [[ -z "$DONT_RUN" ]]
|
||||
then
|
||||
if [ "$program" == "jmavsim" ]
|
||||
then
|
||||
pkill -9 -P $SIM_PID
|
||||
|
@ -164,3 +172,4 @@ then
|
|||
kill -9 $GUI_PID
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue