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

Code running error #1

Open
chengm0-0 opened this issue Dec 10, 2024 · 2 comments
Open

Code running error #1

chengm0-0 opened this issue Dec 10, 2024 · 2 comments

Comments

@chengm0-0
Copy link

Hello, cheers for your excellent work!
I encountered some issues while running the code with Ubuntu 20.04 and ROS neotic.

1. After I finished compiling and running the two launch files, the terminal got stuck in

[INFO] [1733833892.457769135]: [UniformGrid] Uniforma grid level 0 initialization finished
[ INFO] [1733833892.458838606]: [HierarchicalGrid] Hierarchical grid initialization finished
[ INFO] [1733833893.462574069]: [FSM] No odom
double free or corruption (out)
Stack trace (most recent call last):
[INFO] [1733833896.320144717]: [TrajServer] Initialization finished

does not continue to run, and the robot in RVIZ stops moving in a straight line for about 2 seconds at the beginning. I am not sure what is causing this?

2. When I run the code, sometimes errors occur. Have you ever encountered them?

[ INFO] [1733834008.203712053]: [FSM] No odom
free(): invalid pointer
Stack trace (most recent call last):
#17   Object "", at 0xffffffffffffffff, in 
#16   Object "/home/Exploration/FALCON/catkin_ws/devel/lib/exploration_manager/exploration_node", at 0x55bc2962a5fd, in _start
#15   Source "../csu/libc-start.c", line 308, in __libc_start_main [0x7f05c5486082]
#14   Object "/home/Exploration/FALCON/catkin_ws/devel/lib/exploration_manager/exploration_node", at 0x55bc29628b7d, in main
#13   Object "/opt/ros/noetic/lib/libroscpp.so", at 0x7f05c5c8621e, in ros::spin()
#12   Object "/opt/ros/noetic/lib/libroscpp.so", at 0x7f05c5c9dfce, in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*)
#11   Object "/opt/ros/noetic/lib/libroscpp.so", at 0x7f05c5c4a882, in ros::CallbackQueue::callAvailable(ros::WallDuration)
#10   Object "/opt/ros/noetic/lib/libroscpp.so", at 0x7f05c5c49171, in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*)
#9    Object "/opt/ros/noetic/lib/libroscpp.so", at 0x7f05c5c9b138, in ros::SubscriptionQueue::call()
#8    Object "/home/Exploration/FALCON/catkin_ws/devel/lib/libvoxel_mapping.so", at 0x7f05c5def9b7, in ros::SubscriptionCallbackHelperT<boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&, void>::call(ros::SubscriptionCallbackHelperCallParams&)
#7    Object "/home/Exploration/FALCON/catkin_ws/devel/lib/libvoxel_mapping.so", at 0x7f05c5de6351, in boost::detail::function::void_function_obj_invoker1<boost::function<void (boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)>, void, boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> >::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const>)
#6    Object "/home/Exploration/FALCON/catkin_ws/devel/lib/libvoxel_mapping.so", at 0x7f05c5dd2f8b, in voxel_mapping::MapServer::depthCallback(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)
#5    Object "/home/Exploration/FALCON/catkin_ws/devel/lib/libtrajectory.so", at 0x7f05c5f5df0d, in pcl::PointCloud<pcl::PointXYZ>::~PointCloud()
#4    Source "/build/glibc-LcI20x/glibc-2.31/malloc/malloc.c", line 4173, in _int_free [0x7f05c54f8b2b]
#3    Source "/build/glibc-LcI20x/glibc-2.31/malloc/malloc.c", line 5347, in malloc_printerr [0x7f05c54f72fb]
#2    Source "../sysdeps/posix/libc_fatal.c", line 155, in __stack_chk_fail [0x7f05c54ef26d]
#1    Source "/build/glibc-LcI20x/glibc-2.31/stdlib/abort.c", line 79, in abort [0x7f05c5484858]
#0    Source "../sysdeps/unix/sysv/linux/raise.c", line 51, in raise [0x7f05c54a500b]
Aborted (Signal sent by tkill() 54193 1000)

3. Does the size of the map have to be known a priori? Will the inaccurate size of the map affect the efficiency of exploration?

@yzhangec
Copy link
Collaborator

  1. More details needed to locate problem. The 1 second straight line moving is an initialization procedure for exploration planner.
  2. Possible render error. Please check if the point cloud or mesh render is running correctly. Please set correct CUDA code in point cloud render.
  3. It is not required. Map boundaries will be found during exploration process and inaccessible regions will be removed.

@Cypre55
Copy link

Cypre55 commented Jan 6, 2025

Hi everyone,

I'm encountering the same issues as user @chengm0-0 while running the code on Ubuntu 20.04 with ROS Noetic. Additionally, I encountered this error:

exploration_node: /usr/include/eigen3/Eigen/src/Core/DenseStorage.h:128: Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 32>::plain_array() [with T = double; int Size = 16; int MatrixOrArrayOptions = 0]: Assertion (internal::UIntPtr(eigen_unaligned_array_assert_workaround_gcc47(array)) & (31)) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****"' failed.

Could this be related to Eigen's memory alignment requirements?

I ran exploration_node with debug symbols and valgrind. Here is a snippet of the output. I hope it helpful in figuring out the issue.

==606104== 6 errors in context 4 of 8:
==606104== Invalid free() / delete / delete[] / realloc()
==606104==    at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==606104==    by 0x4954EBF: std::_Sp_counted_ptr<pcl::PointCloud<pcl::PointXYZ>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (in /home/satwik/falcon_ws/devel/.private/exploration_preprocessing/lib/libexploration_preprocessing.so)
==606104==    by 0x498659B: pcl::KdTreeFLANN<pcl::PointXYZ, flann::L2_Simple<float> >::~KdTreeFLANN() (in /home/satwik/falcon_ws/devel/.private/exploration_preprocessing/lib/libexploration_preprocessing.so)
==606104==    by 0x496DBD8: fast_planner::UniformGrid::updateGridsFrontierInfo(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&) (in /home/satwik/falcon_ws/devel/.private/exploration_preprocessing/lib/libexploration_preprocessing.so)
==606104==    by 0x4983425: fast_planner::HierarchicalGrid::updateHierarchicalGridFrontierInfo(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&) (in /home/satwik/falcon_ws/devel/.private/exploration_preprocessing/lib/libexploration_preprocessing.so)
==606104==    by 0x23A722: fast_planner::ExplorationManager::planExploreMotionHGrid(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&) (exploration_manager.cpp:140)
==606104==    by 0x2099F7: fast_planner::ExplorationFSM::callExplorationPlanner() (exploration_fsm.cpp:584)
==606104==    by 0x206D63: fast_planner::ExplorationFSM::FSMCallback(ros::TimerEvent const&) (exploration_fsm.cpp:360)
==606104==    by 0x22D788: boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>::operator()(fast_planner::ExplorationFSM*, ros::TimerEvent const&) const (mem_fn_template.hpp:165)
==606104==    by 0x22AEE7: void boost::_bi::list2<boost::_bi::value<fast_planner::ExplorationFSM*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>, boost::_bi::rrlist1<ros::TimerEvent const&> >(boost::_bi::type<void>, boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>&, boost::_bi::rrlist1<ros::TimerEvent const&>&, int) (bind.hpp:319)
==606104==    by 0x228E08: void boost::_bi::bind_t<void, boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>, boost::_bi::list2<boost::_bi::value<fast_planner::ExplorationFSM*>, boost::arg<1> > >::operator()<ros::TimerEvent const&>(ros::TimerEvent const&) (bind.hpp:1306)
==606104==    by 0x2269D3: boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>, boost::_bi::list2<boost::_bi::value<fast_planner::ExplorationFSM*>, boost::arg<1> > >, void, ros::TimerEvent const&>::invoke(boost::detail::function::function_buffer&, ros::TimerEvent const&) (function_template.hpp:158)
==606104==  Address 0x3fe4ccccccccccce is not stack|d, malloc|d or (recently) free|d
==606104== 
==606104== 
==606104== 7 errors in context 5 of 8:
==606104== Invalid free() / delete / delete[] / realloc()
==606104==    at 0x483CA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==606104==    by 0x21024E: Eigen::internal::aligned_free(void*) (Memory.h:177)
==606104==    by 0x21281B: void Eigen::internal::conditional_aligned_free<true>(void*) (Memory.h:230)
==606104==    by 0x21A10D: void Eigen::internal::conditional_aligned_delete_auto<double, true>(double*, unsigned long) (Memory.h:416)
==606104==    by 0x213FD4: Eigen::DenseStorage<double, -1, -1, -1, 0>::~DenseStorage() (DenseStorage.h:391)
==606104==    by 0x211B01: Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::~PlainObjectBase() (PlainObjectBase.h:98)
==606104==    by 0x211B21: Eigen::Matrix<double, -1, -1, 0, -1, -1>::~Matrix() (Matrix.h:178)
==606104==    by 0x242ACE: fast_planner::ExplorationManager::planExploreMotionHGrid(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&) (exploration_manager.cpp:154)
==606104==    by 0x2099F7: fast_planner::ExplorationFSM::callExplorationPlanner() (exploration_fsm.cpp:584)
==606104==    by 0x206D63: fast_planner::ExplorationFSM::FSMCallback(ros::TimerEvent const&) (exploration_fsm.cpp:360)
==606104==    by 0x22D788: boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>::operator()(fast_planner::ExplorationFSM*, ros::TimerEvent const&) const (mem_fn_template.hpp:165)
==606104==    by 0x22AEE7: void boost::_bi::list2<boost::_bi::value<fast_planner::ExplorationFSM*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>, boost::_bi::rrlist1<ros::TimerEvent const&> >(boost::_bi::type<void>, boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>&, boost::_bi::rrlist1<ros::TimerEvent const&>&, int) (bind.hpp:319)
==606104==  Address 0x3141d640 is 32 bytes inside a block of size 11,584 alloc|d
==606104==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==606104==    by 0x496B6AF: fast_planner::UniformGrid::calculateCostMatrixSingleThread(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&, std::map<int, std::pair<int, int>, std::less<int>, std::allocator<std::pair<int const, std::pair<int, int> > > >&) (in /home/satwik/falcon_ws/devel/.private/exploration_preprocessing/lib/libexploration_preprocessing.so)
==606104==    by 0x496B7EF: fast_planner::HierarchicalGrid::calculateCostMatrix2(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, double const&, std::vector<Eigen::Matrix<double, 3, 1, 0, 3, 1>, std::allocator<Eigen::Matrix<double, 3, 1, 0, 3, 1> > > const&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&, std::map<int, std::pair<int, int>, std::less<int>, std::allocator<std::pair<int const, std::pair<int, int> > > >&) (in /home/satwik/falcon_ws/devel/.private/exploration_preprocessing/lib/libexploration_preprocessing.so)
==606104==    by 0x23A9BA: fast_planner::ExplorationManager::planExploreMotionHGrid(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&) (exploration_manager.cpp:162)
==606104==    by 0x2099F7: fast_planner::ExplorationFSM::callExplorationPlanner() (exploration_fsm.cpp:584)
==606104==    by 0x206D63: fast_planner::ExplorationFSM::FSMCallback(ros::TimerEvent const&) (exploration_fsm.cpp:360)
==606104==    by 0x22D788: boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>::operator()(fast_planner::ExplorationFSM*, ros::TimerEvent const&) const (mem_fn_template.hpp:165)
==606104==    by 0x22AEE7: void boost::_bi::list2<boost::_bi::value<fast_planner::ExplorationFSM*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>, boost::_bi::rrlist1<ros::TimerEvent const&> >(boost::_bi::type<void>, boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>&, boost::_bi::rrlist1<ros::TimerEvent const&>&, int) (bind.hpp:319)
==606104==    by 0x228E08: void boost::_bi::bind_t<void, boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>, boost::_bi::list2<boost::_bi::value<fast_planner::ExplorationFSM*>, boost::arg<1> > >::operator()<ros::TimerEvent const&>(ros::TimerEvent const&) (bind.hpp:1306)
==606104==    by 0x2269D3: boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, fast_planner::ExplorationFSM, ros::TimerEvent const&>, boost::_bi::list2<boost::_bi::value<fast_planner::ExplorationFSM*>, boost::arg<1> > >, void, ros::TimerEvent const&>::invoke(boost::detail::function::function_buffer&, ros::TimerEvent const&) (function_template.hpp:158)
==606104==    by 0x4BE95F7: ros::TimerManager<ros::Time, ros::Duration, ros::TimerEvent>::TimerQueueCallback::call() (in /opt/ros/noetic/lib/libroscpp.so)
==606104==    by 0x4C0B161: ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) (in /opt/ros/noetic/lib/libroscpp.so)

Any advice on how to resolve this issue would be much appreciated!

Thank you for your help!

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

3 participants