Skip to content

EKF2 not working with (only) External Vision inputs #19859

Description

@arthurBricq

Describe the bug

Hello everyone, I am not able to use EKF2 with inputs from my external VIO system. It seems like EKF2 is always trying to make the position (x,y) of the state converge to the origin (0,0). And the z part of the estimation is also wrong. I use the 1.13.0 release of the code on a pixhawk.

I followed the instructions of the documentation (refering to these links: https://docs.px4.io/v1.12/en/ros/external_position_estimation.html, https://docs.px4.io/v1.12/en/advanced_config/tuning_the_ecl_ekf.html) but I always encountered behavior where the EKF2 position simply does not follow the VIO output.

To Reproduce

I use a minimal setup with: a pixhawk, connected to a companion computer which sends odometry messages.

  • the odometry messages are well received and I can see them properly with MAV_ODOM_LP = 1 on the mavlink inspector. The odometry itself is not faulty (it was intensively verified)
  • the EKF2 has the following configuration:
param set EKF2_AID_MASK 280 (ev_evl, ev_pos, ev_yaw)
# or 
param set EKF2_AID_MASK 328 (ev_vel, ev_pos, rotate external vision)
# use vision for heigth fusion (same problem happens if I use barometer)
param set EKF2_HGT_MODE 3
# turn off the mag. fusion 
param set EKF2_MAG_TYPE 5
# the delay 
param set EKF2_EV_DELAY 150

The delay was found by rotating the drone around one of its axis and comparing the topics sensor_combined.gyroscope and vehicle_visual_odometry.

Expected behavior

I would expect the EKF2 filter to closely match the output of my external vision system (which is very precise), since I fuse no other additional data. But it really does not.

Log Files and Screenshots

Here I attach a log where I did some basic motions with my setup (crosses performed in the air, basically step functions of the drone): https://logs.px4.io/plot_app?log=1a9e5106-c592-48e4-aa23-d93627b1357d

We can see in the logs that the Visual Odometry Position describes this motion. However, when we look at the topic *Local Position X or Y, we see that the estimates always drift back to the (0,0) position.

It seems however that the speed estimate is pretty good.

I have tried many things but I can't find where is my mistake. Thanks in advance for the potential help ! Best

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions