Ask Your Question

How to show the robot footprint in new hydro costmap system?

asked 2014-03-24 12:42:58 -0500

koenlek gravatar image

Since Hydro a new system is used for the costmaps. Unfortunately, documentation largely still needs to be updated, so it seems?

I have gotten it nearly completely working. Properly, by using the plugins and proper namespaces in the .yaml files.

Instead of using these topics in RVIZ: /move_base/local_costmap/obstacles /move_base/local_costmap/inflated_obstacles /move_base/local_costmap/robot_footprint As described here:

I think I have to visualize the footprint, obstacles and inflated obstacles all by using the costmaps themselves. My problem is however that I cant succeed to visualize the footprint (such a shown in this figure). Not in the old way () nor in the new way (as part of the local and/or global costmap). Moreover, the old methods (such as /move_base/local_costmap/inflated_obstacles) all don't work any more.

My files are given below. What am I doing wrong? I tried all kind of stuff, like putting robot_radius under footprint_layer namespace, using the footprint parameter to specify a polygon instead, etc. All to no avail.

Any help would be very much appreciated!


robot_radius: 0.18

  inflation_radius: 0.50

  observation_sources: scan
  scan: {
    data_type: LaserScan, 
    topic: scan, 
    marking: true, 
    clearing: true, 
    min_obstacle_height: 0.25, 
    max_obstacle_height: 0.35


   global_frame: /map
   robot_base_frame: /base_footprint
   update_frequency: 1.0
   publish_frequency: 0.5
   static_map: true
   transform_tolerance: 0.5
    - {name: footprint_layer, type: "costmap_2d::FootprintLayer"}
    - {name: static_map_layer, type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer,  type: "costmap_2d::VoxelLayer"}
    - {name: inflation_layer,   type: "costmap_2d::InflationLayer"}


   global_frame: /odom
   robot_base_frame: /base_footprint
   update_frequency: 5.0
   publish_frequency: 2.0
   static_map: false
   rolling_window: true
   width: 4.0
   height: 4.0
   resolution: 0.02
   transform_tolerance: 0.5
    - {name: footprint_layer, type: "costmap_2d::FootprintLayer"}
    - {name: obstacle_layer,  type: "costmap_2d::VoxelLayer"}
    - {name: inflation_layer,   type: "costmap_2d::InflationLayer"}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-04 12:21:03 -0500

paulbovbel gravatar image

Try using a proper footprint instead of robot_radius in the root of the costmap config (e.g. footprint: [[0.1, 0.0], [0.0, 0.1], [0.0, -0.1], [-0.1, 0.0]])

It's counterintuitive, but you don't need to spawn the footprint layer. Your obstacle layer will create that on it's own. Take a look in the rqt dynamic reconfigure client to get an idea of how things are laid out after you initialize them.

edit flag offensive delete link more


Unfortunately, I still cant visualize the footprint. It does seem to work like this however: increasing the footprint size will influence the look of the inflation of the costmaps (I can see from dynconf). But I just would like to know if it is possible to visualize the footprint itself as well.

koenlek gravatar image koenlek  ( 2014-04-07 05:58:35 -0500 )edit

You can't visualize it directly with rviz, but if you look at, you'll see that the footprint does get published as a polygon message, so you can rostopic echo it.

paulbovbel gravatar image paulbovbel  ( 2014-04-08 04:29:15 -0500 )edit

Or write a small node that converts the polygon into markers, a la

paulbovbel gravatar image paulbovbel  ( 2014-04-08 04:31:05 -0500 )edit

Your Answer

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

Add Answer

Question Tools



Asked: 2014-03-24 12:42:58 -0500

Seen: 2,999 times

Last updated: Apr 04 '14