Debug assertion failed, vector subscript out of range, C++, PCL

386 views Asked by At

I know similar questions have been posted several times, but none of the topics helps me in my case. I am working with PCL (Point Cloud Library) and having issues with a step called Correspondence Grouping. I've been using a lot of code from this tutorial, I only reorganized it into several classes. My problem occurs in the line 322. I get the Debug assertion failed message, mentioned in the title (see below)

enter image description here.

I've been fighting this for a good couple of days now and I can't see the possible cause. I can step into the header files of PCL, but I get this error message immediately after I try to step into recognize(). It looks like it must be a problem with the misuse of operator[] of std::vector in the PCL itself, but this seems silly and most likely it's my fault somewhere. What could be the cause of that? The parameters transformations and clusteredCorresponcences are just output parameters and the method clear() is invoked on them at the very beginning of recognize(). But anyway, they are declared in the same scope, like this:

// Object for storing the clustered correspondences.
std::vector<pcl::Correspondences> clusteredCorrespondences;
// Object for storing the transformations (rotation plus translation).
std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > transformations;

Do you have any ideas?

0

There are 0 answers