Gazebo+SITL drone can't controlled


I was following the “Using Gazebo with SITL”.
Gazebo, Mavproxy are started correctly. But I can’t control the drone over mavros. There are topics “mavros/set_point”. I sent message to them to arm throttle and takeoff, while there is no response.

So, I tried to takeoff drone through mavproxy command: “mode guided- arm throttle- takeoff 10”. Then, it takes off but cannot balance itself and crashes soon after takeoff. It looks like there are errors with imu feedback so drone cannot balance itself.

To summarize, my question is

  1. why drone cannot self balance?
  2. how to control the drone via mavros?
    Any advice appreciated.


Did you resolve this issue? The exact same thing happens to me, and I have no idea as to why! I even send alt_hold command (while in air, before crash), but it still crashes and burns.

I get no error messages.

(using ubuntu 14.04, gazebo v 2 (!), ros indigo, vm ware player)

have u solved this problem?
i am encountering the same problem, i don’t know why and how.
any suggestions are appreciated!



I didn’t solve this problem. But I found a guy made it on youtube:
He gave me good advice in comments of this video. It might be helpful for us as well.


Thanks for your reply.

i happened to seeking help from this nice guy too, from bitbucket, where the tutorial guides me. He gave me similar advices too, that to move to PX4, instead of using ardupilot.

have you worked well with the PX4 project? I think the ardupilot contains the PX4 as a submodule?


I just started work with PX4 project. My understanding is PX4 is upgrade
version of ardupilot. It’s easier to use.
In ardupilot, I always meets mag uncalibrated problems, caused its EKF
algorithm which make sensors too much sensitive to noise. In PX4, I never
meet this probelm.

it seems be good when I modify the physical property in .world file as below:

    <physics type="ode">

maybe you can try it.