Poaos / LAEA

LAEA: A 2D LiDAR-Assisted UAV Exploration Algorithm for Unknown Environments
GNU Affero General Public License v3.0
15 stars 0 forks source link

Segmentation fault #3

Closed hosonhere closed 2 months ago

hosonhere commented 2 months ago

在运行fast_planner::MapROS::init()的时候出现了Segmentation fault.

Enviroment: Ubuntu 20.04 + ROS noetic 报错: PARAMETERS

NODES / exploration_node (exploration_manager/exploration_node) tf_map2world_link (tf/static_transform_publisher) waypoint_generator (waypoint_generator/waypoint_generator)

ROS_MASTER_URI=http://localhost:11311

process[tf_map2world_link-1]: started with pid [59897] process[exploration_node-2]: started with pid [59898] process[waypoint_generator-3]: started with pid [59899] hit: 0.619039, miss: -0.619039, min: -1.99243, max: 2.19722, thresh: 1.38629 [ INFO] [1721039240.335375276]: Successfully loaded the parameters from the launch file Stack trace (most recent call last):

8 Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in

7 Object "/home/hoson/laea_ws/devel/lib/exploration_manager/exploration_node", at 0x55711c76d3ed, in _start

6 Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f5707ae7082, in __libc_start_main

5 Object "/home/hoson/laea_ws/devel/lib/exploration_manager/exploration_node", at 0x55711c76d08f, in main

4 Object "/home/hoson/laea_ws/devel/lib/exploration_manager/exploration_node", at 0x55711c77ae81, in fast_planner::FastExplorationFSM::init(ros::NodeHandle&)

3 Object "/home/hoson/laea_ws/devel/lib/exploration_manager/exploration_node", at 0x55711c78c7db, in fast_planner::FastExplorationManager::initialize(ros::NodeHandle&)

2 Object "/home/hoson/laea_ws/devel/lib/libplan_manage.so", at 0x7f570847d018, in fast_planner::FastPlannerManager::initPlanModules(ros::NodeHandle&)

1 Object "/home/hoson/laea_ws/devel/lib/libplan_env.so", at 0x7f57083097cc, in fast_planner::SDFMap::initMap(ros::NodeHandle&)

0 Object "/home/hoson/laea_ws/devel/lib/libplan_env.so", at 0x7f570832abb8, in fast_planner::MapROS::init()

Segmentation fault (Signal sent by the kernel [(nil)]) [exploration_node-2] process has died [pid 59898, exit code -11, cmd /home/hoson/laea_ws/devel/lib/exploration_manager/exploration_node /odom_world:=/mavros/local_position/odom /map_ros/pose:=/mavros/camera/pose /map_ros/depth:=/camera/depth/image_raw /map_ros/cloud:=/pcl_render_node/cloud /planning/pos_cmd:=position_cmd /projected_map:=/sdf_map/hybrid_2d /planning/travel_traj:=/planning/travel_traj_ours __name:=exploration_node __log:=/home/hoson/.ros/log/c78f4898-4294-11ef-b1ae-1b7232513940/exploration_node-2.log]. log file: /home/hoson/.ros/log/c78f4898-4294-11ef-b1ae-1b7232513940/exploration_node-2*.log

image

Poaos commented 2 months ago

这个报错我确实是没有遇到过,请检查相关环境依赖和程序启动顺序。我在Ubuntu20 noetic下按流程启动没有遇到过这些报错。fast_planner::MapROS::init() 中本身也没有什么特别的操作,如果每次都是这个报错,不如手动添加一些 std::cout 进行测试,查看程序死在了哪个具体的位置,以便纠错。 image

hosonhere commented 2 months ago

谢谢您的回覆! 很不幸的, 根据我设定的std::cout, 他每次运行的时候中断的位置是不一致的, 我想可能是环境有问题, 我再重新装一次试试!

hosonhere commented 2 months ago

刚刚我改成用C++ 17编译成功debug