# move_base warning sensor out of bounds

I'm trying to set up the navigation stack to work on a differential drive mobile platform (the Pekee 2 robot by Wany) and I'm having issues to make it work.

I've already followed the steps in the tutorial in http://www.ros.org/wiki/navigation/Tu... to set up the robot, and I've successfully created a map of the environment I want to test it in by using the slam_gmapping node.

However, when I run the whole thing, the move_base node keeps outputting a warning that says

[ WARN] [1304077069.890195016]: The origin for the sensor at (0.42, -0.22, 0.23) is out of map bounds. So, the costmap cannot raytrace for it.
[ WARN] [1304077070.090216854]: The origin for the sensor at (0.43, -0.24, 0.23) is out of map bounds. So, the costmap cannot raytrace for it.
[ WARN] [1304077070.290202557]: The origin for the sensor at (0.46, -0.28, 0.23) is out of map bounds. So, the costmap cannot raytrace for it.
[ WARN] [1304077070.490195304]: The origin for the sensor at (0.47, -0.29, 0.23) is out of map bounds. So, the costmap cannot raytrace for it.
[ WARN] [1304077070.690157122]: The origin for the sensor at (0.48, -0.30, 0.23) is out of map bounds. So, the costmap cannot raytrace for it.
[ WARN] [1304077070.890200670]: The origin for the sensor at (0.51, -0.31, 0.23) is out of map bounds. So, the costmap cannot raytrace for it.
[ WARN] [1304077071.090191993]: The origin for the sensor at (0.52, -0.31, 0.23) is out of map bounds. So, the costmap cannot raytrace for it.


(I put several lines to note that the sensor origin changes at the robot spins, in case it's important)

In addition, when I try to send a goal the robot starts spinning around and an additional warning which says

[ WARN] [1304077075.656158292]: The robot's start position is off the global costmap. Planning will always fail, are you sure the robot has been properly localized?


Until it stops with an error

[ERROR] [1304077075.706049498]: Aborting because a valid plan could not be found. Even after executing all recovery behaviors


The thing is that using rviz, after setting up the initial pose, the robot footprint is fully inside the map, as well as the whole pose array cloud in the /particlecloud topic (after teleoperating the robot around for a while).

Can anyone help me with this? I'll try to get more insight of how the navigation stack works, but I'd really like to have something working even before knowing what exactly is going on because of deadline issues.

edit retag close merge delete

There is probably problem with your localization. Global costmap uses map from map server for it's costmap. When you haven't localized properly your robot, robot might get outside your map borders and then you receive and error. There might be also a problem with your transformations. Cheers
( 2011-04-29 00:54:37 -0500 )edit

Sort by » oldest newest most voted

Hi Miguel,

It seems that the transform between the /map frame and the /odom frame works fine for you. From the warning you get I would say that you have some configuration parameters of the costmaps that are not set correctly. The move_base node uses two costmaps, the local costmap and the global costmap. If you are using a map, make sure to configure the global costmap as static map. However, the local one should not be static (look at the rolling_window parameter). You can find all the parameters at http://www.ros.org/wiki/costmap_2d

more

Hi gazkune. It was indeed a problem with the costmap configuration parameters. Few days ago I was trying to run the navigation without using a map, and I must have changed the static map parameter to false in the global costmap yaml back then. It was quite a stupid mistake after all. Thanks.
( 2011-04-29 20:56:13 -0500 )edit

I am confused, When I run the navigation without using a map, Should I set "static_map" true or false in the global costmap yaml?

( 2016-12-01 20:24:53 -0500 )edit

When you run the navigation stack without a prior map, you should set "static_map: true". This means that the map does not get updated over time.

( 2017-04-13 09:14:56 -0500 )edit

Actually, you can set "static_map: false", and set global_map as a rolling window like what you set parameter for local_map. Navigation without a prior map will also work.

( 2017-11-05 01:23:11 -0500 )edit

Hello.

I have the same issue, but I am using ROS Noetic.

Here are my .yaml files if you want to check what is wrong.

costmap_common_param:

footprint: [[-0.27 , 0.4], [0.83, 0.4], [0.83, -0.4], [-0.27, -0.4]]

inflation_layer:
enabled: true
cost_scaling_factor: 6.0

#map_type: voxel

#static_map:
# enabled: true

pointcloud_layer:
enabled:               true
max_obstacle_height:   1.5    #meters
origin_z:              0.0    #meters
z_resolution: 0.2
z_voxels: 2
unknown_threshold:     15     #voxel height
mark_threshold:        0      #voxel height
combination_method:    1      #1=max, 0=override
track_unknown_space:   true   #default space is unknown
obstacle_range:        3.0    #meters
raytrace_range: 3.5
publish_voxel_map: true
observation_sources:   camera
camera:
data_type: PointCloud2
topic: /camera/depth/color/points
marking: true
clearing: true
min_obstacle_height: 0.3     #default 0, meters
max_obstacle_height: 1.5     #defaule 3, meters


global_costmap_params:

global_costmap:
plugins:
- {name: static_map,       type: "costmap_2d::StaticLayer"}
#- {name: pointcloud_layer_temp, type: "spatio_temporal_voxel_layer/SpatioTemporalVoxelLayer"} #Pointcloud layer working
- {name: pointcloud_layer, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}

global_frame: "map"
update_frequency: 2.0
publish_frequency: 10.0
resolution: 0.02
transform_tolerance: 0.5
#static_map: true


local_costmap_params:

local_costmap:
plugins:
- {name: pointcloud_layer, type: "costmap_2d::VoxelLayer"}
#- {name: pointcloud_layer_temp, type: "spatio_temporal_voxel_layer/SpatioTemporalVoxelLayer"} #Pointcloud layer working
- {name: inflation_layer,  type: "costmap_2d::InflationLayer"}

update_frequency: 2.0
publish_frequency: 10.0
global_frame: "odom"
#static_map: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.02


I have the static_map parameter commented because a message said that this parameter is deprecated in Noetic.

Best regards. Alessandro

more

Hi there,

I met the same problem today, and I solved this problem.

1. Open global_costmap_params.yaml

rolling_window: true

Example in my global_costmap_params.yaml:

global_costmap: global_frame: /map robot_base_frame: /base_footprint
update_frequency: 1.0
publish_frequency: 0.5 static_map: true transform_tolerance: 0.5
rolling_window: true plugins: - {name: static_layer, type: "costmap_2d::StaticLayer"} - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

I hope this way also effective in your project!

more