Open aichim opened 11 years ago
From what I can tell, no correspondence classes are actually instantiated under normal compilation (making the above changes compiles fine for me).
Adding a
#include <pcl/registration/correspondence_estimation.h>
template class pcl::registration::CorrespondenceEstimation<pcl::PointXYZ, pcl::PointNormal>;
to a random file caused the same errors you reported.
The errors also occur with or without your changes, I suspect nobody has really tried using two different point types like this.
But the changes do make sense, no? There is a clear error with the typedefs and the runtime check for the template arguments to be the same is pretty useless, no? :-)
I've posted a fix, but it makes it less efficient for same-type correspondences (requires creating a full temporary copy even though it's not strictly necessary). Unfortunately checking to see if the pointtypes are the same is actually kind of a pain, since it would mean specializing the entire class. I don't think it's possible to do a compile time check for template parameter equality. Anyone know a good workaround for this? I don't think it can be done with a simple run-time check.
We could use nearestKSearchT()
here.
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.
Is this one solved by #4901 or #4902 ?
Hi guys,
I think I just opened a can of worms in the CorrespondenceEstimation class and it's quite annoying.
So, I am trying to do the following:
This initially gave me an error of not being able to convert from PointXYZ to PointNormal in the PCL code, so I hunted for bugs and did the following changes:
In the diff above you will also see that I took out the parts where we consider the point types to be the same. I think these tests are wrong, as they are runtime tests, and the compiler is going to compile everything anyway, and will produce errors.
After these changes, I am now getting pages and pages of errors of the form: