Livox-SDK/LIO-Livox

Cannot create a KDTree with an empty input cloud!

Minsu-Kim1822 opened this issue · 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

Me too

just change

kdtreeNonFeatureFromLocal->setInputCloud(laserCloudNonFeatureFromLocal);

to

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

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

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

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

Not yet

Use_seg: 1 # use segment algorithm
try this

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.

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

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

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

No I haven't. Indoor only.

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

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

WH30 commented

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!

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

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?

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.