MAVROS Offboard example from developer guide not working on actual quadcopter


We are running the offb_node.cpp found here but our quadcopter iis not behaving as expected. Here are the flight logs. And here is a video.

As you can see it doesn’t take off and immediately starts drifting forward. While looking at the flight logs we noticed four main issues:

  1. Looking at the logs you can see that the altitude setpoint is set to zero.
  2. We noticed that the barometer altitude is at 270 m, do we need this to be enabled?
  3. Additionally, the vehicle keeps switching back and forth between Offboard mode and AutoLand for reasons that we cannot understand.
  4. Finally, it seems that the distance sensor is not working although we were able to see fairly accurate distance measurements displayed with QGroundControl analyzer, so we don’t understand why the log shows such bad estimate.

We would appreciate any help available.

  • Arnoldo

Are you using a mocap system?

I had the same problem and I solved it, changing the firmware to last version and modyfing parameters in my mocap software (motive optitrack).

So we are not using motion capture, we are using a PX4flow to stabilize position but we were not able to do that from position mode nor offboard mode.

Our next strategy is to try using motion capture but I feel there is a more fundamental problem going on. I just don’t know what.

Hello, guys! I have a similar problem. I am running the mavros offboard example on my quadcopter, with z=0.6. I am also using motion capture, but my drone doesn’t really take off, it just arms and moves to the side, not up. Here is the log file. Please check it out and help me understand what am I doing wrong. I am struggling with this for quite some time now. :slight_smile: