0
$\begingroup$

Rosanswers logo

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/Tutorials/Using%20rviz%20with%20the%20Navigation%20Stack

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"} 

Originally posted by koenlek on ROS Answers with karma: 432 on 2014-03-24

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by paulbovbel with karma: 4518 on 2014-04-04

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by koenlek on 2014-04-07:
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.

Comment by paulbovbel on 2014-04-08:
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.

Comment by paulbovbel on 2014-04-08:
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

$\endgroup$