Skip to content
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

ekf2: simplify logic for inhibited consider states and covariance matrix fixes #22597

Merged
merged 10 commits into from
Jan 24, 2024

Conversation

dagar
Copy link
Member

@dagar dagar commented Jan 3, 2024

@dagar dagar requested a review from bresch January 3, 2024 18:14
@dagar dagar assigned dagar and bresch Jan 3, 2024
@dagar dagar added the EKF2 label Jan 3, 2024
@dagar dagar force-pushed the pr-ekf2_sensor_bias_consider_states branch from a719f20 to 1b48dfe Compare January 4, 2024 00:35
Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We need some testing now.

src/modules/ekf2/EKF/ekf.h Outdated Show resolved Hide resolved
@dagar dagar force-pushed the pr-ekf2_sensor_bias_consider_states branch from f3c0877 to f111988 Compare January 11, 2024 17:20
@dagar dagar changed the title [WIP] ekf2 simplify logic for inhibited consider states ekf2: simplify logic for inhibited consider states and covariance matrix fixes Jan 11, 2024
@dagar dagar marked this pull request as ready for review January 11, 2024 17:20
@dagar dagar force-pushed the pr-ekf2_sensor_bias_consider_states branch from f111988 to 3b98bb3 Compare January 12, 2024 16:46
…rix fixes

 - removes conservative accel bias variance limiting
 - force symmetry is skipped after fusion of NED vel/pos (a direct measurement)
 - mag and wind covariances no longer continuously reset when stopped

Co-authored-by: bresch <brescianimathieu@gmail.com>
@dagar dagar force-pushed the pr-ekf2_sensor_bias_consider_states branch from 3b98bb3 to acb0051 Compare January 12, 2024 20:20
@@ -60,7 +60,6 @@ void Ekf::controlAirDataFusion(const imuSample &imu_delayed)

if (_control_status.flags.fake_pos || (airspeed_timed_out && sideslip_timed_out && (_params.drag_ctrl == 0))) {
_control_status.flags.wind = false;
P.uncorrelateCovarianceSetVariance<State::wind_vel.dof>(State::wind_vel.idx, 0.f);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fully stopping wind might still make sense?

@dagar dagar requested a review from bresch January 23, 2024 00:31
@@ -182,7 +182,7 @@ TEST_F(EkfHeightFusionTest, gpsRef)
EXPECT_NEAR(baro_status.bias, baro_initial + baro_increment, 1.3f);

const BiasEstimator::status &rng_status = _ekf->getRngHgtBiasEstimatorStatus();
EXPECT_NEAR(rng_status.bias, 0.f, 1.f);
EXPECT_NEAR(rng_status.bias, 0.f, 1.1f); // TODO: why?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most likely a tiny change in convergence speed due to the lower limit on the accel bias change

bresch
bresch previously approved these changes Jan 24, 2024
@dagar dagar merged commit 51155f7 into main Jan 24, 2024
6 of 89 checks passed
@dagar dagar deleted the pr-ekf2_sensor_bias_consider_states branch January 24, 2024 19:14
jwwaite pushed a commit to AIVS-Inc/PX4-Autopilot that referenced this pull request Feb 12, 2024
…tive covariance matrix fixes (PX4#22597)

When a state stops to be estimated it becomes a "consider state". Its value and variance are frozen but its covariance with other states continue to evolve normally.

 - removes conservative accel bias variance limiting
 - force symmetry is skipped after fusion of NED vel/pos (a direct measurement)

---------

Co-authored-by: bresch <brescianimathieu@gmail.com>
Peize-Liu pushed a commit to Peize-Liu/PX4-Autopilot that referenced this pull request Mar 24, 2024
…tive covariance matrix fixes (PX4#22597)

When a state stops to be estimated it becomes a "consider state". Its value and variance are frozen but its covariance with other states continue to evolve normally.

 - removes conservative accel bias variance limiting
 - force symmetry is skipped after fusion of NED vel/pos (a direct measurement)

---------

Co-authored-by: bresch <brescianimathieu@gmail.com>
timzarhansen pushed a commit to timzarhansen/PX4-Autopilot that referenced this pull request Sep 3, 2024
…tive covariance matrix fixes (PX4#22597)

When a state stops to be estimated it becomes a "consider state". Its value and variance are frozen but its covariance with other states continue to evolve normally.

 - removes conservative accel bias variance limiting
 - force symmetry is skipped after fusion of NED vel/pos (a direct measurement)

---------

Co-authored-by: bresch <brescianimathieu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants