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

KakutesH7/H7v2/H7mini: use EKF2 #21961

Merged
merged 2 commits into from
Aug 28, 2023
Merged

KakutesH7/H7v2/H7mini: use EKF2 #21961

merged 2 commits into from
Aug 28, 2023

Conversation

julianoes
Copy link
Contributor

This switches Kakute F7 and H7v1 to EKF2 to match Kakute H7v2 and mini.

Untested, could you test @vincentpoont2 ?

@julianoes julianoes requested a review from bkueng August 14, 2023 03:34
param set-default ATT_W_ACC 0.4
param set-default ATT_W_GYRO_BIAS 0

# use EKF2 without mag
Copy link
Member

Choose a reason for hiding this comment

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

you might also want to set EKF2_MAG_TYPE 5 (none)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't do that for the other Kakutes either. So you're saying I should?

Copy link
Member

Choose a reason for hiding this comment

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

Nope, in fact it's fine, the EKF will still initialize the heading using the yaw estimator if there is no mag data:

if (((_params.gnss_ctrl & GnssCtrl::HPOS) || (_params.gnss_ctrl & GnssCtrl::VEL))
&& _control_status.flags.tilt_align
&& _NED_origin_initialised
) {
// if GPS is otherwise ready to go other than yaw align
if (!_control_status.flags.yaw_align && gps_checks_passing && !gps_checks_failing) {
if (resetYawToEKFGSF()) {
ECL_INFO("GPS yaw aligned using IMU");
}
}
if (_control_status.flags.yaw_align) {
mandatory_conditions_passing = true;
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, ok, so I'll drop the commit again.

CONFIG_MODULES_BATTERY_STATUS=y
CONFIG_MODULES_COMMANDER=y
CONFIG_MODULES_CONTROL_ALLOCATOR=y
CONFIG_MODULES_DATAMAN=y
CONFIG_MODULES_EKF2=y
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, even if a GPS might be connected potentially? And would you do it for all Kakutes or just the F7?

Copy link
Member

Choose a reason for hiding this comment

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

GPS will still work. We can do it for all of them as they're generally low on flash.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, will do. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bkueng it looks like there is no way to fit EKF2 onto 1MB flash on the KakuteF7. Any ideas what to do? Retire it, or going back to Q?

Copy link
Member

Choose a reason for hiding this comment

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

Let's keep Q then.

Copy link
Member

Choose a reason for hiding this comment

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

There's more we can carve up in EKF2.

Signed-off-by: Julian Oes <julian@oes.ch>
@julianoes julianoes changed the title KakuteF7/H7v1: use EKF2 Kakutes: use EKF2 for all Aug 23, 2023
To save flash.

Signed-off-by: Julian Oes <julian@oes.ch>
@julianoes julianoes changed the title Kakutes: use EKF2 for all KakutesH7/H7v2/H7mini: use EKF2 for all Aug 23, 2023
@julianoes julianoes changed the title KakutesH7/H7v2/H7mini: use EKF2 for all KakutesH7/H7v2/H7mini: use EKF2 Aug 23, 2023
@vincentpoont2
Copy link
Member

@julianoes @bresch Please merge.
@julianoes Can we backport this to 1.14.1?

@bkueng
Copy link
Member

bkueng commented Aug 28, 2023

@vincentpoont2 did you test this?

@vincentpoont2
Copy link
Member

@vincentpoont2 did you test this?

Yes, we did a test flight. The only thing we notice is the following warning. 76YR_ZOCEN4X_T5KW22.png

@bkueng
Copy link
Member

bkueng commented Aug 28, 2023

Thanks @vincentpoont2, then let's get this merged.
For reference, can you share the link to the log?

@bkueng bkueng merged commit ecbc5b8 into main Aug 28, 2023
@bkueng bkueng deleted the pr-kakute-ekf2 branch August 28, 2023 11:20
@vincentpoont2
Copy link
Member

Thanks @vincentpoont2, then let's get this merged.
For reference, can you share the link to the log?

https://logs.px4.io/plot_app?log=82c6495e-4196-4985-aa9d-8b8a9ebfe7c6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants