We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84db8c5 commit 69525aaCopy full SHA for 69525aa
common/autoware_perception_rviz_plugin/src/object_detection/predicted_objects_display.cpp
@@ -361,6 +361,12 @@ void PredictedObjectsDisplay::processPointCloud(
361
// Create Kd-tree to search neighbor pointcloud to reduce cost.
362
pcl::search::Search<pcl::PointXYZRGB>::Ptr kdtree =
363
pcl::make_shared<pcl::search::KdTree<pcl::PointXYZRGB>>(false);
364
+
365
+ // check if the pointcloud is empty to not call setInputCloud with an empty pointcloud
366
+ if (colored_cloud->empty()) {
367
+ return;
368
+ }
369
370
kdtree->setInputCloud(colored_cloud);
371
372
pcl::PointCloud<pcl::PointXYZRGB>::Ptr out_cloud(new pcl::PointCloud<pcl::PointXYZRGB>());
0 commit comments