[ros-users] [PCL]: seg fault in convertCloudToArray

Radu Bogdan Rusu rusu at willowgarage.com
Tue Aug 3 16:23:25 UTC 2010


We added the possibility to read/write any type of multi-dimensional feature from/to PCD files.

Say intensity is a 2-float tuple now, instead of a single one:
# .PCD v.5 - Point Cloud Data file format
FIELDS x y z intensity
SIZE 4 4 4 4
TYPE F F F F
WIDTH 47656
HEIGHT 1
POINTS 47656
DATA ascii

becomes

# .PCD v.6 - Point Cloud Data file format
FIELDS x y z intensity
SIZE 4 4 4 4
TYPE F F F F
COUNT 1 1 1 2
WIDTH 47656
HEIGHT 1
POINTS 47656
DATA ascii


But, these changes should work with older files too (COUNT is automatically initialized to a size of 1 / dimension), 
unless we have a bug :)

Did you try pairwise registration on the datasets you sent me earlier? That's what I used to build up the tutorial, so 
it should work fine there.

Cheers,
Radu.

On 08/03/2010 09:20 AM, Dejan Pangercic wrote:
> Hi Radu,
> I must have skipped something, what is v.6?
> An example file is available here:
> http://ias.cs.tum.edu/~indorewala/27_July_exploration_full_room_1.pcd
> D.
>
> On Tue, Aug 3, 2010 at 6:03 PM, Radu Bogdan Rusu<rusu at willowgarage.com>  wrote:
>> Dejan,
>>
>> Besides enabling the debugging symbols to see where it segfaults, make sure
>> your PCD files are v.6. You can send me one for analysis if you want.
>>
>> Cheers,
>> Radu.
>>
>> On 08/03/2010 07:51 AM, Dejan Pangercic wrote:
>>>
>>> Hi there,
>>> I tested the "pcl_tutorials/src/pairwise_incremental_registration.cpp"
>>> today and it seg. faulted with the following backtrace:
>>> """
>>> (gdb) bt
>>> #0  0x00000000004230b4 in
>>>
>>> pcl::KdTreeANN<pcl::PointNormal>::convertCloudToArray(pcl::PointCloud<pcl::PointNormal>
>>> const&) ()
>>> #1  0x000000000042337c in
>>>
>>> pcl::KdTreeANN<pcl::PointNormal>::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointNormal>
>>> const>    const&, boost::shared_ptr<std::vector<int, std::allocator<int>
>>>>
>>>> const>    const&) ()
>>>
>>> #2  0x0000000000412a1e in pairAlign(pcl::PointCloud<pcl::PointXYZ>
>>> const&, pcl::PointCloud<pcl::PointXYZ>    const&,
>>> pcl::PointCloud<pcl::PointXYZ>&) ()
>>> #3  0x00000000004143f6 in main ()
>>> """
>>> The problem however is in that I get no debug output, that is, if I
>>> for instance change to the stack 0 (by typing in "frame 0") and then
>>> try to list the code there I get the following output from the
>>> debugger:
>>> """
>>> in dl-debug.c
>>> """
>>> So without any debug symbols. I then tried to re-build the pcl by
>>> explicitly enabling the Debug directive (by setting "set
>>> (ROS_BUILD_TYPE Debug)") but still without any success.
>>> So my question is I guess how can I debug this code without having to
>>> pollute the convertCloudToArray function with cerr-s?
>>>
>>>
>>>
>>> On the seg. fault issue itself, it turns out that it has been caused
>>> by the commit number  r31496 as reverting to the version number r31461
>>> actually gets rid of it.
>>>
>>>
>>> cheers, D.
>>>
>>
>> --
>> | Radu Bogdan Rusu | http://rbrusu.com/
>>
>
>
>

-- 
| Radu Bogdan Rusu | http://rbrusu.com/



More information about the ros-users mailing list