locusrobotics / robot_navigation

Spiritual successor to ros-planning/navigation.
444 stars 149 forks source link

Move_base crashing when goal is published to /move_base_simple/goal #7

Closed kajep09 closed 6 years ago

kajep09 commented 6 years ago

Hello

I have configured move_base to use dwb_local_planner as the local planner as specified in the readme for the nav_core_adapter. I can launch my move_base launch file fine (see output below), but as soon as I publish a goal to /move_base_simple/goal (either via command line interface or rviz) move_base crashes without too much information. If I look at rviz at the same time I can see that the global_planner creates a plan to the requested goal and just afterwards move_base crashes:

[move_base-1] process has died [pid 16925, exit code -11, cmd /home/kasper/RCW_workspaces/safecop_ws/devel/lib/move_base/move_base scan:=safecop1_scan_filtered cmd_vel:=cmd_vel_move_base __name:=move_base __log:=/home/kasper/.ros/log/3e7d3c4c-725a-11e8-8097-4ceb42be16a3/move_base-1.log]. log file: /home/kasper/.ros/log/3e7d3c4c-725a-11e8-8097-4ceb42be16a3/move_base-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done

I can use other local planners fine while keeping the rest of the move_base config the same, so I am pretty sure the problem is with dwb or how I have configured/used it. Anyone got an idea of what I am doing wrong?

I am loading this yaml.file with the following params when I launch move_base:

LocalPlannerAdapter:
  planner_name: dwb_local_planner::DWBLocalPlanner
DWBLocalPlanner:
  min_vel_x: 0.0
  max_vel_x: 0.55
  min_vel_y: -0.1
  max_vel_y: 0.1
  max_vel_theta: 1.0
  acc_lim_x: 1.0
  acc_lim_y: 2.5
  acc_lim_theta: 3.2
  decel_lim_x: -2.5
  decel_lim_y: -2.5
  decel_lim_theta: -3.2
  min_speed_xy: 0.1
  max_speed_xy: 0.55
  min_speed_theta: 0.4

process[move_base-1]: started with pid [16925]
[ INFO] [1529269836.957342505, 1522753500.397359321] [ros.costmap_2d]: Using plugin "static_layer"
[ INFO] [1529269836.965893670, 1522753500.407419369] [ros.costmap_2d]: Requesting the map...
[ INFO] [1529269837.165175599, 1522753500.608905086] [ros.costmap_2d]: Resizing costmap to 1244 X 959 at 0.050000 m/pix
[ INFO] [1529269837.169285623, 1522753500.608905086] [ros.costmap_2d]: Shutting down the map subscriber. first_map_only flag is on
[ INFO] [1529269837.265842597, 1522753500.709560949] [ros.costmap_2d]: Received a 1244 X 959 map at 0.050000 m/pix
[ INFO] [1529269837.271492515, 1522753500.709560949] [ros.costmap_2d]: Using plugin "obstacle_global_layer"
[ INFO] [1529269837.273736678, 1522753500.709560949] [ros.costmap_2d]:     Subscribed to Topics: laser_scan_sensor1 laser_scan_sensor2
[ INFO] [1529269837.296425579, 1522753500.739744811] [ros.costmap_2d]: Using plugin "inflation_layer"
[ INFO] [1529269837.351881081, 1522753500.790042830] [ros.costmap_2d]: Using plugin "obstacle_local_layer"
[ INFO] [1529269837.356014039, 1522753500.800172533] [ros.costmap_2d]:     Subscribed to Topics: laser_scan_sensor1 laser_scan_sensor2
[ INFO] [1529269837.376383826, 1522753500.820286244] [ros.costmap_2d]: Using plugin "inflation_layer"
[ INFO] [1529269837.431365484, 1522753500.870933470] [ros.move_base]: Created local_planner nav_core_adapter::LocalPlannerAdapter
[ INFO] [1529269837.432348782, 1522753500.870933470] [ros.nav_core_adapter.LocalPlannerAdapter]: Loading plugin dwb_local_planner::DWBLocalPlanner
[ INFO] [1529269837.444547364, 1522753500.880995569] [ros.dwb_local_planner.DWBLocalPlanner]: Using Trajectory Generator "dwb_plugins::LimitedAccelGenerator"
[ INFO] [1529269837.474895222, 1522753500.911166993] [ros.dwb_local_planner.DWBLocalPlanner]: Using Goal Checker "dwb_plugins::SimpleGoalChecker"
[ INFO] [1529269837.478996756, 1522753500.921238807] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "RotateToGoal" (dwb_critics::RotateToGoalCritic)
[ INFO] [1529269837.480495691, 1522753500.921238807] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "Oscillation" (dwb_critics::OscillationCritic)
[ INFO] [1529269837.483947897, 1522753500.921238807] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "ObstacleFootprint" (dwb_critics::ObstacleFootprintCritic)
[ INFO] [1529269837.485504258, 1522753500.921238807] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "GoalAlign" (dwb_critics::GoalAlignCritic)
[ INFO] [1529269837.488264576, 1522753500.931299683] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "PathAlign" (dwb_critics::PathAlignCritic)
[ INFO] [1529269837.491699243, 1522753500.931299683] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "PathDist" (dwb_critics::PathDistCritic)
[ INFO] [1529269837.493618328, 1522753500.931299683] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "GoalDist" (dwb_critics::GoalDistCritic)
[ INFO] [1529269837.632316711, 1522753501.072241736] [ros.clear_costmap_recovery]: Recovery behavior will clear layer obstacles
[ INFO] [1529269837.637012002, 1522753501.072241736] [ros.clear_costmap_recovery]: Recovery behavior will clear layer obstacles
DLu commented 6 years ago

Any chance you could rerun it with a debugger?

kajep09 commented 6 years ago

I am not super well versed in that regard, but running it in gdb gives the following output when I publish a goal and it crashes. I couldn't get any core dumps or log files worth anything.

Starting program: /home/xx/RCW_workspaces/safecop_ws/devel/lib/move_base/move_base scan:=safecop1_scan_filtered cmd_vel:=cmd_vel_move_base __name:=move_base __log:=/home/xx/.ros/log/6ae33d72-7593-11e8-a979-54ee75873823/move_base-2.log
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee3ec700 (LWP 31783)]
[New Thread 0x7fffedbeb700 (LWP 31784)]
[New Thread 0x7fffed3ea700 (LWP 31785)]
[New Thread 0x7fffecbe9700 (LWP 31797)]
[New Thread 0x7fffe7fff700 (LWP 31810)]
[New Thread 0x7fffe73d9700 (LWP 31811)]
[New Thread 0x7fffe6bd8700 (LWP 31834)]
[ INFO] [1529614910.913941157, 1529335506.483416962] [ros.costmap_2d]: Using plugin "static_layer"
[ INFO] [1529614910.948186375, 1529335506.513608138] [ros.costmap_2d]: Requesting the map...
[ INFO] [1529614911.152338806, 1529335506.724997905] [ros.costmap_2d]: Resizing costmap to 871 X 783 at 0.050000 m/pix
[ INFO] [1529614911.154864156, 1529335506.724997905] [ros.costmap_2d]: Shutting down the map subscriber. first_map_only flag is on
[ INFO] [1529614911.253312261, 1529335506.825640537] [ros.costmap_2d]: Received a 871 X 783 map at 0.050000 m/pix
[ INFO] [1529614911.257314247, 1529335506.825640537] [ros.costmap_2d]: Using plugin "nonpersisting_laser_layer"
[ INFO] [1529614911.289467287, 1529335506.855835374] [ros.costmap_2d]:     Subscribed to Topics: laser
[New Thread 0x7fffe57b3700 (LWP 31930)]
[ INFO] [1529614911.319284034, 1529335506.886024417] [ros.costmap_2d]: Using plugin "rgbd_obstacle_layer"
[ INFO] [1529614912.216089032, 1529335507.782481411] [ros.spatio_temporal_voxel_layer]: global_costmap/rgbd_obstacle_layer being initialized as SpatioTemporalVoxelLayer!
[ INFO] [1529614912.254223826, 1529335507.822806689] [ros.spatio_temporal_voxel_layer]: global_costmap/rgbd_obstacle_layer initialization complete!
[ INFO] [1529614912.254272380, 1529335507.822806689] [ros.costmap_2d]: Using plugin "inflation_layer"
[New Thread 0x7fffc62ec700 (LWP 32120)]
[ INFO] [1529614912.329128702, 1529335507.893254240] [ros.costmap_2d]: Using plugin "nonpersisting_laser_layer"
[ INFO] [1529614912.331114986, 1529335507.903312274] [ros.costmap_2d]:     Subscribed to Topics: laser
[ INFO] [1529614912.352511795, 1529335507.923425719] [ros.costmap_2d]: Using plugin "nonpersisting_rgbd_layer"
[ INFO] [1529614912.354309100, 1529335507.923425719] [ros.costmap_2d]:     Subscribed to Topics: picoflexx
[ INFO] [1529614912.391062504, 1529335507.963657505] [ros.costmap_2d]: Using plugin "inflation_layer"
[New Thread 0x7fffc5894700 (LWP 32363)]
[ INFO] [1529614912.477514124, 1529335508.044090289] [ros.move_base]: Created local_planner nav_core_adapter::LocalPlannerAdapter
[ INFO] [1529614912.478872519, 1529335508.044090289] [ros.nav_core_adapter.LocalPlannerAdapter]: Loading plugin dwb_local_planner::DWBLocalPlanner
[ INFO] [1529614912.546223985, 1529335508.117275511] [ros.dwb_local_planner.DWBLocalPlanner]: Using Trajectory Generator "dwb_plugins::LimitedAccelGenerator"
[ INFO] [1529614912.608099574, 1529335508.177655015] [ros.dwb_local_planner.DWBLocalPlanner]: Using Goal Checker "dwb_plugins::SimpleGoalChecker"
[ INFO] [1529614912.641738506, 1529335508.207857653] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "RotateToGoal" (dwb_critics::RotateToGoalCritic)
[ INFO] [1529614912.643777821, 1529335508.207857653] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "Oscillation" (dwb_critics::OscillationCritic)
[ INFO] [1529614912.648104638, 1529335508.217917962] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "ObstacleFootprint" (dwb_critics::ObstacleFootprintCritic)
[ INFO] [1529614912.649961628, 1529335508.217917962] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "GoalAlign" (dwb_critics::GoalAlignCritic)
[ INFO] [1529614912.652807427, 1529335508.217917962] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "PathAlign" (dwb_critics::PathAlignCritic)
[ INFO] [1529614912.655724268, 1529335508.227989341] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "PathDist" (dwb_critics::PathDistCritic)
[ INFO] [1529614912.657720551, 1529335508.227989341] [ros.dwb_local_planner.DWBLocalPlanner]: Using critic "GoalDist" (dwb_critics::GoalDistCritic)
[ INFO] [1529614912.848878763, 1529335508.421969793] [ros.clear_costmap_recovery]: Recovery behavior will clear layer obstacles
[ INFO] [1529614912.861523496, 1529335508.432030767] [ros.clear_costmap_recovery]: Recovery behavior will clear layer obstacles

Thread 7 "move_base" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe73d9700 (LWP 31811)]
0x00007fffbfdef846 in costmap_queue::CostmapQueue::distanceLookup(unsigned int, unsigned int, unsigned int, unsigned int) ()
   from /home/xx/RCW_workspaces/safecop_ws/devel/.private/costmap_queue/lib/libcostmap_queue.so
(gdb) 

Afterwards I decided to pull the newest version from git and do a clean build of my whole workspace. In case it has any interest you can see which version I can from below: I can see that you have just done some commits that are related to the costmap_queue so I guess they have fixed the issue I experienced because now move_base keeps running after I publish a goal :)

Unpacking objects: 100% (52/52), done.
remote: Total 52 (delta 36), reused 52 (delta 36), pack-reused 0
From https://github.com/locusrobotics/robot_navigation
   ae4a7e1..b42ec7f  master     -> origin/master
 * [new tag]         0.1.0      -> 0.1.0
Updating ae4a7e1..b42ec7f
Fast-forward
 costmap_queue/CMakeLists.txt                       |  19 +++-
 .../include/costmap_queue/costmap_queue.h          |   2 +-
 .../include/costmap_queue/map_based_queue.h        |  91 +++++++++++-----
 costmap_queue/package.xml                          |   3 +-
 costmap_queue/test/mbq_test.cpp                    | 118 +++++++++++++++++++++
 costmap_queue/test/utest.cpp                       |  29 +++++
 dwb_critics/CMakeLists.txt                         |  16 +--
 dwb_critics/package.xml                            |   2 +-
 dwb_local_planner/CMakeLists.txt                   |  24 ++++-
 dwb_local_planner/package.xml                      |   2 +-
 dwb_msgs/CMakeLists.txt                            |   4 +-
 dwb_msgs/package.xml                               |   2 +-
 dwb_plugins/CMakeLists.txt                         |  23 ++--
 dwb_plugins/package.xml                            |   2 +-
 nav_2d_msgs/package.xml                            |   2 +-
 nav_2d_utils/CMakeLists.txt                        |  11 ++
 nav_2d_utils/package.xml                           |   2 +-
 nav_core2/CMakeLists.txt                           |   4 +
 nav_core2/package.xml                              |   2 +-
 nav_core_adapter/CMakeLists.txt                    |  15 ++-
 nav_core_adapter/package.xml                       |   2 +-
 robot_navigation/package.xml                       |   2 +-
 22 files changed, 313 insertions(+), 64 deletions(-)
 create mode 100644 costmap_queue/test/mbq_test.cpp
DLu commented 6 years ago

Ok, please let me know if you experience the problem again with the updated code.