autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
936 stars 613 forks source link

Address an issue that pcl::transformPointCloud dies when receives pointcloud with zero points #3034

Closed kminoda closed 1 month ago

kminoda commented 1 year ago

Checklist

Description

pcl::transformPointCloud, which is used in several packages in Autoware, dies when receiving pointcloud with zero points. This causes a error during runtime.

(Internal link in TIER IV: https://star4.slack.com/archives/C4P0NSMB5/p1677827663887509)

Purpose

To avoid Autoware failing when zero length pointcloud is published

Possible approaches

  1. Implement alternative function to pcl::transformPointCloud (e.g. in tier4_autoware_utils, maybe moving this function)
  2. Install the latest PCL (as a matter of fact, the bug has been addressed here: https://github.com/PointCloudLibrary/pcl/pull/5113)
  3. Get rid of PCL

I think 1 is the best approach as a temporary solution.

Definition of done

Autoware does not die because of pcl::transformPointCloud even when the pointcloud with zero width is published.

mitsudome-r commented 1 year ago

@kminoda Are you planning to work on this task? or do you help from AWF members?

kminoda commented 1 year ago

@mitsudome-r No plan for now. Would appreciate if we can get a help from AWF members!

kaancolak commented 1 year ago

@mitsudome-r @kminoda, I would like to work on this issue, assigned myself.

h-ohta commented 1 year ago

Now, some packages in autoware use pcl_ros::transformPointCloud. e.g. https://github.com/autowarefoundation/autoware.universe/blob/faf4bd0286971e7ceaf52f1ff1ff8df3954348e4/planning/obstacle_velocity_limiter/src/pointcloud_utils.cpp#L47. https://github.com/autowarefoundation/autoware.universe/blob/faf4bd0286971e7ceaf52f1ff1ff8df3954348e4/perception/ground_segmentation/src/ransac_ground_filter_nodelet.cpp#L177 Do we have to fix them too?

kminoda commented 1 year ago

@h-ohta Thank you for the report. I think we need to check

h-ohta commented 1 year ago

@kminoda

if pcl_ros::transformPointCloud has the same issue mentioned here

In this repository, below functions are used.

  1. https://github.com/strawlab/perception_pcl/blob/master/pcl_ros/src/pcl_ros/transforms.cpp#L104-L207
  2. https://github.com/strawlab/perception_pcl/blob/master/pcl_ros/src/pcl_ros/transforms.cpp#L46-L81

Please refer to https://github.com/search?q=repo%3Aautowarefoundation%2Fautoware.universe%20pcl_ros%3A%3AtransformPointcloud&type=code.

As a result, when sensor points are empty, Input dataset has no X-Y-Z coordinates! Cannot convert to Eigen format. occurs but a node is not killed.

stale[bot] commented 1 year ago

This pull request has been automatically marked as stale because it has not had recent activity.

vividf commented 1 month ago

@kminoda Seems that the issue is fixed. Can we close this one? Thanks!

amadeuszsz commented 1 month ago

The issue seems to be resolved. If the problem still exists, please open this thread.