Ask Your Question
0

Running move_base for navigation via gmapping.

asked 2012-10-15 00:33:32 -0600

Reza Ch gravatar image

updated 2012-10-16 02:51:04 -0600

Hi, I am using gmapping (localization and map) to run the navigation by move_base node and I have this famous error :

[ WARN] [1350293255.494001686]: The origin for the sensor at (-0.16, 0.68) is out of map bounds. So, the costmap cannot raytrace for it.

I am running a simple differential robot, gmapping node, laser node, and move_base.

I searched a lot to find a solution through many links available but nothing clearly explained where is the problem coming from. I appreciate any help. Thanks

Here are my yaml files:

TrajectoryPlannerROS:
  max_vel_x: 0.45
  min_vel_x: 0.1
  max_rotational_vel: 1.0
  min_in_place_rotational_vel: 0.4

  acc_lim_th: 3.2
  acc_lim_x: 2.5
  acc_lim_y: 2.5

  holonomic_robot: false

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.279, -0.225], [-0.279, 0.225], [0.479, 0.225], [0.479, -0.225]]
robot_radius: 0.20
inflation_radius: 0.15

observation_sources: laser_scan_sensor
# point_cloud_sensor

laser_scan_sensor: {sensor_frame: laser_link, data_type: LaserScan, expected_update_rate: 0.2, topic: scan, marking: true, clearing: true}

# point_cloud_sensor: {sensor_frame: frame_name, data_type: PointCloud, topic: topic_name, marking: true, clearing: true}

local_costmap:
  map_type: costmap
  global_frame: /map
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05

global_costmap:
  map_type: costmap
  global_frame: /map
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false

Edit: rxconsole output for the warning:

Node: /move_base
Time: 1350389366.400216263
Severity: Warn
Location: /tmp/buildd/ros-electric-navigation-1.6.5/debian/ros-electric-navigation/opt/ros/electric/stacks/navigation/costmap_2d/src/costmap_2d.cpp:Costmap2D::raytraceFreespace:739
Published Topics: /rosout, /cmd_vel, /move_base/current_goal, /move_base/goal, /move_base/global_costmap/obstacles, /move_base/global_costmap/inflated_obstacles, /move_base/global_costmap/unknown_space, /move_base/global_costmap/robot_footprint, /move_base/global_costmap/parameter_descriptions, /move_base/global_costmap/parameter_updates, /move_base/NavfnROS/plan, /move_base/NavfnROS/NavfnROS_costmap/obstacles, /move_base/NavfnROS/NavfnROS_costmap/inflated_obstacles, /move_base/NavfnROS/NavfnROS_costmap/unknown_space, /move_base/NavfnROS/NavfnROS_costmap/robot_footprint, /move_base/local_costmap/obstacles, /move_base/local_costmap/inflated_obstacles, /move_base/local_costmap/unknown_space, /move_base/local_costmap/robot_footprint, /move_base/local_costmap/parameter_descriptions, /move_base/local_costmap/parameter_updates, /move_base/TrajectoryPlannerROS/global_plan, /move_base/TrajectoryPlannerROS/local_plan, /move_base/TrajectoryPlannerROS/cost_cloud, /move_base/TrajectoryPlannerROS/parameter_descriptions, /move_base/TrajectoryPlannerROS/parameter_updates, /move_base/result, /move_base/feedback, /move_base/status, /move_base/parameter_descriptions, /move_base/parameter_updates

The origin for the sensor at (0.50, -0.01) is out of map bounds. So, the costmap cannot raytrace for it.
edit retag flag offensive close merge delete

Comments

well I increased it Lorenz. The rolling window is also already true. isn't is sth with my map dimensions maybe?

Reza Ch gravatar imageReza Ch ( 2012-10-15 01:44:36 -0600 )edit

yes, I changed it already to odom. And the the location for the error as rxconsole says is : Location: /tmp/buildd/ros-electric-navigation-1.6.5/debian/ros-electric-navigation/opt/ros/electric/stacks/navigation/costmap_2d/src/costmap_2d.cpp:Costmap2D::raytraceFreespace:739

Reza Ch gravatar imageReza Ch ( 2012-10-15 09:44:22 -0600 )edit

As I found from some discussions, it seems I didn’t realise that I had to configure the map to put its origin as in stage; but I don't know how to configure it.

Reza Ch gravatar imageReza Ch ( 2012-10-15 22:27:51 -0600 )edit

Could you maybe edit your question and copy-paste the complete contents of the window in rxconsole? We are not interested in the location in the code that signals the warning but in the logger that signals it. That way, we know if it is the local or the global costmap.

Lorenz gravatar imageLorenz ( 2012-10-16 01:03:13 -0600 )edit

Thanks a lot for your replies! I added the whole warning output then.

Reza Ch gravatar imageReza Ch ( 2012-10-16 02:12:24 -0600 )edit

Hm. Unfortunately the rxconsole output doesn't really help. I really thought it was possible to get the logger but apparently it's not. Can you set the map width and height of the global costmap to something like 50.0 and set origin_x and origin_y to -25.0? The origins might do the trick.

Lorenz gravatar imageLorenz ( 2012-10-16 03:52:27 -0600 )edit

Just a side note for future observers: the navigation robot setup tutorial states that you should have either "footprint" or "robot_radius" set, not both.

kwiesz91 gravatar imagekwiesz91 ( 2015-09-14 17:49:48 -0600 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2012-10-16 06:56:47 -0600

Reza Ch gravatar image

updated 2012-10-16 06:59:18 -0600

True!

Before I go through your last comment, I added one map to my global costmap and I got this warning:

[ WARN] [1350403608.110641000]: You have set map parameters, but also requested to use the static map. Your parameters will be overwritten by those given by the map server

Afterwards all were fine. I suppose it was getting the map origin values from that one. But then I turned off the static map and set the width: 50.0 and height: 50.0 then added this lines to local_costmap yaml files as you advised: origin_x: -25 origin_y: -25

So now the origin is defined and the sensor source is not out of bound anymore. Thanks

edit flag offensive delete link more
4

answered 2012-10-15 01:25:02 -0600

Lorenz gravatar image

updated 2012-10-15 03:18:55 -0600

My guess is that your global costmap is just too small. Either make it bigger by explicitly setting the width and height parameters or enable rolling_window.

Btw. the local_costmap should be in the odom frame, not in the map frame. It is important that the local costmap is in a continuous frame that does not 'jump'. Jumps in the local costmap's global frame would cause obstacles to be blurred which can have a negative effect on the local planner.

Edit: I think to isolate the problem, we should first find out if the global or the local costmap is generating the warning. Start rxconsole and double-click on the warning in there. It will show you information about the logger that generated the warning. Did you try setting the local costmap's global frame to odom?

edit flag offensive delete link more
1

answered 2013-01-17 03:10:06 -0600

camilla gravatar image

If you want to configure the origin of a static map you should use a .yaml file with this format:

image: testmap.png
resolution: 0.1
origin: [0.0, 0.0, 0.0]
occupied_thresh: 0.65
free_thresh: 0.196
negate: 0

You can get more details here: http://ros.org/wiki/map_server

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

Stats

Asked: 2012-10-15 00:33:32 -0600

Seen: 2,244 times

Last updated: Jan 17 '13