ros-perception/perception_pcl — pull request #29 by wjwwood (2013-07-23 21:01:20+00:00)
Title: In VoxelGrid, Assertion `px != 0' failed. 

Hi, I found one issue with the voxel grid class for hydro.

I'm running the voxel grid in nodelet manager as follows:
```

filter_field_name: z
filter_limit_min: 0.3
filter_limit_max: 3
filter_limit_negative: False
leaf_size: 0.03

```
when I tried to echo the output: /voxel_grid/output, the error comes as:
```
nodelet: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: boost::shared_ptr::reference boost::shared_ptr::operator*() const [with T = pcl::PCLPointCloud2; boost::shared_ptr::reference = pcl::PCLPointCloud2&]: Assertion `px != 0' failed.
```

I think it's from the voxel_grip.cpp:
```
pcl_conversions::toPCL (*(input), *(pcl_input));
```

I then modified the declaration of pcl_input to:
```
pcl::PCLPointCloud2::Ptr pcl_input (new pcl::PCLPointCloud2);
```
It works after this change.

But.... the SACSegmentation nodelet is not working correctly. And I could not solve that problem related to memory leak...
```
*** glibc detected *** /opt/ros/hydro/lib/nodelet/nodelet: free(): invalid pointer: 0xb1f1abc0 ***
```

Can anyone please look into this issue?
Thanks!