"Obstacles" not being added to costmap in Navigation Stack
Hi,
I'm running the Navigation Stack on my robot with no map, and publishing Point cloud messages to represent data coming in from Sonar sensors. Though I can plot the locations of the obstacles in Rviz using markers, they won't add to the costmap properly, such that even when an obstacle has been in range for a while, typing rostopic echo /move_base/local_costmap/obstacles
results in:
header:
seq: 153
stamp:
secs: 1328893241
nsecs: 331444433
frame_id: /odom
cell_width: 0.0500000007451
cell_height: 0.0500000007451
cells: []
I imagine when an obstacle is seen within range (which it is, as can be seen in Rviz), the cells: []
array becomes populated?
But it isn't - does anyone have an idea as to why not or what the problem might be? I've tried to post what I think might be useful below.
Thanks in advance,
Rohan
My yaml files and launch files look like this:
move_base.launch:
<launch>
<master auto="start"/>
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find quadcopter_2dnav)/yaml/PC_params_costmap2d.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find quadcopter_2dnav)/yaml/PC_params_costmap2d.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find quadcopter_2dnav)/yaml/local_costmap_params.yaml" command="load" />
<rosparam file="$(find quadcopter_2dnav)/yaml/global_costmap_params.yaml" command="load" />
<rosparam file="$(find quadcopter_2dnav)/yaml/local_costmap_params.yaml" command="load" />
</node>
</launch>
global_costmap_params.yaml:
global_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 5.0
static_map: false
local_costmap_params.yaml:
local_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.05
PC_params_costmap2d.yaml:
global_frame: odom
robot_base_frame: base_link
update_frequency: 20.0
publish_frequency: 20.0
publish_voxel_map: true
static_map: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.025
map_type: voxel
origin_z: -0.1
z_resolution: 1
z_voxels: 32
unknown_threshold: 10
mark_threshold: 0
transform_tolerance: 0.3
obstacle_range: 2.5
max_obstacle_height: 1.0
min_obstacle_height: 0.10
raytrace_range: 3.0
footprint: [[-0.4, -0.4], [-0.4, 0.4], [0.4,0.4], [0.4, -0.4]]
footprint_padding: 0.01
inflation_radius: 0.55
cost_scaling_factor: 10.0
observation_sources: point_cloud_sensorA
point_cloud_sensorA: {sensor_frame: 'base_sonarA', data_type: PointCloud, topic: '/sonar_data_to_pointcloud/point_cloud_sonar_dataA', marking: true, clearing: true}
EDIT 1:
After changing min_obstacle_height
to -1, the obstacle
message remains the same as above. The point cloud message being published looks like this:
header:
seq: 380
stamp:
secs: 1328903308
nsecs: 169542053
frame_id: base_link
points:
-
x: 1.16724598408
y: 0.0
z: -0.035000000149
channels:
-
name: intensities
values: [100.0]
Hence the point being registered is within range, yet it still doesn't appear on the obstacle list in the local costmap.