range_sensor_layer creates a warning "Illegal bounds change, ... The offending layer is local_costmap/inflation_layer"

asked 2019-06-13 13:18:14 -0500

VitorHirozawa gravatar image

Hi, I am using ROS navigation stack (move_base) in a custom mobile robot. The robot uses a computer with Ubuntu 18.04.2 LTS and ROS Melodic (1.14.3). I am using a rgbd camera and a ultrasonic sensor.

When I setup to use plugin range_sensor_layer a warning appears in navigation launch log. The warning is "Illegal bounds change, ... The offending layer is local_costmap/inflation_layer".

Does anybody know why this warning appears? What means this warning?

When I disable the range_sensor_layer, the warning disappears. The topic that receives the range_sensor data is working good.

global_costmap_params.yaml:

global_costmap:
  global_frame: map
  robot_base_frame: base_footprint
  update_frequency: 0.5
  publish_frequency: 0.5
  static_map: true

  plugins: 
    - {name: static_layer,    type: "costmap_2d::StaticLayer"}       
    - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

local_costmap_params.yaml:

local_costmap:
  global_frame: odom
  robot_base_frame: base_footprint
  update_frequency: 2.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 4.0
  height: 4.0
  resolution: 0.025
  origin_x: -2.0      
  origin_y: -2.0      

  plugins:    
    - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}       
    - {name: sonar_layer,   type: "range_sensor_layer::RangeSensorLayer"}
    - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

costmap_common_params.yaml:

footprint: [[0.095,  -0.202], [-0.095,  -0.202], [-0.310, -0.165], [-0.310, 0.165], [-0.095, 0.202], [0.095, 0.202]]  
footprint_padding: 0.025            

#layer definitions
obstacle_layer:  
    obstacle_range: 3.5     
    raytrace_range: 4.0      

    observation_sources: point_cloud_sensor

    point_cloud_sensor: {
      sensor_frame: camera_link, 
      data_type: PointCloud2, 
      topic: openni_points, 
      expected_update_rate: 0.5, 
      marking: true, 
      clearing: true,
      min_obstacle_height: 0.0,
      max_obstacle_height: 2.0,                                                                            
      origin_z: 0.0,        
      z_resolution: 0.05,  
      z_voxels: 40,                  
      publish_voxel_map: true 
    }

sonar_layer:
      ns: /robot/sensor/
      topics: ['sonar_forward_left']                             

inflation_layer:
    inflation_radius: 1.20               
    cost_scaling_factor: 2.58                                                   

transform_tolerance: 1

controller_patience: 2.0

NavfnROS:
    allow_unknown: true

recovery_behaviors: [
    {name: conservative_clear, type: clear_costmap_recovery/ClearCostmapRecovery},
    {name: aggressive_clear, type: clear_costmap_recovery/ClearCostmapRecovery}
]

conservative_clear: 
    reset_distance: 3.00
aggressive_clear:
    reset_distance: 5.00

Log of my navigation launch with the warning: (partial)

...
[ INFO] [1560447863.203341245]: Using plugin "static_layer"
[ INFO] [1560447863.210058377]: Requesting the map...
[ INFO] [1560447863.412339590]: Resizing costmap to 279 X 208 at 0.050000 m/pix
[ INFO] [1560447863.512279360]: Received a 279 X 208 map at 0.050000 m/pix
[ INFO] [1560447863.515405260]: Using plugin "inflation_layer"
[ INFO] [1560447863.559205866]: Using plugin "obstacle_layer"
[ INFO] [1560447863.560737803]:     Subscribed to Topics: point_cloud_sensor
[ INFO] [1560447863.597831479]: Using plugin "sonar_layer"
[ INFO] [1560447863.601549444]: local_costmap/sonar_layer: ALL as input_sensor_type given
[ INFO] [1560447863.605397302]: RangeSensorLayer: subscribed to topic /robot/sensor/sonar_forward_left
[ INFO] [1560447863.630871186]: Approximate time sync = true
[ INFO] [1560447863.652196595]: Using plugin "inflation_layer"
[ WARN] [1560447863.712530171]: Illegal bounds change, was [tl: (-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000, -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000), br: (179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000, 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000)], but is now [tl: (-340282346638528859811704183484516925440.000000, -340282346638528859811704183484516925440.000000), br: (340282346638528859811704183484516925440.000000, 340282346638528859811704183484516925440.000000)]. The offending layer is local_costmap/inflation_layer
[ INFO] [1560447863.724870485]: Created local_planner base_local_planner/TrajectoryPlannerROS
[ INFO] [1560447863.736285311]: Sim period is set to 0.20
...

I can navigate with the robot regardless of the warning message. But when I comment the line of range_sensor_layer plugin in local_costmap_params.yaml, the warning is not shown.

local_costmap_params.yaml (with no warning):

...
plugins:    
    - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}       
    #- {name: sonar_layer,   type: "range_sensor_layer::RangeSensorLayer"}
    - {name: inflation_layer, type: "costmap_2d::InflationLayer"}
edit retag flag offensive close merge delete

Comments

As I wrote in #q325716: those bounds look very suspicious. I'd figure out where they come from.

gvdhoorn gravatar imagegvdhoorn ( 2019-06-14 01:51:34 -0500 )edit

Thanks for your comments @gvdhoorn. Unfortunately, I have no idea how to debug this warning.

VitorHirozawa gravatar imageVitorHirozawa ( 2019-06-14 10:56:22 -0500 )edit

Can you check whether you have the latest version of all packages installed? If you did a partial update there could be an ABI problem causing strange things.

gvdhoorn gravatar imagegvdhoorn ( 2019-06-14 11:37:31 -0500 )edit

Previously I did sudo apt-get update and sudo apt-get upgrade. To confirm I did both commands again, upgraded all packages and the warning persists.

VitorHirozawa gravatar imageVitorHirozawa ( 2019-06-14 13:52:24 -0500 )edit