Gazebo+SITL drone can't controlled

Hi

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.

Glen

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!

:slight_smile:

Hi

I didn’t solve this problem. But I found a guy made it on youtube: https://www.youtube.com/watch?v=-GLAiLSGvXE
He gave me good advice in comments of this video. It might be helpful for us as well.

Hi,

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?

Hi

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">
      <ode>
        <solver>
          <type>quick</type>
          <iters>100</iters>
          <sor>1.0</sor>
        </solver>
        <constraints>
          <cfm>0.0</cfm>
          <erp>0.9</erp>
          <contact_max_correcting_vel>0.1</contact_max_correcting_vel>
          <contact_surface_layer>0.0</contact_surface_layer>
        </constraints>
      </ode>
      <real_time_update_rate>1000</real_time_update_rate>
      <max_step_size>0.0010</max_step_size>
    </physics>

maybe you can try it.