Livox-SDK / LIO-Livox

A Robust LiDAR-Inertial Odometry for Livox LiDAR
BSD 3-Clause "New" or "Revised" License
640 stars 164 forks source link

Cannot create a KDTree with an empty input cloud! #49

Open Minsu-Kim1822 opened 1 year ago

Minsu-Kim1822 commented 1 year ago

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

zhSlamer commented 1 year ago

Me too

whyscience commented 1 year ago

just change

 kdtreeNonFeatureFromLocal->setInputCloud(laserCloudNonFeatureFromLocal);

to

  if(!laserCloudNonFeatureFromLocal->empty())
    kdtreeNonFeatureFromLocal->setInputCloud(laserCloudNonFeatureFromLocal);
Minsu-Kim1822 commented 1 year ago

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

whyscience commented 1 year ago

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

Minsu-Kim1822 commented 1 year ago

@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?

whyscience commented 1 year ago

Not yet

runjtu commented 1 year ago

Use_seg: 1 # use segment algorithm try this

HowoongJun commented 1 year ago

This error is because there is no assigned value to 'laserCloudCornerLast' variable in . 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.

dbaldzhiev commented 1 year ago

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

Cxz-dev commented 1 year ago

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

dbaldzhiev commented 1 year ago

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

No I haven't. Indoor only.

wzt991101 commented 1 year ago

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

wzt991101 commented 1 year ago

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

WH30 commented 1 year ago

This error is because there is no assigned value to 'laserCloudCornerLast' variable in . 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!

brandon-lawrence96 commented 1 year ago

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 :)

abhishekt711 commented 1 year ago

This error is because there is no assigned value to 'laserCloudCornerLast' variable in . 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 commented 1 year ago

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 . 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.

NHMMing commented 1 year ago

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 . 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?