-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New filter for distance sensor validation #24106
base: main
Are you sure you want to change the base?
Conversation
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 768 byte (0.04 %)]
px4_fmu-v6x [Total VM Diff: 768 byte (0.04 %)]
Updated: 2025-01-10T10:01:38 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if using sequential fusion would actually give nicer code in the end so you wouldn't need to build all those 2x2 matrices
src/modules/ekf2/EKF/aid_sources/range_finder/range_finder_consistency_check.cpp
Outdated
Show resolved
Hide resolved
src/modules/ekf2/EKF/aid_sources/range_finder/range_finder_consistency_check.cpp
Outdated
Show resolved
Hide resolved
src/modules/ekf2/EKF/aid_sources/range_finder/range_finder_consistency_check.hpp
Outdated
Show resolved
Hide resolved
src/modules/ekf2/EKF/aid_sources/range_finder/range_finder_consistency_check.cpp
Outdated
Show resolved
Hide resolved
499efdc
to
f7052d6
Compare
11655eb
to
9f42b6e
Compare
src/modules/ekf2/EKF/aid_sources/range_finder/range_finder_consistency_check.cpp
Outdated
Show resolved
Hide resolved
_time_last_horizontal_motion = time_us; | ||
} | ||
float p[4] = {z_var, 0.f, 0.f, z_var + dist_bottom_var}; | ||
_P = Matrix<float, RangeFilter::size, RangeFilter::size>(p); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_P = Matrix<float, RangeFilter::size, RangeFilter::size>(p); | |
_P = SquareMatrix<float, RangeFilter::size>(p); |
src/modules/ekf2/EKF/aid_sources/range_finder/range_finder_consistency_check.cpp
Outdated
Show resolved
Hide resolved
src/modules/ekf2/EKF/aid_sources/range_finder/range_finder_consistency_check.cpp
Outdated
Show resolved
Hide resolved
@dakejahl Does this help our height issues? |
9f42b6e
to
42ea74c
Compare
This was a quick indoor flight in manual mode. https://review.px4.io/plot_app?log=e3d3cf76-563d-4a23-9308-d37cbdcd34c3 Vs current main https://review.px4.io/plot_app?log=6d902213-02ef-4ff8-8474-d341bfcc7bd9 |
@AlexKlimaj Your vertical velocity estimate seems to be off quite a lot. Can you increase the bias noise on the acc so the bias will converge a bit quicker? The new filter uses the velocity estimate of the EKF to verify if the measurement is correct or not but when the EKF estimate is off and has a low uncertainty then it will discard the range measurements. |
42ea74c
to
e488ddb
Compare
Solved Problem
The distance sensor is being fused or used to reset the terrain state, even though its measurements do not accurately represent the distance to the ground due to obstructions caused by rain, snow, fog etc.
Solution
Now the distance sensor can be in 3 different states based on the lpf test ratio of a simple kalman filter:
consistent
,inconsistent
andunknown
. A terrain reset can only happen when the state is consistent. The sensor will be used for normal fusion in both consistent and inconsistent states. Together with the already existing fog detector, the robustness against sensor blockage/failure is increased.new:
old: