[SOLVED] Pixhawk Cube -- Vision crash

Hi everyone,

I am using a Pixhawk 2.1 Cube flight controller running PX4 1.8.2 on an Tarot 680 with a mapping payload (LIDAR and Jetson TX2), which is approximatively 2 kg.

I’ve been working for month in simulation (Gazebo) and my control seems good. Here’s a quick explanation of what it does.

  • Takeoff at 2m by sending a setpoint in position from topic mavros_msgs/PositionTarget
  • While we don’t receive any command from the RC, we hold a position.
  • When we receive a command from the RC, we send velocity

Today, we tried our first flight with the vision system. At first to be sure the drone was configured correctly, we made a flight in Altitude Mode. It went pretty well! So we change back our parameters to vision setting (EKF2_AID_MASK = 24, EKF2_HGT_MODE = 3, COM_RC_IN_MODE = 1), which was reset to default for the Altitude Mode.

So now we are ready to flight in Offboard Mode with the vision system. We arm the vehicle, still no problem. We takeoff at 2m has supposed and everything was good. Once we try commanding the drone, it started to fell slowly to ground until it crash…

I analyzed the log file from the SD Card and I can’t understand what happen. When I’m looking to the vision_pose/position topic it is following perfectly what the drone did, but the local_position/position actually didn’t follow the vision_pose topic…

Here’s the log file : https://logs.px4.io/plot_app?log=890298fd-a7fe-433d-a820-c3053d6dd5c5

To me it really look like the position wasn’t updated which made the drone crash, but I check odometry from my SLAM algorithm and it was updating at a minimum rate of 4 Hz, which is higher than the 2 Hz required by the Offboard Mode.

Here’s a last note, we actually use a Joystick which is read through USB.

This is my first post on this forum, so please let me know if you need more information or if there’s convention I didn’t follow!

Also, I will upload a video from the crash, once I get the hand on my camera.

1 Like

Ok, a little update about this problem. I think the problem come from the synchronization between the mavros node and the Pixhawk.

I’ve been able to reproduce a couple time the problem with my drone active, but without props and everytime the position start to differ from my vision pose, I received "WARNING [mavlink] [timesync] RTT too high for timesync: x

Maybe the Jetson is overwhelmed with the SLAM and cannot process everything on time!

Nevermind, the EKF is simply rejecting my vertical position (estimator_status_0.hgt_test_ratio) is really high. Need to find why, but maybe the drone is vibrating too much. The EKF still think he is taking altitude while he is in fact decreasing, so there’s no chance the innovation between state and sensors come close to the maximum allowed.