1.14 firmware cannot use mocap for indoor flight

Good morning everyone;

I am trying to use motion capture systems (mocap) for indoor drone flight. I am using firmware version 1.14.3. The mocap data is sent to the flight controller via MAVROS from the onboard computer (orin nx). However, I am encountering several errors reported by QGC, and the drone cannot arm. I suspect that I have not set the parameters correctly or the MAVROS messages do not specify the frame_id.

Interestingly, when I use firmware version 1.13.3, the drone can fly normally with no changes to the onboard computer code except for one place. In the messages sent to the flight controller, I did not even set vision.header.frame_id = “??”; I am unsure what to write here, but the flight controller operates correctly in position mode.

My hardware and software architecture is composed of:

  • Pixhawk 6c, Firmware 1.14.3

  • orin nx,ros1,ubuntu 20.04

  • optitrack

The orin nx is connected to the Pixhawk by USB, where MAVROS is initialized. It gets data from Mocap , perform coordinate transformation, and then send the data to the Pixhawk via USB.

To fuse vision data with EKF, I followed this one:Using Vision or Motion Capture Systems for Position Estimation , and I configured the EKF as follows:
EKF2_EV_CTRL = horizontal posion + vertical posion + yaw ;(11)
EKF2_HGT_REF = Vision;
EKF2_EV_DELAY = 0;

Here is the ros node in orin nx i send the data to pixhawk:

The topic of orin nx running output is as shown in the figure
2024-07-14 00-27-17屏幕截图

But QGC always prompts error:
yaw estimate error no valid
local position estimate
heading estimate not stable
2024-07-14 00-28-10屏幕截图

Additionally, I can see the VISION_POSITION_ESTIMATE message and LOCAL_POSITION_NEDin the real-time MAVLink messages detected by MAVLink.


when I use firmware version 1.13.3,I configured the EKF as follows:
EKF2_AID_MASK Set vision position fusion, vision yaw fusion and external vision rotation
EKF2_HGT_MODE Set to Vision to use the vision a primary source for altitude estimation.|
EKF2_EV_DELAY 0ms
After addressing this, QGC shows ready to fly in position mode, and the drone can fly indoors directly.

I am very puzzled. I think sending mocap positioning data to the flight controller should be a simple task, but why does version 1.14 always report errors? I have used not only 1.14.3 but also 1.14 stable, and both have the same errors! However, when I switch the firmware to 1.13, the above problems do not occur, and the drone can fly normally. This problem has been troubling me for several days, and I am getting frustrated. How can I solve this problem?

I hope someone can help me. Thank you in advance.

I also encountered this problem, and the problem was solved after turning off the EKF2 of the magnetometer. It is recommended to try turning off the EKF2 of GPS, magnetometer and barometer. Hope this helps you