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

[pcl::KdTreeFLANN::setInputCloud] Cannot create a KDTree with an empty input cloud! #8

Open
HowieHepburn opened this issue Jun 27, 2024 · 0 comments

Comments

@HowieHepburn
Copy link

The modified part in Patchwork++:

ros::Publisher pub_cloud_msgs;

cloud_msgs::ground_estimate cloud2cloudmsg(pcl::PointCloud<PointType> cloud_curr,pcl::PointCloud<PointType> cloud_gnd,const ros::Time& stamp, std::string frame_id = "map") {
cloud_msgs::ground_estimate cloud_msg;
cloud_msg.header.stamp = stamp;
cloud_msg.header.frame_id = frame_id;
cloud_msg.curr = cloud2msg(cloud_curr, stamp, frame_id);
cloud_msg.ground = cloud2msg(cloud_gnd, stamp, frame_id);
return cloud_msg;
}

pub_cloud_msgs.publish(cloud2cloudmsg(pc_curr, pc_ground, cloud_msg->header.stamp, cloud_msg->header.frame_id));

pub_cloud_msgs  = pnh.advertise<cloud_msgs::ground_estimate>("/benchmark/ground_estimate", 100, true);

and the point cloud is published in /benchmark/ground_estimate correctly

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

1 participant