Rosanswers logo


I tried to visualize the costmap in RVIZ. The local costmap is published and visualized, while the global costmap doesn't publish any data. Since RVIZ is able to find the global costmap topic, I assume that it is advertised but no data are transmitted (no messages are received).

I use the following configuration:

  • cost_scaling_factor: 10.0
  • footprint: '[]'
  • global_frame: /map
  • height: 20
  • inflation_radius: 0.5
  • lethal_cost_threshold: 100
  • map_topic: map
  • map_type: costmap
  • mark_threshold: 0
  • max_obstacle_height: 0.6
  • max_obstacle_range: 20
  • observation_sources: scan
  • obstacle_range: 20
  • origin_x: 0.0
  • origin_y: 0.0
  • origin_z: 0.0
  • publish_frequency: 1.0
  • publish_voxel_map: false
  • raytrace_range: 3.0
  • resolution: 0.05
  • restore_defaults: false
  • robot_base_frame: /base_footprint
  • robot_radius: 0.18
  • rolling_window: false
  • scan: {clearing: true, data_type: LaserScan, marking: true, topic: /scan}
  • static_map: true
  • track_unknown_space: true
  • transform_tolerance: 0.5
  • unknown_cost_value: 255
  • unknown_threshold: 255
  • update_frequency: 1.0
  • width: 20
  • z_resolution: 0.2
  • z_voxels: 10

Hopefully someone could help or give me a hint.

Thanks, Daniel

Originally posted by dneuhold on ROS Answers with karma: 205 on 2013-09-25

Post score: 0

Original comments

Comment by Hendrik Wiese on 2013-09-25:
Not sure about this, but have you tried setting publish_voxel_map to true?

Comment by dneuhold on 2013-09-26:
Unfortunately the global_costmap is still not published! I appreciate every hint or idea to visualize it in rviz.

Comment by Hendrik Wiese on 2013-09-26:
What I meant with my (deleted) comment was: could you provide the whole costmap configuration file as it is. Not just the settings as they should be. Maybe there's another namespace issue...

Comment by David Lu on 2013-09-27:
What is the global topic you are listening on?

Comment by dneuhold on 2013-09-29:
The topic I am listening on is: /move_base/global_costmap/obstacles

The topic is "ok" (in rviz) but no messages are received. There is also no namespace issue, I checked every parameter twice.

Thanks to all of you

Comment by dornhege on 2013-09-30:
You might want to check that the publish_frequency is > 0.0 for the global costmap, when running the system. The safest way would be to dump the params, while it's running, so you see what's really going on.

Comment by David Lu on 2013-09-30:
Which version of ROS are you using?

Comment by dneuhold on 2013-09-30:
I use ROS groovy!

Comment by David Lu on 2013-09-30:
Can you visualize costmap/unknown_space?

Comment by dneuhold on 2013-09-30:
Yes, I am able to visualize all topics from the local_costmap (obstacles, unknown space and inflated_obstacles) but nothing from the global_costmap!

Comment by David Lu on 2013-09-30:
So global_costmap/unknown_space is empty as well?

Comment by dneuhold on 2013-09-30:
Exactly, it is empty as well.

Comment by David Lu on 2013-10-01:
Can you run rosparam get /move_base and post the output on pastebin, please?


1 Answer 1


Rosanswers logo

Hi, after some time trying to set the parameters correctly I realized that they are correct. But I localized the problem ... Since I configure all parameters directly from my code (with setparam("")) I assumed that this is the last instance which configures the parameters. If I perform a "rosparam get" in the console, all parameters are set according to the code.

But it seems that there is a bug ... a launch file from /move_base/global_costmap overwrites my parameters WITHOUT signalizing this on a "rosparam get"!!! So I just changed the publish_frequency there and everything worked fine! :)

Hopefully this helps you solving similar problems.

BR, Daniel

Originally posted by dneuhold with karma: 205 on 2013-11-04

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

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