I am using the following code with two similar Point Clouds (XYZRGB) both of which can be seen in a Viewer.
One of them works, the other one gives "vector subscript out of range error". Please find both .pcd files attached. Can anyone advise on what is causing this ?
* vali <[hidden email]> [2013-10-25 08:54]:
> I am using the following code with two similar Point Clouds (XYZRGB) both of
> which can be seen in a Viewer.
> One of them works, the other one gives "vector subscript out of range
> error". Please find both .pcd files attached. Can anyone advise on what is
> causing this ?
I've tested this using both clouds using the current git master on
Debian unstable 64bit without problems. Can you give some details on
I am using Microsoft Visual C++ 2010 with PCL 1.6.0 (Windows MSVC 2010 (32bit) prebuilt binaries) on a windows 7 64 bit OS. The programming environment solution is set in debug Win32 platform. This has never been an issue before and have used PCL on a number of different tasks before.
More recently I have changed everything to build in release mode x64 and instead of "vector subscript out of range" I get error as in the following image. So there is obviously something wrong with the cloud although I am able to visualize it properly inside a viewer.
Any suggestion for a work around would be very appreciated. The cluster causing the problem can be found as attachment in the original post/question. Also here is a picture with it inside the visualiser:
I think there are two points here:
- PCL 1.6 is really old, so it could be that this is fixed in newer
- Almost all of our developers are using Linux. We are trying our best
to make it work on other systems, but we don't have a fixed system to
So, instead of complaining, maybe you could try to debug your problem
and help us on the Windows front ;).
Thank you very much for your interest in fixing this bug. I think at this stage it makes sense to try a different boost library to see if that changes anything because the input gets fed to the ne.compute() method via boost library pointer management. At the moment since I am using the pre-built binaries of PCL 1.6 32 bit I am including the boost \libs and \include files from the "\3rdPatry\boost\" content which appears to be shipped with 1.49 boost version. I will try to add dependencies from another boost version to see what's happening.
I debugged problem and it is in organized.hpp file line 394
if (!mask_ [idx])
As you can see from the picture mask size is 465750 but somehow idx is larger 465752 and as result
you get vector out of range. Strangly, this does not happen with table_scene_mug_stereo_textured_organized.pcd file only with your file cloud0XYZRGBProb.pcd
When I use table_scene_mug_stereo_textured_organized.pcd file I get normals with no problem.