Rosanswers logo

Hi, I'm trying to use hectorslam in conjuction with the navigation stack for automatic map exploration. My robot has odometry and laser sensors. Hectorslam works well (with joystick teleop by exemple) but I have some problems with the navigation stack. First of all, my robot has some problem to move because some wrong obstacle detection. Here a screenshot of my rviz output that shows inflated obstacles. There is inflated obstacles in the unknown areas. I don't understand why : image description http://data.imagup.com/10/1158436086.png

Following the navigation tutorial it shouldn't have inflated obstacle in unknown spaces : image description http://www.ros.org/wiki/costmap_2d?action=AttachFile&do=get&target=costmap_rviz.png

Here, my navigation configuration files :

psykokwak@robot:~/ros/workspace$ cat arobot/config/*
  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
  meter_scoring: true

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[0.2, 0.2], [0.2, -0.2], [-0.2, -0.2], [-0.2, 0.2]]
inflation_radius: 0.50

observation_sources: laser_scan_sensor

laser_scan_sensor: {sensor_frame: /laser, data_type: LaserScan, topic: /scan, marking: true, clearing: true}

  map_type: voxel
  global_frame: /map
  robot_base_frame: /base_link
  update_frequency: 1.0
  static_map: true

  map_type: voxel
  global_frame: /odom
  robot_base_frame: /base_link
  update_frequency: 5.0
  publish_frequency: 5.0
  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  resolution: 0.02

An other problem I have : My computer is an Intel core i5 and the "move_base" process take 40/50%... For comparaison, the "hector_mapping" process take only 10%...

Originally posted by psykokwak on ROS Answers with karma: 65 on 2012-07-31

Post score: 1

Original comments

Comment by psykokwak on 2012-08-01:
So, the local costmap does not take care of the map provided by hector/gmapping but takes care of the map provided by the map server ? Where is the difference ?


1 Answer 1


Rosanswers logo

The navigation stack creates a set of costmaps directly from the lasers scan data and not the map created with hector or gmapping. The laserscan data may indicate a wall and this is loaded into the costmap to create the inflated obstacles. If the map from hector has not been updated yet then the inflated obstacle costmap may lie partly in unknown space. This creates problems when using hector or gmapping with the navigation and exploration packages due to the differences between the costmaps and the map. I'm not sure if anyone has figured out a way to solve this yet. The navigation tutorial uses a fully made map provided by the map server so there is less discrepancies between the costmaps and the map.

Originally posted by Roy89 with karma: 133 on 2012-07-31

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by psykokwak on 2012-08-01:
I tried with a map server and AMCL and same problems : CPU overload with "[ WARN] [1343846310.236981111]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.0671 seconds" message error and obstacles and inflated obstacles on local costmap are wrong...

Comment by Roy89 on 2012-08-01:
You can change the desired rate to a lower value so you don't get a warning anymore in the yaml files for the costmap settings. What do you mean the costmaps are wrong completely wrong or just lying in unknown_space?

Comment by psykokwak on 2012-08-01:
just lying in unknown space and known space when the robot is lost (is it because it computes obstacles from map too ?). I've made some progress. But I don't understand why this module overloads my core i5.

Comment by Ernest on 2013-05-06:
"The laserscan data may indicate a wall and this is loaded into the costmap to create the inflated obstacles." Won't that only happen if AMCL is running? With hector_mapping, AMCL isn't necessary because odom is already provided - right?

Comment by StewartHemm74 on 2019-02-06:
Is Hector_mapping able to explore/navigate an unknown map?

Comment by jjbecomespheh on 2020-07-29:
@StewartHemm74 Nope, Hector_mapping cannot be used to explore/navigate an unknown map on its own. You might want to look into hector_navigation package or other exploration package like explore_lite or rrt_exploration.


Your Answer

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