-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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] Indoor optical flow/Lidar Lite and Outdoor GPS/Optical Flow/Lidar Lite(Hand-held testing) #9206
Comments
Python script should work if you arm the motors (without propellers) , advance throttle to prevent disarm and do the hand carry test. Disarm to stop logging, The commit hash indicates the OP generated these logs using v1.7.3 stable. I have had a look and the innovation sequences look OK. I have tried replaying the logs and unfortunately there are large dropouts of over 600mSec that prevent use of log replay as a diagnostics tool. These look like they are the result of an SD card with large write time spikes relative to the amount of data that the PX4 logger can buffer. Solutions to this are: Using a better SD card - See https://dev.px4.io/en/log/logging.html . I use the SanDisk Extreme U3 32GB. |
Thank you for the cooperation, and I have seen that It also looks strange that ulog from following link also shows that
https://github.com/PX4/Firmware/blob/master/msg/estimator_status.msg#L67-L68 |
LOGGER_BUFLOGGER_BUF cannot be found in https://dev.px4.io/en/advanced/parameter_reference.html As far as I understand, I need to create a file /fs/microsd/etc/rc.txt, which is located in the etc folder on the microSD card to increase LOGGER_BUF. In /fs/microsd/etc/rc.txt, I need to increase the value of LOGGER_BUF. Am I right? Or is there any other easier way to change the LOGGER_BUF parameter?
ulog for ekf2_innovations_s is missing in PX4FMU_V4I(with different github id: This is not related to EKF2, but the reason why ulog for ekf2_innovations_s is missing in PX4FMU_V4 might be related to the LOGGER_BUF parameter. or Do I need to specify the list of logged topics as explained here? Actually, ulog topic of <ekf2_innovations_s> exists, but when I opened it, nothing is presented. Do you have any thought about it? |
You need a better SD card. Do not modify the logger buffer without knowing what you're doing and checking free RAM. |
Current SD card test Sandisk edge 8GB MicrosSD(Class 5/UHS-I)
I have changed the SDcard as followings: SanDisk Extreme U3 32GB
|
I found some potential issues in the way the EKF handles optical flow and external vision data resets - see PX4/PX4-ECL#418. I will try to use your log as a test case. |
Can you please provide a link to a log with optical flow data gathered using the new SD card so I can test it. TXS. |
Do you mean the log such as the following link? log: https://review.px4.io/plot_app?log=772e6920-b73a-4177-baf0-fb52a3076f0e I found that the optical flow quality was not good, and EKF navigation failed The problem I found is that https://dev.px4.io/en/advanced/parameter_reference.html#CAL_MAG0_ROT we used the external magnetometer of GPS, and CAL_MAG0_ROT should be After resetting CAL_MAG0_ROT to be https://logs.px4.io/plot_app?log=ca7c4321-5743-426d-ba68-fb60a1cea08a log_12_2018-4-3-00-43-56.ulg.pdf csv_file from above ulog: ekf_kari.tar.gz I might be able to reproduce the aforementioned fault log by settting Please let me know if you need the aforementioned fault log with no dropout(now we don't have dropout since we have changed the sd card as you mentioned) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as stale. |
@priseborough @mhkabir @dagar
[EKF2] Indoor optical flow/Lidar Lite
We have expensive device mounted on the UAV, thus we would like to make sure that
our configuration and parameter setting is correct for indoor and outdoor hovering.
Thus, I have performed hand-held testing with optical flow and Lidar Lite indoor(not arming) based on EKF2, and record the flight log
from boot until shutdown
.The following is the log from and-held testing.
EKF2_AID_MASK | 3
EKF2_HGT_MODE | 2
https://review.px4.io/plot_app?log=daf49809-eee3-4c90-ae22-75d78953978d
we would like to evaluate the EKF2 performance, for instance optical flow innovation, but python script does not work for this data.
It thinks that
always on ground, always on ground
and python scripts was not working.More specifically, I don't know why the value of
pos_horiz_accuracy and pos_vert_accuracy
is always zero. As fas as I know, proper EKF2 measurement update of optical flow and Lidar Lite was achieved, value ofpos_horiz_accuracy and pos_vert_accuracy
decreased.pos_horiz_accuracy and pos_vert_accuracy
is the standard deviation value of EKF2 horizontal(x, y), vertical(z states), and is the representation about how certain the states might be.https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp#L3075-L3076
As you can see above lines,
https://docs.px4.io/en/flying/led_meanings.html
(We have external GPS with LED).
When
pos_horiz_accuracy and pos_vert_accuracy
is below the threshold(https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp#L1123-L1124),then
status_flags.condition_home_position_valid = true
(https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp#L1147)
and
In following lines(https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp#L1997-L1998
https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp#L3548),
check_posvel_validity
PX4 firmware check also COM_HOME_H_T and COM_HOME_V_T params to understand the EPH and EPV thresholds used to accept the respective EPH and EPV published in the vehicle_global_position & vehicle_local_position msgs.Then the above two conditions are met,
LED of GPS turn to be
green
, which means I can change to position_hold mode from stabilized mode.From what I understand about the
pos_horiz_accuracy and pos_vert_accuracy
When we used LPE instead of EKF2, we always saw that LED of GPS turn to be
green
indoor if optical flow measurement and LiDAR measurement was correct. And I was able to change into position_hold mode indoor successfully.However, in EKF2
as you can see vehicle_local_position.eph & epv is zero, and
pos_horiz_accuracy and pos_vert_accuracy
is zero. It looks quite weired. If I seepos_horiz_accuracy and pos_vert_accuracy
in analyser Tool in QGC, they were always zero as well, which does not makes sense to me.In addition, It seems to me that
status_flags.condition_home_position_valid
is not set to be true indoor.In LPE, when FAKE_ORIGIN was set to be true in indoor,
status_flags.condition_home_position_valid
is set to be true.https://github.com/larics/px4-firmware/blob/master/src/modules/local_position_estimator/BlockLocalPositionEstimator.cpp#L393
By monitoring the green light of LED attached to UAV, I was confident that position mode will not be rejected in indoor, since
pos_horiz_accuracy and pos_vert_accuracy
is below the threshold, and home_position is valid.Actually, there were someone who tried to add the functionality in EKF2 such as FAKE_Origin of LPE in order to perform automission indoor (http://discuss.px4.io/t/fake-origin-in-ekf2-for-indoor-vpe-mission/5069)
To summarize,
My question is as follows:
Do you think that hand-held testing indoor/outdoor help to make sure the our configuration and parameter setting is correct for indoor and outdoor hovering?
Does this log look okay?
Optical flow innovation looks okay to me,
and down position innovation which is
vel_pos_innov[5]
looks good to me based on LiDAR Lite v3.The value
xy_valid
does not look okay from times to times.https://github.com/PX4/Firmware/blob/master/src/modules/ekf2/ekf2_main.cpp#L1034
https://github.com/PX4/ecl/blob/master/EKF/ekf_helper.cpp#L1259-L1268
The meaning that the value of
xy_valid
is zero is that we are totally reliant on inertial dead-reckoning for position, and that might be caused by sensor timeout for optical flow(Because I set to use optical flow indoor)However, if you see the quality of optical flow, it was almost the maximum value(255) for the most of the time, and I don't know why time-out of optical flow measurement update occurred. That means that time between consecutive optical flow measurement is larger than
update _params.no_aid_timeout_max
(1s).bool optFlowAiding = _control_status.flags.opt_flow && (_time_last_imu - _time_last_of_fuse <= _params.no_aid_timeout_max
why the value of
pos_horiz_accuracy and pos_vert_accuracy
is always zero?It also looks strange that ulog from following link also shows that
pos_horiz_accuracy and pos_vert_accuracy
is always zero.(https://github.com/priseborough/PX4-Firmware-private/issues/2)
https://github.com/PX4/Firmware/blob/master/msg/estimator_status.msg#L67-L68
Even if optical flow measurement update only provide LOS(Line of Sight) velocity measurement related Vn(Velocity for North direction), Vd(Velocity for Down direction),
pos_horiz_accuracy and pos_vert_accuracy
should be always decreased when the optical flow measurement update is performed correctly for EKF2.More specifically, if we perform the observability analysis and analyse the rank of observability matrix , we will be able to conclude that we can deduce the information about the horizontal position and vertical position from the optical flow measurement.
Since optical flow innovation looks quite reasonable,
pos_horiz_accuracy and pos_vert_accuracy
should not be zero all the time../process_logdata_ekf.py
python scripts is broken about this log. I guess that this python scripts was not designed to handle the this type of log such as hand-held testing.However, do you think that python script will work if I arm the motor without propeller and perform hand-held testing?
Outdoor GPS/Optical Flow/Lidar Lite(Hand-held testing)
We have expensive device mounted on the UAV, and recently have experienced a few significant crash.
We would like to make sure that everything(UAV configuration & Sensor calibration & Parameter Setup) is okay for
posCTRL mode and Auto Mode
before real-flight.This is the results of outdoor hand-held testing
GPS altitude of both log looks quite strange.
position_0.xy_valid & position_0.z_valid
looks strange.Optical flow innovation look okay, but not the optimal.
https://review.px4.io/plot_app?log=6c3473c4-3d9c-4a2a-a748-0247d823f53f
https://review.px4.io/plot_app?log=d49ccaaf-3b83-4ae9-a98d-72ab244a2f9c
This question has been quite a long, and would you please have a look at it?
The text was updated successfully, but these errors were encountered: