Encountered error when collecting pointcloud data with the scene_segmentation.launch.
Context
I tried to collect the pointcloud data with scene_segmentation.launch using the following command:
roslaunch mcr_scene_segmentation scene_segmentation.launch input_pointcloud_topic:=/camera/depth_registered/points
rostopic pub /mcr_perception/scene_segmentation/event_in std_msgs/String "data: 'e_start'"
rostopic pub /mcr_perception/scene_segmentation/event_in std_msgs/String "data: 'e_add_cloud_start'"
but it ran into an error with the e_add_cloud_start event
[roslaunch][ERROR] 2019-05-23 10:46:22,513: [mcr_perception/scene_segmentation-1] process has died [pid 5970, exit code -11, cmd /opt/ros/mas_stable/lib/mcr_scene_segmentation/scene_segmentation_node ~input:=/head_camera/depth_registered/points ~object_list:=/mcr_perception/object_detector/object_list
Expected Behavior
It should start collecting and saving clustered pointcloud when publishing the e_add_cloud_start event signal.
Actual Behavior
It ended the process with the error pasted above (possibly segfault). Roslaunch with GDB will show the following info:
#0 __GI___libc_free (mem=0x7b4271) at malloc.c:3103
#1 0x000055555558bb21 in pcl::PointCloud<pcl::PointXYZRGB>::~PointCloud() ()
#2 0x00007ffff00d0417 in pcl::Filter<pcl::PointXYZRGB>::filter(pcl::PointCloud<pcl::PointXYZRGB>&) () from /opt/ros/mas_stable/lib/libmas_perception_libs.so
#3 0x00007ffff00d02c7 in pcl::FilterIndices<pcl::PointXYZRGB>::filter(pcl::PointCloud<pcl::PointXYZRGB>&) () from /opt/ros/mas_stable/lib/libmas_perception_libs.so
#4 0x00007ffff00cf251 in mas_perception_libs::CloudFilter::filterCloud(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> const> const&) () from /opt/ros/mas_stable/lib/libmas_perception_libs.so
#5 0x00007ffff5fb29dd in SceneSegmentation::findPlane(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> const> const&, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> >&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, double&) () from /opt/ros/mas_stable/lib/libscene_segmentation.so
#6 0x00007ffff5fb3df1 in SceneSegmentation::segment_scene(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> const> const&, std::vector<boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> >, std::allocator<boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> > > >&, std::vector<mas_perception_libs::BoundingBox, std::allocator<mas_perception_libs::BoundingBox> >&, double&) ()
from /opt/ros/mas_stable/lib/libscene_segmentation.so
#7 0x0000555555583da0 in SceneSegmentationNode::segment() ()
#8 0x0000555555586ca8 in SceneSegmentationNode::pointcloudCallback(boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > > const&) ()
#9 0x000055555559c56e in boost::detail::function::void_function_obj_invoker1<boost::function<void (boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > > const&)>, void, boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > > >::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > >) ()
#10 0x00005555555baac0 in ros::SubscriptionCallbackHelperT<boost::shared_ptr<sensor_msgs::PointCloud2_<std::allocator<void> > > const&, void>::call(ros::SubscriptionCallbackHelperCallParams&) ()
#11 0x00007ffff6d860e2 in ros::SubscriptionQueue::call() () from /opt/ros/melodic/lib/libroscpp.so
#12 0x00007ffff6d30f1c in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) () from /opt/ros/melodic/lib/libroscpp.so
#13 0x00007ffff6d3230b in ros::CallbackQueue::callAvailable(ros::WallDuration) () from /opt/ros/melodic/lib/libroscpp.so
#14 0x00007ffff6d89bf9 in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) () from /opt/ros/melodic/lib/libroscpp.so
#15 0x00007ffff6d7247b in ros::spin() () from /opt/ros/melodic/lib/libroscpp.so
#16 0x00005555555814e9 in main ()
Possible Fix
Delete -march=native in mcr_scene_segmentation/CMakeLists.txt fixed the issue. Thanks to @minhnh !
There is a similar issue posted in the pcl user forum:
http://www.pcl-users.org/Segfaults-in-eigen-s-handmade-aligned-free-on-ubuntu-artful-td4045237.html
Steps to Reproduce
-
roslaunch mcr_scene_segmentation scene_segmentation.launch input_pointcloud_topic:=/camera/depth_registered/points
-
rostopic pub /mcr_perception/scene_segmentation/event_in std_msgs/String "data: 'e_start'"
-
rostopic pub /mcr_perception/scene_segmentation/event_in std_msgs/String "data: 'e_add_cloud_start'"
Context
I am trying to do pointcloud detection.
Your Environment
- Version used: ubuntu 18.04, melodic
- Machine (Jenny (PC number), C069-workstation, your laptop): desktop with Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
- Link to your project: coming soon
Encountered error when collecting pointcloud data with the scene_segmentation.launch.
Context
I tried to collect the pointcloud data with scene_segmentation.launch using the following command:
but it ran into an error with the e_add_cloud_start event
Expected Behavior
It should start collecting and saving clustered pointcloud when publishing the e_add_cloud_start event signal.
Actual Behavior
It ended the process with the error pasted above (possibly segfault). Roslaunch with GDB will show the following info:
Possible Fix
Delete -march=native in mcr_scene_segmentation/CMakeLists.txt fixed the issue. Thanks to @minhnh !
There is a similar issue posted in the pcl user forum:
http://www.pcl-users.org/Segfaults-in-eigen-s-handmade-aligned-free-on-ubuntu-artful-td4045237.html
Steps to Reproduce
roslaunch mcr_scene_segmentation scene_segmentation.launch input_pointcloud_topic:=/camera/depth_registered/pointsrostopic pub /mcr_perception/scene_segmentation/event_in std_msgs/String "data: 'e_start'"rostopic pub /mcr_perception/scene_segmentation/event_in std_msgs/String "data: 'e_add_cloud_start'"Context
I am trying to do pointcloud detection.
Your Environment