Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segfault on BoundedExploreLayer::nearestCell() #1

Closed
mintar opened this issue Apr 2, 2014 · 4 comments
Closed

segfault on BoundedExploreLayer::nearestCell() #1

mintar opened this issue Apr 2, 2014 · 4 comments

Comments

@mintar
Copy link

mintar commented Apr 2, 2014

While testing the package with my Gazebo simulation, it always crashes with the following backtrace. It always crashes on the exact moment that the robot crosses into the area selected in RViz.

Program received signal SIGSEGV, Segmentation fault.
0x00007fffd4a66210 in frontier_exploration::BoundedExploreLayer::nearestCell(unsigned int&, unsigned int, unsigned char, unsigned char const*) () from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
(gdb) bt
#0  0x00007fffd4a66210 in frontier_exploration::BoundedExploreLayer::nearestCell(unsigned int&, unsigned int, unsigned char, unsigned char const*) () from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#1  0x00007fffd4a653e7 in frontier_exploration::BoundedExploreLayer::findFrontiers(geometry_msgs::Point_<std::allocator<void> >, costmap_2d::Costmap2D*) () from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#2  0x00007fffd4a6464f in frontier_exploration::BoundedExploreLayer::getNextFrontier(geometry_msgs::PoseStamped_<std::allocator<void> >, geometry_msgs::PoseStamped_<std::allocator<void> >&) ()
   from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#3  0x00007fffd4a641d7 in frontier_exploration::BoundedExploreLayer::getNextFrontierService(frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&)
    () from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#4  0x00007fffd4a90191 in boost::_mfi::mf2<bool, frontier_exploration::BoundedExploreLayer, frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&>::operator()(frontier_exploration::BoundedExploreLayer*, frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&) const ()
   from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#5  0x00007fffd4a8e117 in bool boost::_bi::list3<boost::_bi::value<frontier_exploration::BoundedExploreLayer*>, boost::arg<1>, boost::arg<2> >::operator()<bool, boost::_mfi::mf2<bool, frontier_exploration::BoundedExploreLayer, frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&>, boost::_bi::list2<frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&> >(boost::_bi::type<bool>, boost::_mfi::mf2<bool, frontier_exploration::BoundedExploreLayer, frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&>&, boost::_bi::list2<frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&>&, long) ()
   from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#6  0x00007fffd4a8c55c in bool boost::_bi::bind_t<bool, boost::_mfi::mf2<bool, frontier_exploration::BoundedExploreLayer, frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&>, boost::_bi::list3<boost::_bi::value<frontier_exploration::BoundedExploreLayer*>, boost::arg<1>, boost::arg<2> > >::operator()<frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> > >(frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&) ()
   from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#7  0x00007fffd4a89937 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::_mfi::mf2<bool, frontier_exploration::BoundedExploreLayer, frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&>, boost::_bi::list3<boost::_bi::value<frontier_exploration::BoundedExploreLayer*>, boost::arg<1>, boost::arg<2> > >, bool, frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&>::invoke(boost::detail::function::function_buffer&, frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&) () from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#8  0x00007fffd4a97a74 in boost::function2<bool, frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&>::operator()(frontier_exploration::GetNextFron
tierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&) const () from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#9  0x00007fffd4a96b8f in ros::ServiceSpec<frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> > >::call(boost::function<bool (frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >&, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> >&)> const&, ros::ServiceSpecCallParams<frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> > >&) () from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#10 0x00007fffd4a951cc in ros::ServiceCallbackHelperT<ros::ServiceSpec<frontier_exploration::GetNextFrontierRequest_<std::allocator<void> >, frontier_exploration::GetNextFrontierResponse_<std::allocator<void> > > >::call(ros::ServiceCallbackHelperCallParams&) () from /home/martin/ros-hydro-ws/devel/lib//libexplore_costmap.so
#11 0x00007ffff740c978 in ros::ServiceCallback::call() () from /opt/ros/hydro/lib/libroscpp.so
#12 0x00007ffff744e349 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) () from /opt/ros/hydro/lib/libroscpp.so
#13 0x00007ffff744fe0b in ros::CallbackQueue::callAvailable(ros::WallDuration) () from /opt/ros/hydro/lib/libroscpp.so
#14 0x00007ffff749d0f8 in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) () from /opt/ros/hydro/lib/libroscpp.so
#15 0x00007ffff7482d7b in ros::spin() () from /opt/ros/hydro/lib/libroscpp.so
#16 0x00000000004c6f6b in main ()

Steps to reproduce:

roslaunch kurt_gazebo kurt_avz_world.launch
roslaunch kurt_navigation_slam slam_gmapping.xml
roslaunch kurt_navigation_slam move_base.xml
roslaunch frontier_exploration global_map.launch

(This is using our kurt_driver and kurt_apps stacks, both on GitHub + ROS wiki.)

Here's the global_map.launch that I used.

@paulbovbel
Copy link
Owner

Thanks for testing it out. I'm having some trouble replicating your setup, kurt_avz_world.launch is not on the git.

@mintar
Copy link
Author

mintar commented Apr 3, 2014

Oh yes, I should have mentioned that. The default branch is fuerte, but you should use hydro. The following works:

source /opt/ros/hydro/setup.bash
mkdir -p ~/fe-ws/wet/src
cd ~/fe-ws/wet/src
git clone https://github.com/paulbovbel/frontier_exploration.git   
# TODO: copy modified global_map.launch
cd ..
catkin_make

source ~/fe-ws/wet/devel/setup.zsh
mkdir ~/fe-ws/dry
cd ~/fe-ws/dry
export ROS_PACKAGE_PATH=$(pwd):$ROS_PACKAGE_PATH
git clone -b hydro https://github.com/uos/kurt_driver.git
git clone -b hydro https://github.com/uos/uos_tools.git
git clone -b hydro https://github.com/uos/diffdrive_gazebo_plugin.git
rosmake *

@paulbovbel
Copy link
Owner

Thanks for taking the time to make it so easy on me.

728663e should fix the segfault, and 6dc2b6e should help with gmapping compatibility as well (set track_uknown_space to false, so that the node doesn't try to re-explore previously visited space).

@mintar
Copy link
Author

mintar commented Apr 4, 2014

Thanks, I can confirm that this error is fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants