diff --git a/Makefile b/Makefile index cd15007625..c0413ea7ef 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,7 @@ run_sitl_quad: posix Tools/sitl_run.sh posix-configs/SITL/init/rcS none jmavsim run_sitl_iris: posix - Tools/sitl_run.sh posix-configs/SITL/init/rcS_iris_gazebo + Tools/sitl_run.sh posix-configs/SITL/init/rcS_iris_gazebo none gazebo run_sitl_plane: posix Tools/sitl_run.sh posix-configs/SITL/init/rc.fixed_wing diff --git a/Tools/sitl_run.sh b/Tools/sitl_run.sh index 1d80464fad..7bd1a75bb2 100755 --- a/Tools/sitl_run.sh +++ b/Tools/sitl_run.sh @@ -7,6 +7,15 @@ then ant java -Djava.ext.dirs= -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp 127.0.0.1:14560 & cd ../.. +elif [ "$3" == "gazebo" ] +then + if [ -x "$(command -v gazebo)" ] + then + gazebo ${SITL_GAZEBO_PATH}/worlds/iris.world & + else + echo "You need to have gazebo simulator installed!" + exit 1 + fi fi cd build_posix_sitl_simple/src/firmware/posix mkdir -p rootfs/fs/microsd