-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Fix flow gyro bias corrections #22145
Conversation
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/optical-flow-oscillating-position/34470/2 |
Prevents from applying bias corrections several times if the sample isn't immediately used.
42df747
to
d002826
Compare
@@ -79,7 +79,7 @@ void UavcanFlowBridge::flow_sub_cb(const uavcan::ReceivedDataStructure<com::hex: | |||
if (PX4_ISFINITE(msg.rate_gyro_integral[0]) && PX4_ISFINITE(msg.rate_gyro_integral[1])) { | |||
flow.delta_angle[0] = msg.rate_gyro_integral[0]; | |||
flow.delta_angle[1] = msg.rate_gyro_integral[1]; | |||
flow.delta_angle[2] = 0.f; | |||
flow.delta_angle[2] = NAN; |
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.
Hmm, with this it's still going to replace the entire gyro as it passes through sensors/vehicle_optical_flow
.
if (sensor_optical_flow.distance_available && PX4_ISFINITE(sensor_optical_flow.distance_m)) { |
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.
Good point. Should we rather do the gyro Z stitching in VehicleOpticalFlow
directly and remove it from EKF2?
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 not sure what's best overall, but at the moment one reason not to do it in sensors/vehicle_optical_flow is because we're not currently accounting for any optical flow delay there.
Flight review is down. But here are two logs. One with GPS and one without. Overall pretty good. Did something a bit funny on the optical flow only flight when I was reversing straight back it veered off course aggressively. https://review.px4.io/plot_app?log=6c83b40c-a680-475b-b26b-b2ac2f9fcab6 |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/optical-flow-oscillating-position/34470/5 |
Add the autopilot's Z gyro when this is the case
d002826
to
bf0b369
Compare
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/holybro-optical-flow-sensor-thoneflow-oscillations-on-main/34768/1 |
* ekf2-flow: fix flow gyro bias compensation * ekf2-flow: apply flow gyro bias when used * ekf2: log optical flow gyro bias * ekf2: optical flow control always use provided flow gyro (with bias applied) * ekf2-flow: log flow gyro and gyro reference * ekf2-flow: support senrors with XY flow gyro --------- Co-authored-by: Daniel Agar <daniel@agar.ca> Co-authored-by: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)>
Solved Problem
Position oscillations with ArkFlow
Solution
Changelog Entry
For release notes: