PCL Crashing due to Flann with euclidian cluster extraction

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

PCL Crashing due to Flann with euclidian cluster extraction

BadR0b1t
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: PCL Crashing due to Flann with euclidian cluster extraction

Radu B. Rusu
Administrator
Mat,

Perhaps it would be best to try that code snippet with PCL standalone and see if that works well. This way we can
isolate if the problem is coming from the wrappers (ROS) or the core (PCL).

In case you're looking at testing newer versions (including trunk), check out our stacks at svn.pointclouds.org/ros/

Cheers,
Radu.
--
http://openperception.org

On 01/21/2013 10:38 PM, bad.robot wrote:

> I am trying to perform euclidean cluster extraction under Ubuntu 12.04/11.10
> (getting this error on both versions) and ROS Fuerte. The code for the
> clustering is below:
>
> pcl::search::KdTree<pcl::PointXYZ>::Ptr tree ( new
> pcl::search::KdTree<pcl::PointXYZ>() );
> tree->setInputCloud( input_point_cloud.makeShared() );
> std::vector<pcl::PointIndices> *cluster_indices ( new
> std::vector<pcl::PointIndices>() );
> std::vector<pcl::PointCloud&lt;pcl::PointXYZ> > output_object_candidates;
>
> pcl::EuclideanClusterExtraction<pcl::PointXYZ> ec;
> ec.setClusterTolerance( 0.01 ); // 2cm
> ec.setMinClusterSize( 10 );
> ec.setMaxClusterSize( 25000 );
> ec.setSearchMethod( tree );
> ec.setInputCloud( input_point_cloud.makeShared() );
> ec.extract( *cluster_indices );
>
> this leads to the following segmentation fault (with GDB 'bt' output):
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff36b11f4 in flann::KDTreeSingleIndex<flann::L2_Simple&lt;float>
>> ::buildIndex() () from /opt/ros/fuerte/lib/libpcl_kdtree.so.1.5
> (gdb) bt
> #0  0x00007ffff36b11f4 in
> flann::KDTreeSingleIndex<flann::L2_Simple&lt;float> >::buildIndex() () from
> /opt/ros/fuerte/lib/libpcl_kdtree.so.1.5
> #1  0x00007ffff36a2938 in pcl::KdTreeFLANN<pcl::PointXYZ,
> flann::L2_Simple&lt;float>
>> ::setInputCloud(boost::shared_ptr<pcl::PointCloud&lt;pcl::PointXYZ> const>
> const&,   boost::shared_ptr<std::vector&lt;int, std::allocator&lt;int> >
> const> const&) () from  /opt/ros/fuerte/lib/libpcl_kdtree.so.1.5
> #2  0x00007ffff70b718f in
> pcl::search::KdTree<pcl::PointXYZ>::setInputCloud(boost::shared_ptr<pcl::PointCloud&lt;pcl::PointXYZ>
> const> const&, boost::shared_ptr<std::vector&lt;int, std::allocator&lt;int>
>> const> const&) () from /opt/ros/fuerte/lib/libpcl_filters.so.1.5
> #3  0x00007ffff63ee337 in
> object_candidate_extraction::extract_object_candidates (this=0x7fffffffdc10,
> input_point_cloud=..., object_candidates=...)
> at
> /home/badrobit/ros_workspace/RoboCupAtWork/raw_object_perception/raw_safe_object_transportation/common/src/object_candidate_extraction.cpp:27
> #4  0x0000000000450b9b in
> safe_object_transportation_node::get_point_cloud_data (this=0x7fffffffdb40,
> input_point_cloud=...)
> at
> /home/badrobit/ros_workspace/RoboCupAtWork/raw_object_perception/raw_safe_object_transportation/ros/nodes/safe_object_transportation.cpp:54
> #5  0x00000000004678d3 in boost::_mfi::mf1<void,
> safe_object_transportation_node,
> boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const> const&>::operator() (
> this=0x7fffe4000ca8, p=0x7fffffffdb40, a1=...) at
> /usr/include/boost/bind/mem_fn_template.hpp:165
> #6  0x0000000000465665 in
> boost::_bi::list2<boost::_bi::value&lt;safe_object_transportation_node*>,
> boost::arg<1> >::operator()<boost::_mfi::mf1&lt;void,
> safe_object_transportation_node,
> boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const> const&>,
> boost::_bi::list1<boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void>
>> const> const&> > (
> this=0x7fffe4000cb8, f=..., a=...) at /usr/include/boost/bind/bind.hpp:313
> #7  0x0000000000462d4e in boost::_bi::bind_t<void, boost::_mfi::mf1&lt;void,
> safe_object_transportation_node,
> boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const> const&>,
> boost::_bi::list2<boost::_bi::value&lt;safe_object_transportation_node*>,
> boost::arg<1> >
>> ::operator()<boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void>
>> const> > (
> this=0x7fffe4000ca8, a1=...) at /usr/include/boost/bind/bind_template.hpp:47
> #8  0x0000000000460797 in
> boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t&lt;void,
> boost::_mfi::mf1&lt;void, safe_object_transportation_node,
> boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const> const&>,
> boost::_bi::list2<boost::_bi::value&lt;safe_object_transportation_node*>,
> boost::arg<1> > >, void,
> boost::shared_ptr<sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const> const&>::invoke (function_obj_ptr=..., a0=...) at
> /usr/include/boost/function/function_template.hpp:153
> #9  0x00000000004659fb in boost::function1<void,
> boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const> const&>::operator() (this=0x7fffe4000ca0, a0=...)
> at /usr/include/boost/function/function_template.hpp:1013
> #10 0x0000000000462efd in
> boost::detail::function::void_function_obj_invoker1<boost::function&lt;void
> (boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const> const&)>, void,
> boost::shared_ptr<sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const> >::invoke(boost::detail::function::function_buffer&,
> boost::shared_ptr<sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const>) (function_obj_ptr=..., a0=...) at
> /usr/include/boost/function/function_template.hpp:153
> #11 0x000000000046cfd4 in boost::function1<void,
> boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void> >
> const> >::operator() (this=0x7fffe4000c58, a0=...)
> at /usr/include/boost/function/function_template.hpp:1013
> #12 0x000000000046ca5a in
> ros::SubscriptionCallbackHelperT<boost::shared_ptr&lt;sensor_msgs::PointCloud2_&lt;std::allocator&lt;void>
>> const> const&, void>::call (this=0x7fffe4000c50, params=...)
> at /opt/ros/fuerte/include/ros/subscription_callback_helper.h:180
> #13 0x00007ffff7b880f7 in ros::SubscriptionQueue::call() () from
> /opt/ros/fuerte/lib/libroscpp.so
> #14 0x00007ffff7b39f09 in
> ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) () from
> /opt/ros/fuerte/lib/libroscpp.so
> #15 0x00007ffff7b3b9ab in
> ros::CallbackQueue::callAvailable(ros::WallDuration) () from
> /opt/ros/fuerte/lib/libroscpp.so
> #16 0x00007ffff7b8b948 in
> ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) () from
> /opt/ros/fuerte/lib/libroscpp.so
> #17 0x00007ffff7b7063b in ros::spin() () from
> /opt/ros/fuerte/lib/libroscpp.so
> #18 0x000000000044e359 in main (argc=1, argv=0x7fffffffdd28)
> at
> /home/badrobit/ros_workspace/RoboCupAtWork/raw_object_perception/raw_safe_object_transportation/ros/nodes/safe_object_transportation.cpp:187
>
> I have been trying to figure this error out for a while now to no avail. I
> am not sure if going to an experimental branch of PCL will solve this or
> not. I have followed the PCL tutorial as closely as possible as well as
> looking through their FAQ and wasn't really able to find any answers. Any
> help would be greatly appreciated. This is being called from within the ROS
> infrastructure I am not sure if that makes a difference or not. Thanks in
> advance for any help or pointers you can give.
>
> Mat
>
>
>
> --
> View this message in context: http://www.pcl-users.org/PCL-Crashing-due-to-Flann-with-euclidian-cluster-extraction-tp4025596.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: PCL Crashing due to Flann with euclidian cluster extraction

BadR0b1t
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: PCL Crashing due to Flann with euclidian cluster extraction

Radu B. Rusu
Administrator
Mat,

Can you submit a patch? We'll make sure to integrate it if it's appropriate. Thanks!

Cheers,
Radu.
--
http://openperception.org

On 01/22/2013 08:56 AM, BadR0b1t wrote:

> Hello Radu,
>
> I have discovered what my error was and it was the fact that I was trying to
> pass in as an input an empty point cloud. While this is a fairly basic error
> on my part one would think this should be caught at some level before a
> segmentation fault. Does anyone know if this is a problem within the library
> or where it may lie? As it probably shouldn't die it should tell the user
> what is going wrong or at the very least assert instead of having it result
> in a segmentation fault?
>
> Cheers,
> Mat
>
>
>
> -----
> ----
> BadR0b1t
> --
> View this message in context: http://www.pcl-users.org/PCL-Crashing-due-to-Flann-with-euclidian-cluster-extraction-tp4025596p4025619.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: PCL Crashing due to Flann with euclidian cluster extraction

BadR0b1t
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: PCL Crashing due to Flann with euclidian cluster extraction

Radu B. Rusu
Administrator
Hi Mat,

Please register at http://dev.pointclouds.org, and create a new issue. The patch should be unified and created against
the latest trunk revision if possible.

Thanks in advance for your contributions!

Cheers,
Radu.
--
http://openperception.org

On 01/22/2013 02:40 PM, BadR0b1t wrote:

> Hi Radu,
>
> How do I go about doing this? I would love to contribute if possible :)
>
> Mat
>
>
>
> -----
> ----
> BadR0b1t
> --
> View this message in context: http://www.pcl-users.org/PCL-Crashing-due-to-Flann-with-euclidian-cluster-extraction-tp4025596p4025627.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: PCL Crashing due to Flann with euclidian cluster extraction

BadR0b1t
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: PCL Crashing due to Flann with euclidian cluster extraction

Julius Kammerl-2
Hi Mat,

the Makefile of perception_pcl_unstable currently checks out and
compiles revision 8173:

Makefile:
SVN_REVISION=-r8173

http://svn.pointclouds.org/ros/branches/fuerte/perception_pcl_unstable/pcl17/Makefile

PCL trunk is a little bit ahead at revision 8596. In order to compile
perception_pcl_unstable against trunk, you could simply update
SVN_REVISION. I just tested it and it successfully compiles on my machine.

Note that you also need to recompile the pcl_ros package from source if
this is needed in your project.

Please let me know if you have further questions.

Cheers,
Julius

On 01/23/2013 01:49 AM, BadR0b1t wrote:

> Hi Radu,
>
> How do I go about ensuring that I am using the latest version of the trunk?
> I am using ROS as the backend to pass around the point clouds and to prepare
> the data and I want to make sure that this is also running again 1.7 which I
> believe is the current trunk version. Is this just to download and build the
> ros libraries located here:
> http://svn.pointclouds.org/ros/branches/fuerte/perception_pcl_unstable/ ?
>
> Thanks,
> Mat
>
>
>
> -----
> ----
> BadR0b1t
> --
> View this message in context: http://www.pcl-users.org/PCL-Crashing-due-to-Flann-with-euclidian-cluster-extraction-tp4025596p4025647.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
>


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (917 bytes) Download Attachment