0
$\begingroup$

Rosanswers logo

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.

Originally posted by Reza Ch on ROS Answers with karma: 22 on 2012-10-15

Post score: 0


Original comments

Comment by Reza Ch on 2012-10-15:
well I increased it Lorenz. The rolling window is also already true. isn't is sth with my map dimensions maybe?

Comment by Reza Ch on 2012-10-15:
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

Comment by Reza Ch on 2012-10-15:
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.

Comment by Lorenz on 2012-10-16:
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.

Comment by Reza Ch on 2012-10-16:
Thanks a lot for your replies! I added the whole warning output then.

Comment by Lorenz on 2012-10-16:
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.

Comment by kwiesz91 on 2015-09-14:
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.

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

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?


Originally posted by Lorenz with karma: 22731 on 2012-10-15

This answer was NOT ACCEPTED on the original site

Post score: 4

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by Reza Ch with karma: 22 on 2012-10-16

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by camilla with karma: 255 on 2013-01-17

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.