Skip to content
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

The input is empty #2

Open
BamsaAhmed opened this issue Jan 8, 2023 · 8 comments
Open

The input is empty #2

BamsaAhmed opened this issue Jan 8, 2023 · 8 comments

Comments

@BamsaAhmed
Copy link

when I try to us this package, I have the following :
The input is empty

I tried all types but the same problem, can you tell me the solution??

@leonardlohky
Copy link
Owner

Hello,

Can you elaborate more on where you are experiencing the issue? Or if you can show me your terminal output?

@BamsaAhmed
Copy link
Author

[pcl::NormalEstimation::compute] input_ is empty!
Normal size: 0
[pcl::NormalEstimation::compute] input_ is empty!
Normal size: 0
[pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud!
Found 0x7f1168006f10 size is = 0 HARRIS keypoints in cloud
[pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud!
Found 0x7f11680012f0 size is = 0 HARRIS keypoints in cloud
[pcl::FPFHEstimation::compute] input_ is empty!
[pcl::FPFHEstimation::initCompute] Init failed.
features.cpp = 0x7f1168001390Features = 0x7f1168001430
[pcl::FPFHEstimation::compute] input_ is empty!
[pcl::FPFHEstimation::initCompute] Init failed.
features.cpp = 0x7f1168001390Features = 0x7f11680014c0
[map_merge/map_merge_3d-26] process has died [pid 10796, exit code -11, cmd /home/basma/merge_ws/devel/lib/map_merge_3d/map_merge_node /tf:=/tf /tf_static:=/tf_static __name:=map_merge_3d __log:=/home/basma/.ros/log/ea95e070-9fb8-11ed-ab2c-31d2bfd9fb49/map_merge-map_merge_3d-26.log].
log file: /home/basma/.ros/log/ea95e070-9fb8-11ed-ab2c-31d2bfd9fb49/map_merge-map_merge_3d-26*.log

The submaps create online by Gazebo and i tried to merge them online

@BamsaAhmed
Copy link
Author

the output terminal is:
[pcl::NormalEstimation::compute] input_ is empty!
[pcl::NormalEstimation::compute] input_ is empty!
[pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud!
Found 0 HARRIS keypoints in cloud
[pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud!
Found 0 HARRIS keypoints in cloud
[pcl::FPFHEstimation::compute] input_ is empty!
[pcl::FPFHEstimation::initCompute] Init failed.
[pcl::FPFHEstimation::compute] input_ is empty!
[pcl::FPFHEstimation::initCompute] Init failed.
[map_merge/map_merge_3d-26] process has died [pid 9538, exit code -11, cmd /home/basma/merge_ws/devel/lib/map_merge_3d/map_merge_node __name:=map_merge_3d __log:=/home/basma/.ros/log/a644b02e-a213-11ed-911d-e9457a0fe2a4/map_merge-map_merge_3d-26.log].
log file: /home/basma/.ros/log/a644b02e-a213-11ed-911d-e9457a0fe2a4/map_merge-map_merge_3d-26*.log

even i used harries keypionts??

@leonardlohky
Copy link
Owner

Based on the output, it is failing at the step to compute surface normals because there is no input (i.e. no cloud).

Let's check whether it is a case of there being no input pointcloud. Under map_merging.cpp, can you add a simple std::cout line to check the size of the input cloud? If the input is really empty, the size will be 0. Recompile the code and let me know the results when you run it again.

  // remove noise, floor and ceiling points (this reduces number of keypoints)
  for (auto &cloud : clouds_resized) {
    cloud = removeOutliers(cloud, params.descriptor_radius,
                           params.outliers_min_neighbours);
    // cloud = remove_ground_ransac(cloud);
    cloud = filterHeight(cloud, params.filter_z_min,
                         params.filter_z_max);

  }
 

  // compute normals
  for (const auto &cloud : clouds_resized) {
    std::cout << "Size of cloud: " << cloud->size() << std::endl; 
    auto cloud_normals = computeSurfaceNormals(cloud, params.normal_radius);
    normals.emplace_back(std::move(cloud_normals));  // should have the same size as the input cloud->size()
  }

@BamsaAhmed
Copy link
Author

thank you for your response @leonardlohky , I notice that the code work when I stop the outlier filter. So if I stop this filter the outliers value will take into account so how can i remove these values and keep the code work at the same time?

@leonardlohky
Copy link
Owner

@BamsaAhmed when you mention outlier filter, do you mean the outliers_min_neighbours param? If stopping the outlier filter solves the issue, then I recommend reducing the value of the param in your launch file. But bear in mind that the lower the value, the more noisy outlier points there might be in your map

@BamsaAhmed
Copy link
Author

hi i have another issue
I reduced outliers_min_neighbours and the code work properly for a time.
after 2 weeks the same code didn't merge the maps, it included one map only, when i check i discover the second transform of map2 is zero. do you have a solution??

@leonardlohky
Copy link
Owner

@BamsaAhmed
Are the maps the same as the ones you used two weeks before? If a transform solution cannot be found between the two maps, it will only include map from one robot. There are a few reasons a transform solution cannot be found, which are

  • Insufficient overlap; hence not enough matching features. Ensure the maps have more common areas
  • confidence_threshold too high; can reduce the value of it in the param, but this will run the risk of getting a bad transform solution and merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants