Closed okalachev closed 6 years ago
I found three problems.
First, if there is a zero value in max_flow_rate
of optical_flow
uORB message, the local position and velocity are not getting valid.
So something like f.max_flow_rate = 2.5f
should be added to MavlinkReceiver::handle_message_optical_flow_rad
method.
Second, the local position and velocity are not getting valid, if integrated_xgyro
, integratedyxgyro
, integrated_zgyro
are NaN
s, although in that case PX4 should get gyro data from the PixHawk's gyro.
Third, f.timestamp = flow.time_usec
line works incorrect (gives an incorrect timestamp). I temporarily changed it to f.timestamp = hrt_absolute_time()
.
@dagar , @mhkabir , @priseborough .
Yes, I actually corrected all those three issues in my local branch, however it didn't make much of a difference. I did get valid local position for a while, and then it stopped working in flight.
Can you please provide a link to this branch?
I will have to extract the relevant commits; Will do so soon.
Meanwhile, here is a log : https://review.px4.io/plot_app?log=4b678d25-1317-4e5e-a9ad-47ae900ff6cc
OK, I think I just figured out my issue. The vehicle's terrain estimate is completely wrong, and therefore the flow data scaling is wrong, leading to data rejection.
As for why the terrain estimate is invalid, I think it's just my rangefinder : https://github.com/PX4/Firmware/issues/10264
Generally, the issues were resolved. Also #10506.
I'm using 1.8.0 version with EKF2, SITL.
Publish faked optical flow messages with zero
integrated_x
andintegrated_y
. The vehicle is not obtaining valid local position nor velocity (vehicle_local_position.xy_valid
,vehicle_local_position.v_xy_valid
). This happens when staying still, and in air also.https://review.px4.io/plot_app?log=1e6bf123-38ed-409d-843d-07ef0d331a7a
(Also, there are some issues with
time_usec
decoding, so I temporarily changedoptical_flow
message's timestamp tohrt_absolute_time()
.)