Ask Your Question
2

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

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

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: http://wiki.ros.org/navigation/Tutori...

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!

costmap_common_params.yaml:

robot_radius: 0.18

inflation_layer:
  inflation_radius: 0.50

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

global_costmap_params.yaml:

global_costmap:
   global_frame: /map
   robot_base_frame: /base_footprint
   update_frequency: 1.0
   publish_frequency: 0.5
   static_map: true
   transform_tolerance: 0.5
   plugins:
    - {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"}

local_costmap_params.yaml:

local_costmap:
   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
   plugins:
    - {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
2

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

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

Comments

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 imagekoenlek ( 2014-04-07 05:58:35 -0600 )edit
2

You can't visualize it directly with rviz, but if you look at https://github.com/ros-planning/navigation/blob/hydro-devel/costmap_2d/plugins/footprint_layer.cpp, you'll see that the footprint does get published as a polygon message, so you can rostopic echo it.

paulbovbel gravatar imagepaulbovbel ( 2014-04-08 04:29:15 -0600 )edit

Or write a small node that converts the polygon into markers, a la https://github.com/paulbovbel/frontier_exploration/blob/hydro-devel/src/explore_client.cpp#L50

paulbovbel gravatar imagepaulbovbel ( 2014-04-08 04:31:05 -0600 )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

2 followers

Stats

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

Seen: 2,526 times

Last updated: Apr 04 '14