Servers by jDrones

SITL with Gazebo: Drone crashes

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.

Hello,
thanks for report, I will look at it

Hello,

just some minor information:
I checked out a commit from 28.11.2017 (https://github.com/ArduPilot/ardupilot/commit/42e5b180cb4136275a116bccda74ea21cfe230da#diff-460241a402d32677bcde6618e6e880de) and there everything works as expected.

Currently I’m setting up my main PC (Notebook is a bit to slow for this) and than I will checkout out different commits, to see where things start to break.

Hey, was there any solution for this? Thanks

1 Like

Hi there, was any solution found?
Even for me, the drone is crashing after setting up the sitl and gazebo in ardupilot and it is crashing every time. Going out of bounds. Most of the times, it crashes while landing in mode rtl. Do you know why this might be happening?

Thanks.

Servers by jDrones