mp3guy/ICPCUDA

Running on PCL clouds?

Closed this issue · 4 comments

Hi, and thank you for making this code available. I have it building, but would like to pass two PCL clouds in, and run the icp on those.

for example:

	pcl::PointCloud<pcl::PointXYZI>::Ptr cloudQuery(new pcl::PointCloud<pcl::PointXYZI>);
	pcl::PointCloud<pcl::PointXYZI>::Ptr cloudRef(new pcl::PointCloud<pcl::PointXYZI>);

	if (pcl::io::loadPCDFile<pcl::PointXYZI>("query_114.pcd", *cloudQuery) == -1) //* load the file
	{
		PCL_ERROR("Couldn't read file query_114.pcd \n");
		return (-1);
	}

	if (pcl::io::loadPCDFile<pcl::PointXYZI>("reference_114.pcd", *cloudRef) == -1) //* load the file
	{
		PCL_ERROR("Couldn't read file reference_114.pcd \n");
		return (-1);
	}

Where the clouds are literally just three floats per point, as:

-5.4740019 -4.1216536 8.3391247

What do i need to adjust to pass these clouds to your code?

Thanks again!

You can't just pass clouds. This is projective ICP, it relies on the points coming from a camera (i.e. they can be projected between them). If you want to use this without having that, you need to perform data association between the clouds yourself.

I see. So random clouds from a lidar would not work, but Organised clouds, eg from a realsense, or stereo disparity, would work? In which case i could just create a depth 'image', using the row and column value, and the depth value of each pixel, does that sound right?

thank you again for the code.

Yep, you could do that!

Ok awesome. Thanks! :)