PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.41k stars 13.47k forks source link

Sensor priorities not used for EKF selection #22417

Open julianoes opened 11 months ago

julianoes commented 11 months ago

Describe problem solved by the proposed feature

From what I can see, the sensor priorities as set by the params CAL_ACCx_PRIO (and others for other sensors) are not used in the EKF selection.

Describe your preferred solution

Should we publish the sensor priority as part of the sensor_accel (and others) topics and then use them in the EKFSelector in the case when the "test ratio" is the same between multiple EKFs?

@dagar and @bresch do you have opinions?

Describe possible alternatives

Or should we remove these priorities altogether?

Additional context

FYI @vincentpoont2

bresch commented 11 months ago

Related to https://github.com/PX4/PX4-Autopilot/pull/21815

AlexKlimaj commented 11 months ago

We should keep the priorities. Publishing them as part of the sensor messages could clean up the logic. Ideally the multi ekf takes into account the imu and mag priorities when switching instances.

antonio-sc66 commented 10 months ago

Hi, @julianoes, that feature seems to work well but hasn't been integrated, not sure if they want me to explain anything about it. I will try to get it merged.

What I introduce in https://github.com/PX4/PX4-Autopilot/pull/21815 is the correct use of sensor priorities for the initial selection.

Not sure how it is being handled once the EKF is running and a change has to be done