ndt_omp icon indicating copy to clipboard operation
ndt_omp copied to clipboard

GICP speed?

Open antithing opened this issue 7 years ago • 2 comments

Hi, and thank you for making this code available. I have a question regarding the gicp implementation.

In a one-shot test project, it gives a huge speed increase over the pcl::gicp. However, when i actually integrate it into my application (with streaming data), the speed jumps around, 21ms some frames, then 255 the next. Could you think of any reason for this?

Do I need to set the num_threads variable for gicp, as you do for NDT?

I am running it like this:

 pclomp::GeneralizedIterativeClosestPoint<POINT_TYPE, POINT_TYPE> icp;

	  icp.setTransformationEpsilon(params_.tf_epsilon);
	  icp.setMaxCorrespondenceDistance(params_.corr_dist);
	  icp.setMaximumIterations(params_.iterations);

	  icp.setInputSource(query);
	  icp.setInputTarget(reference);

	  PointCloud unused;
	  icp.align(unused);

	  // Retrieve transformation and estimate and update.
	 Eigen::Matrix4f   T = icp.getFinalTransformation();

antithing avatar Jan 22 '18 16:01 antithing

Hi antighing,

I'm not sure what actually causes the speed changes of GCIP.

  • Did you see such speed changes when you used the original pcl::GICP? If so, it might be the algorithm's problem rather than multi-threading problem.
  • Did you run another program with your program using GICP? By default, pclomp::GICP uses as many threads as possible. If some CPU cores are occupied by other processes, it would slow down.

koide3 avatar Jan 24 '18 21:01 koide3

Hi! thank you for getting back to me. It is strange, your NDT implementation is definitely faster, it runs at 25 - 30 ms a frame on DIRECT7. But it is not accurate enough, I am seeing huge drifts in translation and rotation. ( I get the same drift with the pcl implementation) GICP is much more accurate, but even though your optimized version is slightly faster than the original, it is too slow for my purposes.

Can you think of anything I can look at to either speed up the gicp, or improve the accuracy of the ndt? Thank you again for making this code available!

antithing avatar Jan 25 '18 09:01 antithing