move_base crashes when ClearCostmapRecovery tries to clear inflation layer

asked 2020-08-20 04:52:53 -0500

Combinacijus gravatar image

Ubuntu 18.04, ROS Melodic, move_base 1.16.6

Solution: I solved it by removing 'inflation_layer' from ClearCostmapRecovery layer_names list.

Fail condition: ClearCostmapRecovery tries to clear inflation_layer.

Why I post here: I'm not sure if it's a bug or my mistake and where should I post it (here or on Github) but it was hard to find out what's wrong because move_base produced no log files and gdb debugger showed nothing helpful. So for documentation purposes I'll post it here.

Error messages: When launching move_base from launch file and fail condition occurs I get the error (note that specified log file wasn't created and yes I have tried to change log level via rqt to Debug but still no log file):

[move_base-20] process has died [pid 7137, exit code -11, cmd /opt/ros/melodic/lib/move_base/move_base __name:=move_base __log:=/home/combinac
ijus/.ros/log/d30d549c-e2c3-11ea-b8a6-24fd52462b1d/move_base-20.log].
log file: /home/combinacijus/.ros/log/d30d549c-e2c3-11ea-b8a6-24fd52462b1d/move_base-20*.log

When running via gdb debugger I get:

[ INFO] [1597914951.066748648]: local_costmap: Using plugin "inflation_layer"
[New Thread 0x7fffc7fff700 (LWP 8879)]
[ INFO] [1597914951.208678535]: Created local_planner dwa_local_planner/DWAPlannerROS
[ INFO] [1597914951.218172044]: Sim period is set to 0.10
[ INFO] [1597914951.560564121]: Recovery behavior will clear layer 'inflation_layer'
[ INFO] [1597914951.560674290]: Recovery behavior will clear layer 'sonar_layer''
[ INFO] [1597914951.637905724]: odom received!
[ WARN] [1597914961.955463448]: Clearing both costmaps to unstuck robot (0.50m).
Thread 7 "move_base" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdf5e4700 (LWP 8865)]
__GI___pthread_mutex_lock (mutex=0x3f999999a0000000)
    at ../nptl/pthread_mutex_lock.c:65
65      ../nptl/pthread_mutex_lock.c: No such file or directory.

Minimal reproducible setup: Config and launch files. I was also using range_sensor_layer::RangeSensorLayer plugin but I'm pretty sure it has nothing to do with this bug so I removed it from config files to make it shorter but still keeping crash behaviour.

# move_base_params.yaml
base_global_planner: "navfn/NavfnROS"
base_local_planner: "dwa_local_planner/DWAPlannerROS"

recovery_behavior_enabled: true

recovery_behaviors:
  - name: 'conservative_reset'
    type: 'clear_costmap_recovery/ClearCostmapRecovery'

conservative_reset:
  reset_distance: 0.5
  layer_names: ['inflation_layer']
--------------------------------------------------------------------------------------------
# local_costmap_params.yaml
local_costmap:
  global_frame: odom
  robot_base_frame: base_link
  # update_frequencyisualization frequency # TODO: lower for event
  rolling_window: true
  width: 5.0
  height: 5.0
  resolution: 0.025  # Can be different than static map

  plugins:
    - {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
--------------------------------------------------------------------------------------------
# global_costmap_params.yaml
global_costmap:
  global_frame: map
  robot_base_frame: base_link

  plugins:
      - {name: static_layer, type: 'costmap_2d::StaticLayer'}
      - {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
--------------------------------------------------------------------------------------------
# costmap_common_params.yaml
footprint: [[0.14, 0], [0.09, -0.3], [-0.32, -0.235], [-0.47, 0], [-0.32, 0.235], [0.09, 0.3]] # Simplified
footprint_padding: 0.01
inflation_radius: 0.35
--------------------------------------------------------------------------------------------
# base_local_planner_params.yaml
# Empty
--------------------------------------------------------------------------------------------
<!--move_base.launch-->    
<launch>
    <arg name="map_file" value="room_map3_clean.yaml"/>
    <node name="map_server" pkg="map_server" type="map_server" args="$(find samana)/maps/$(arg map_file)"/>

    <node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen">
    <!--<node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen" launch-prefix="xterm -e gdb - -args">-->
        <rosparam file="$(find samana)/config/move_base_params.yaml" command="load" /> 

        <rosparam file="$(find samana)/config/base_local_planner_params.yaml" command="load" />
        <rosparam file="$(find samana)/config/costmap_common_params.yaml ...
(more)
edit retag flag offensive close merge delete