Ask Your Question
4

move_base warning sensor out of bounds

asked 2011-04-28 23:53:32 -0500

Miguel Prada gravatar image

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 flag offensive close merge delete

Comments

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
Jack Sparrow gravatar image Jack Sparrow  ( 2011-04-29 00:54:37 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2011-04-29 20:15:26 -0500

gazkune gravatar image

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

I hope this can help you!

edit flag offensive delete link more

Comments

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.
Miguel Prada gravatar image Miguel Prada  ( 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?

Ziwen Qin gravatar image Ziwen Qin  ( 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.

peterwe gravatar image peterwe  ( 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.

jinseoi gravatar image jinseoi  ( 2017-11-05 01:23:11 -0500 )edit
0

answered 2020-11-04 06:04:25 -0500

Alessandro Melino gravatar image

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
  inflation_radius: 0.75
  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"
  robot_base_frame: "base_link"
  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"
  robot_base_frame: "base_link"
  #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

edit flag offensive delete link more
0

answered 2020-03-22 07:47:06 -0500

Kyuhwan Yeon gravatar image

I reply the same problem at here: link text This answer is the same with link.

Hi there,

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

  1. Open global_costmap_params.yaml
  2. Add below statement

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!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-04-28 23:53:32 -0500

Seen: 12,440 times

Last updated: Nov 04 '20