Skip to content
Snippets Groups Projects
Commit 292b87fe authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Exit simulator

parent bf09c46c
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
cp Tools/posix_lldbinit build_posix_sitl_simple/src/firmware/posix/.lldbinit
cp Tools/posix.gdbinit build_posix_sitl_simple/src/firmware/posix/.gdbinit
SIM_PID=0
if [ "$3" == "jmavsim" ]
then
cd Tools/jMAVSim
ant
java -Djava.ext.dirs= -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp 127.0.0.1:14560 &
SIM_PID=echo $!
cd ../..
elif [ "$3" == "gazebo" ]
then
if [ -x "$(command -v gazebo)" ]
then
gazebo ${SITL_GAZEBO_PATH}/worlds/iris.world &
SIM_PID=echo $!
else
echo "You need to have gazebo simulator installed!"
exit 1
......@@ -31,3 +36,11 @@ then
else
./mainapp ../../../../$1
fi
if [ "$3" == "jmavsim" ]
then
kill -9 $SIM_PID
elif [ "$3" == "gazebo" ]
then
kill -9 $SIM_PID
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment