No local costmap published after hydro migration
Dear fellow ROS-Devs,
I have recently upgraded from Groovy to Hydro. My launch config, which uses the move_base package, worked fine under Groovy but fails under Hydro.
Under Groovy, move_base used to publish a correct local costmap as 'nav_msgs/GridCells' on the topics:
/move_base/local_costmap/inflated_obstacles
/move_base/local_costmap/obstacles
/move_base/local_costmap/unknown_space
Under Hydro, move_base now publishes the local maps as message type 'nav_msgs/OccupancyGrid' on the topic:
/move_base/local_costmap/costmap
(as described here). I have experimented with adding the 'plugins' parameter to the move_base config files, but I get the same result as without it ('Loading from pre-hydro parameter style').
In rviz, I can add a map and choose '/move_base/local_costmap/costmap' as topic, and all status indicators show green. However, no map is shown. If I do the same for '/move_base/global_costmap/costmap', I can see the global costmap that resembles the one served by mapserver.
When debugging on the command line, 'rostopic list' shows all topics as expected. But 'rostopic echo /move_base/local_costmap/costmap' only shows an empty map:
ros@Base:~$ rostopic echo /move_base/local_costmap/costmap
header:
seq: 0
stamp:
secs: 1381741501
nsecs: 967703624
frame_id: map
info:
map_load_time:
secs: 0
nsecs: 0
resolution: 0.0500000007451
width: 119
height: 119
origin:
position:
x: -2.95
y: -2.95
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... 0 ]
Note: Data abbreviated here, but there are only 0's in the data field.
Any ideas why I cannot see obstacles in the local costmap any more?
Update 1
As requested by David, here is the output of 'rosparam get /move_base/local_costmap':
ros@Base:~$ rosparam get /move_base/local_costmap
footprint: '[[-0.4,-0.2],[0.4,-0.2],[0.4,0.2],[-0.4,0.2]]'
footprint_layer: {enabled: true}
footprint_padding: 0.01
global_frame: /odom_combined
height: 6
inflation_layer: {cost_scaling_factor: 10.0, enabled: true, inflation_radius: 0.5,
robot_radius: 0.46}
laser_scan_sensor: {clearing: true, data_type: LaserScan, marking: true, sensor_frame: /base_laser,
topic: /scan}
obstacle_layer: {enabled: true, max_obstacle_height: 2.0, obstacle_range: 2.5, raytrace_range: 3.0}
obstacle_layer_footprint: {enabled: true}
obstacles: {observation_sources: laser_scan_sensor}
origin_x: 0.0
origin_y: 0.0
plugins:
- {name: obstacle_layer, type: 'costmap_2d::ObstacleLayer'}
- {name: footprint_layer, type: 'costmap_2d::FootprintLayer'}
- {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
publish_frequency: 2.0
publish_voxel_map: false
resolution: 0.05
robot_base_frame: /base_frame
robot_radius: 0.46
rolling_window: true
static_map: false
transform_tolerance: 1.0
update_frequency: 5.0
width: 6
Note: This is without specifing any plugins for costmap_2d layers, hence using pre-hydro parameter style.
Can you please post the output of rosparam get /move_base/local_costmap
@david: Please see my updated post above
Two possibly dumb questions: 1) Are you using RViz from Hydro? 2) Do you have obstacles from your laser within 2.5 m of your robot?
Here are my answers: 1) Yes, I used RViz from Hydro 2) There are plenty obstacles <2.5m around the robot, I can see them as dots in the RViz laser scan visualization
If you rostopic echo /move_base/local_costmap/costmap_updates, are there any non-zero values? I'm trying to tell if your costmap isn't being updated properly, or something is wrong with the visualization side of things.