PCL filter nodelet crashes
I'm running a sequence of pcl filter nodelets (StatisticalOutlier -> VoxelGrid) and we are seeing frequent, spontaneous crashes. Oddly, it seems only this combination causes the crash, with only a single filter, or the reverse input/output order working fine.
I have a launch and bag file (attached) that produce a crash which has been confirmed on two machines. Provided a sanity check passes, how can I forward this to appropriate place as a bug report?
<launch>
<node pkg="nodelet" type="nodelet" name="pcl_filter_manager" args="manager"/>
<!-- Outlier filter -->
<node pkg="nodelet" type="nodelet" name="outlier_filter"
args="load pcl/StatisticalOutlierRemoval pcl_filter_manager" >
<param name="mean_k" type="int" value="2" />
<param name="stddev" type="double" value="0.2" />
<param name="negative" type="bool" value="false" />
<remap from="outlier_filter/input" to="umdetc/cloud" />
<remap from="outlier_filter/output" to="cloud_filter1" />
</node>
<!-- Voxel grid filter -->
<node pkg="nodelet" type="nodelet" name="voxel_filter"
args="load pcl/VoxelGrid pcl_filter_manager">
<param name="leaf_size" type="double" value="0.01" />
<remap from="voxel_filter/input" to="cloud_filter1" />
<remap from="voxel_filter/output" to="cloud_filtered"/>
</node>
</launch>
#0 0xace1346b in flann::KDTreeSingleIndex<flann::L2_Simple<float> >::computeBoundingBox(std::vector<flann::KDTreeSingleIndex<flann::L2_Simple<float> >::Interval, std::allocator<flann::KDTreeSingleIndex<flann::L2_Simple<float> >::Interval> >&) () from /opt/ros/fuerte/lib/libpcl_surface.so.1.5
#1 0xace13585 in flann::KDTreeSingleIndex<flann::L2_Simple<float> >::buildIndex() () from /opt/ros/fuerte/lib/libpcl_surface.so.1.5
#2 0xb42c38f2 in pcl::KdTreeFLANN<pcl::PointXYZ, flann::L2_Simple<float> >::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&, boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&) ()
from /opt/ros/fuerte/lib/libpcl_kdtree.so.1.5
#3 0xad229e09 in pcl::search::KdTree<pcl::PointXYZ>::setInputCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> const> const&, boost::shared_ptr<std::vector<int, std::allocator<int> > const> const&) ()
from /opt/ros/fuerte/lib/libpcl_filters.so.1.5
#4 0xad2acc30 in pcl::StatisticalOutlierRemoval<sensor_msgs::PointCloud2_<std::allocator<void> > >::applyFilter(sensor_msgs::PointCloud2_<std::allocator<void> >&) () from /opt/ros/fuerte/lib/libpcl_filters.so.1.5
#5 0xad1d8e3e in pcl::Filter<sensor_msgs::PointCloud2_<std::allocator<void> > >::filter(sensor_msgs::PointCloud2_<std::allocator<void> >&) ()
from /opt/ros/fuerte/lib/libpcl_filters.so.1.5
#6 0xad4963ea in pcl_ros::StatisticalOutlierRemoval::filter (this=0x80ca1a0,
input=..., indices=..., output=...)
at /tmp/buildd/ros-fuerte-perception-pcl-1.2.3/debian/ros-fuerte-perception-pcl/opt/ros/fuerte/stacks/perception_pcl/pcl_ros/include/pcl_ros/filters/statistical_outlier_removal.h:79
#7 0xad410c40 in pcl_ros::Filter::computePublish (this=0x80ca1a0, input=...,
indices=...)
at /tmp/buildd/ros-fuerte-perception-pcl-1.2.3/debian/ros-fuerte-perception-pcl/opt/ros/fuerte/stacks/perception_pcl/pcl_ros/src/pcl_ros/filters/filter.cpp:68
#8 0xad411a7a in pcl_ros::Filter::input_indices_callback (this=0x80ca1a0,
cloud=..., indices=...)
at /tmp/buildd/ros-fuerte-perception-pcl-1.2.3/debian/ros-fuerte-perception-pcl/opt/ros/fuerte/stacks/perception_pcl/pcl_ros/src/pcl_ros/filters/filter.cpp:229
#9 0xad413fb3 in operator() (a2=..., p=<optimized out>, this=<optimized out>,
a1=...) at /usr/include/boost/bind/mem_fn_template.hpp:280
#10 operator()<boost::_mfi::mf2<void, pcl_ros::Filter, const boost::shared_ptr<const sensor_msgs::PointCloud2_<std::allocator<void> > >&, const boost::shared_ptr<const pcl::PointIndices_<std::allocator<void> > >&>, boost::_bi::list1<const boost::shared_ptr<const sensor_msgs::PointCloud2_<std::allocator<void> > >&> > (
a=<synthetic pointer>, f=..., this=<optimized out>)
at /usr/include/boost/bind/bind.hpp:392
#11 operator()<boost::shared_ptr<const sensor_msgs::PointCloud2_<std::allocator<void> > > > (a1=..., this=<optimized out>)
at /usr/include/boost/bind/bind_template.hpp:47
#12 boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf2<void, pcl_ros::Filter, boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const> const&, boost::shared_ptr<pcl::PointIndices_<std::allocator<void> > const> const&>, boost::_bi::list3<boost::_bi::value<pcl_ros::Filter*>, boost::arg<1>, boost::_bi::value<boost::shared_ptr<pcl::PointIndices_<std::allocator<void> > const> > > >, void, boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const> const&>::invoke (
function_obj_ptr=..., a0=...)
at /usr/include/boost/function/function_template.hpp:153
#13 0xad41f236 in operator() (a0=..., this=<optimized out>)
at /usr/include/boost/function/function_template.hpp:1013
#14 boost::detail::function::void_function_obj_invoker1<boost::function<void (boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const> const&)>, void, boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const> >::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const>) (function_obj_ptr=...,
a0=...) at /usr/include/boost/function/function_template.hpp:153
#15 0xad45365b in operator() (
a0=<error reading variable: access outside bounds of object referenced via synthetic pointer>, this=0x80d6964)
at /usr/include/boost/function/function_template.hpp:1013
#16 ros::SubscriptionCallbackHelperT<boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > const> const&, void>::call (this=0x80d6960, params=...)
at /opt/ros/fuerte/include/ros/subscription_callback_helper.h:180
#17 0xb7f8bc07 in ros::SubscriptionQueue::call() ()
from /opt/ros/fuerte/lib/libroscpp.so
#18 0xb7f3ba87 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) ()
from /opt/ros/fuerte/lib/libroscpp.so
#19 0xb7f3c929 in ros::CallbackQueue::callOne(ros::WallDuration) ()
from /opt/ros/fuerte/lib/libroscpp.so
#20 0xb7ddbcc8 in callOne (this=0x80d4018)
at /opt/ros/fuerte/include/ros/callback_queue.h:80
#21 nodelet::detail::CallbackQueue::callOne (this=0x80d4008)
at /tmp/buildd/ros-fuerte-nodelet-core-1.6.5/debian/ros-fuerte-nodelet-core/opt/ros/fuerte/stacks/nodelet_core/nodelet/src/callback_queue.cpp:78
#22 0xb7ddd0aa in nodelet::detail::CallbackQueueManager::workerThread (
this=0x80b0990, info=0x80b45ac)
at /tmp/buildd/ros-fuerte-nodelet-core-1.6.5/debian/ros-fuerte-nodelet-core/opt/ros/fuerte/stacks/nodelet_core/nodelet/src/callback_queue_manager.cpp:272
#23 0xb7de03d6 in operator() (a1=<optimized out>, p=<optimized out>,
this=0x80acdf4) at /usr/include/boost/bind/mem_fn_template.hpp:165
#24 operator()<boost::_mfi::mf1<void, nodelet::detail::CallbackQueueManager, nodelet::detail::CallbackQueueManager::ThreadInfo*>, boost::_bi::list0> (f=...,
this=0x80acdfc, a=...) at /usr/include/boost/bind/bind.hpp:313
#25 operator() (this=0x80acdf4) at /usr/include/boost/bind/bind_template.hpp:20
#26 boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf1<void, nodelet::detail::CallbackQueueManager, nodelet::detail::CallbackQueueManager::ThreadInfo*>, boost::_bi::list2<boost::_bi::value<nodelet::detail::CallbackQueueManager*>, boost::_bi::value<nodelet::detail::CallbackQueueManager::ThreadInfo*> > > >::run (this=0x80accf0) at /usr/include/boost/thread/detail/thread.hpp:61
#27 0xb78dc48c in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
#28 0xb7c6cd4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#29 0xb7baaace in clone () from /lib/i386-linux-gnu/libc.so.6
Asked by jdlangs on 2012-09-12 11:39:35 UTC
Answers
So I'm having the same exact problem with the Alvar AR Tag Detection library..did you end up finding a solution to this?
Asked by devmax on 2012-10-25 01:02:09 UTC
Comments
Unfortunately, no. We've been able to manage without running the filters. I still think the best chance will be the upgrade to PCL 1.6. Hopefully groovy will do the upgrade as I've noticed other problems with 1.5 besides this one.
Asked by jdlangs on 2012-10-25 04:36:33 UTC
So for me this error pops up when I use the ar_track_alvar on images from my AR Drone. A minimal run of the system causes it, so is there anything you suggest I can do to avoid the error? Thank you so much...
Asked by devmax on 2012-10-25 06:27:49 UTC
We didn't see a crash when we reversed the filter order ( Voxel -> Outlier -> output ). But other than that I have no suggestions but to wait for the pcl upgrades to make it into ROS.
Asked by jdlangs on 2012-10-26 09:22:48 UTC
I seem to be unable to leave a comment, but I'm having a similar issue. I've traced it to the StatisticalOutlierRemoval filter getting an input of size 0. For some reason this causes the nodelet manager to crash. Using the launch file below, I can trigger a crash by putting my hand in from of an attached sls (Primesense Xtion Pro).
<launch>
<arg name="device" value="1@3" />
<node pkg="nodelet" type="nodelet" name="nodelet_manager"
args="manager">
</node>
<node pkg="nodelet" type="nodelet" name="driver"
args="load openni_camera/driver nodelet_manager">
<param name="device_id" value="$(arg device)" />
</node>
<node pkg="nodelet" type="nodelet" name="rectify_depth"
args="load image_proc/rectify nodelet_manager --no-bond">
<remap from="image_mono" to="depth/image_raw" />
<remap from="image_rect" to="depth/rectified_raw" />
<param name="interpolation" value="0" />
</node>
<node pkg="nodelet" type="nodelet" name="points_xyz"
args="load depth_image_proc/point_cloud_xyz nodelet_manager --no-bond">
<remap from="image_rect" to="depth/rectified_raw"/>
<remap from="points" to="rectified_points"/>
<param name="~no_data_depth_in_mm" value="5000" />
</node>
<node pkg="nodelet" type="nodelet" name="pointcloud_clipper"
args="load pcl/PassThrough nodelet_manager" >
<remap from="~input" to="rectified_points" />
<remap from="~output" to="clipped_points" />
<param name="~filter_field_name" value="z" />
<param name="~filter_limit_min" value="0.0" />
<param name="~filter_limit_max" value="1.5" />
<param name="~input_frame" value="/openni_depth_optical_frame" />
</node>
<node pkg="nodelet" type="nodelet" name="outlier_removal"
args="load pcl/StatisticalOutlierRemoval nodelet_manager" >
<remap from="~input" to="clipped_points" />
<remap from="~output" to="filtered_points" />
<param name="~stddev" value="1" />
</node>
</launch>
Asked by dangr on 2013-01-23 11:31:56 UTC
Comments
Can you provide a backtrace?
Asked by dejanpan on 2012-09-12 13:24:43 UTC
How would I get this? stdout, even with output="screen" on all nodes, shows only the roslaunch notification of a dead process.
Asked by jdlangs on 2012-09-13 03:21:50 UTC
Run the launch file with the gdb: http://www.ros.org/wiki/roslaunch/Tutorials/Roslaunch%20Nodes%20in%20Valgrind%20or%20GDB.
Asked by dejanpan on 2012-09-13 06:53:55 UTC
Added. It's crashing in the pcl Outlier filter itself.
Asked by jdlangs on 2012-09-13 07:27:35 UTC
Sorry for a late reply. If you have not been able to resolve the issue, can you please send me a link to the bag file and tell me which version of Ubuntu/ROS/PCL are you using? D.
Asked by dejanpan on 2012-09-20 14:35:09 UTC
Here is the file: http://dl.dropbox.com/u/15500942/cloud_crash.bag
Asked by jdlangs on 2012-09-24 06:45:40 UTC
I am using Fuerte on Ubuntu 12.04 and the default install of PCL (1.5). I wasn't able to try 1.6 since the unstable pcl_ros package doesn't include the nodelets. I vaguely remember seeing some crash fixes for KDTree in the 1.6 changelists so maybe this is a non-issue after upgrading
Asked by jdlangs on 2012-09-24 06:47:32 UTC