LIO-Livox icon indicating copy to clipboard operation
LIO-Livox copied to clipboard

Cannot create a KDTree with an empty input cloud!

Open Minsu-Kim1822 opened this issue 2 years ago • 19 comments

Hi all,

I try to generate a map with LIO-LIVOX using HAP. I ran my custom rosbag files, and it works well with this error. I think memory leak is occurred due to this problem, but I do not have an idea to solve this problem

Any solutions?

image

Minsu-Kim1822 avatar Mar 27 '23 04:03 Minsu-Kim1822

Me too

zhSlamer avatar Mar 27 '23 06:03 zhSlamer

just change

kdtreeNonFeatureFromLocal->setInputCloud(laserCloudNonFeatureFromLocal);

to

  if(!laserCloudNonFeatureFromLocal->empty())
    kdtreeNonFeatureFromLocal->setInputCloud(laserCloudNonFeatureFromLocal);

whyscience avatar Mar 27 '23 09:03 whyscience

@whyscience Thank you for your reply, but it does not work for me

Minsu-Kim1822 avatar Mar 27 '23 10:03 Minsu-Kim1822

you can add log to all the setInputCloud used, then use if(!cloud->empty()) to avoid the ERROR

whyscience avatar Mar 27 '23 10:03 whyscience

@whyscience , Thanks it works! :)

Btw, due to the memory increases exponentially, it suddenly shut downed itself. Do you have any idea or experienced such things?

Minsu-Kim1822 avatar Mar 27 '23 10:03 Minsu-Kim1822

Not yet

whyscience avatar Mar 27 '23 10:03 whyscience

Use_seg: 1 # use segment algorithm try this

runjtu avatar Mar 29 '23 09:03 runjtu

This error is because there is no assigned value to 'laserCloudCornerLast' variable in <Estimator.cpp> . There is no corner related code in this repository, so you can just use FeatureExtract_with_segment function instead of FeatureExtract_with_segment_hap function.

HowoongJun avatar Apr 11 '23 01:04 HowoongJun

using mid360 I get: [pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud! [PoseEstimation-3] process has died [pid 104728, exit code -11, cmd /home/dimitar/ws_lio-livox/devel/lib/lio_livox/PoseEstimation __name:=PoseEstimation __log:=/home/dimitar/.ros/log/1054c492-dfa7-11ed-8fe5-29e2e6177416/PoseEstimation-3.log]. log file: /home/dimitar/.ros/log/1054c492-dfa7-11ed-8fe5-29e2e6177416/PoseEstimation-3*.log

roslaunch-tec-djin-104672.log

compilelog.log

dbaldzhiev avatar Apr 20 '23 18:04 dbaldzhiev

I have the same problem in mid360. Have you tried in outdoor scene?

Cxz-dev avatar Apr 25 '23 13:04 Cxz-dev

I have the same problem in mid360. Have you tried in outdoor scene?

No I haven't. Indoor only.

dbaldzhiev avatar Apr 25 '23 13:04 dbaldzhiev

Hello, I have the same problem about HAP, have you solved it now?

wzt991101 avatar Jun 12 '23 07:06 wzt991101

Hello, I have the same problem about HAP, have you solved it now?

wzt991101 avatar Jun 12 '23 07:06 wzt991101

This error is because there is no assigned value to 'laserCloudCornerLast' variable in <Estimator.cpp> . There is no corner related code in this repository, so you can just use FeatureExtract_with_segment function instead of FeatureExtract_with_segment_hap function.

thx, it works!

WH30 avatar Aug 03 '23 07:08 WH30

laserCloudCornerLast

Hi. What do you mean by this? If there is no assigned value to 'laserCloudCornerLast' Variable, then how does that link with the FeatureExtract_with_segment function. Could you explain more of how to resolve the issue? Thank you :)

brandon-lawrence96 avatar Aug 08 '23 09:08 brandon-lawrence96

This error is because there is no assigned value to 'laserCloudCornerLast' variable in <Estimator.cpp> . There is no corner related code in this repository, so you can just use FeatureExtract_with_segment function instead of FeatureExtract_with_segment_hap function.

I am getting the same error can u please explain what changes to be done in code?

abhishekt711 avatar Aug 09 '23 18:08 abhishekt711

Screenshot from 2023-08-09 23-56-04 I have used the same function as u said but after some frame process has died

This error is because there is no assigned value to 'laserCloudCornerLast' variable in <Estimator.cpp> . There is no corner related code in this repository, so you can just use FeatureExtract_with_segment function instead of FeatureExtract_with_segment_hap function.

abhishekt711 avatar Aug 09 '23 18:08 abhishekt711

Screenshot from 2023-08-09 23-56-04 I have used the same function as u said but after some frame process has died

This error is because there is no assigned value to 'laserCloudCornerLast' variable in <Estimator.cpp> . There is no corner related code in this repository, so you can just use FeatureExtract_with_segment function instead of FeatureExtract_with_segment_hap function.

me too. I try this way, but I met the same problem. Have u solved it?

NHMMing avatar Sep 14 '23 03:09 NHMMing