-
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
Reset to baro failsafe option sets height estimation to zero #16489
Comments
When the estimator resets to a different height source, the related reset counter is increased by one and the delta (difference in speed or position) is sent. PX4-Autopilot/msg/vehicle_local_position.msg Lines 20 to 21 in 850d0bc
It is the responsibility of the controller to handle this step and absorb it in the setpoint as done here: PX4-Autopilot/src/lib/flight_tasks/tasks/FlightTask/FlightTask.cpp Lines 61 to 63 in 46f0388
|
so what's the cause of resetting to zero as show in the Local Pozition Z graph? |
I did not inspect the log, but the reset is located here: followed by And the baro offset that should absorb most of the jump is updated here while in VIO height/range finder aiding mode: I let you close the issue when you find the root case. |
_baro_hgt_offset is also update in range or gps hgt mode but it is not updated in ev hgt mode may this the issue? |
@cimbar This might be part of the issue, yes; that part is clearly missing. However, looking at the log, there are two resets, not just one:
It seems that the step the occurs on the 2nd reset, which is a reset to ev height. Since the reported ev height is clost to 0, it then makes sense that the estimated height jumps to ~0. |
Thanks for your investigation. In the second reset, external vision height is started to be used as primary height source again, without considering last baro fusion. It might be better to not reset the source more than ones in the same flight or there can be better options for these kind of failsafe situations. |
@cimbar I think the EV starting condition is not strict enough; for GPS and range finder aiding for example, we have more checks ensuring the fusion does not start on bad data. |
@cimbar I'm closing this PR as the issue has been identified and opened a new one to fix it: |
Hi,
I use external vision source for flight in offboard mode. Lidar Lite is connected to pixhawk and i get distance sensor data from pixhawk and send it back inside of the external vision position data. Primary height source is vision but the height actually comes from distance sensor after filtering on companion computer. Lidar lite started to produce zero values at flight; therefore, height of the vision position became zero as well. Then, ecl/ekf ev hgt timeout - reset to baro failsafe was triggered and position estimation of px4 suddenly changed to zero and this involved improper flight in offboard mode. I think reset to baro option shouldn't suddenly change the height of the vehicle. The last height estimation should be considered after resetting to baro.
To Reproduce
Use primary height source as vision or range EKF2_HGT_MODE 2 or 3
Produce false zero measurements from height source
Expected behavior
ecl/ekf hgt timeout will be triggered and px4 resets the height estimation to baro.
My suggestion is last height estimations should be considered in new estimation with baro before resetting height source.
Log Files and Screenshots
https://review.px4.io/plot_app?log=be81e736-7987-4009-af89-bc90a8dc57f6
Additional context
wq:I2C3 low on stack warning was produced multiple times before this issue occurred.
Main reason of the failure comes from Lidar Lite hardware but px4 failsafe option is not useful for this circumstances.
The text was updated successfully, but these errors were encountered: