Hello!
I’ve setup all required software described in http://ardupilot.org/dev/docs/using-gazebo-simulator-with-sitl.html and also installed the patches from https://github.com/swiftgust/ardupilot_gazebo to be able to run Gazebo 8 (Actually I took this one step forward, and ported that to Gazebo 9 thanks to http://osrf-distributions.s3.amazonaws.com/gazebo/api/8.2.0/deprecated.html).
I checked out the latest ArduPilot version available on Github. I’m on the master branch.
I start the simulation as described with:
python2 sim_vehicle.py -v ArduCopter -f gazebo-iris -m --mav10 --map --console -I0
and in another terminal:
gazebo --verbose worlds/iris_irlock_demo.world
In MAVProxy I input these commands, after the drone is fully initialized and ready to go:
mode GUIDED
arm throttle
takeoff 30
Now the drone starts and takes off in Gazebo, but it quickly starts to drift off. When it reaches the desired height, the drone drifts more off and starts to go towards the ground.
Shouldn’t the drone just stay in the starting x,y coordinates and the specified height?
I also tested this under Ubuntu with Gazebo 8, without touching the source codes and I still get the same results, the drone crashes after it takes off.