obstacle_layer does not clear area
I'm experiencing a very strange and to me random behavior from the obstacle_layer
. To visualize my point I recorded a bag file and launched it over and over again with the same settings. The situation is like this: The costmap is getting initialized with a previously recorded pgm image. Without changing the settings of the *_params. files I get different outcomes. I moved the trash can in the lower left corner to the area right-above its original position. Sometimes the original position gets cleared (as called for) and sometimes it does not get cleared. Can anybody help me with that problem?
UPDATE
I reached the necessary karma level and can provide you with screen shots. So the "real world situation" is like that. I place and do not move the robot. Then I move the trash can from its original position (just when you come through the door to your right) to its new position (right wall). The screen shots are taken at the approximately same time but as mentioned above with different outputs from different runs.
The first image shows the situation when the clearing does not seem to work and the second image shows the situation where the clearings works as expected. The effect can also be seen at the left wall of the entrance door. The green dots should visualize the clearing_endpoints
and the red dots represent the laser scan.
If relevant: I use Hydro on an Ubuntu 12.04 LTS.
global_costmap_params.yaml:
global_costmap:
update_frequency: 5.0
publish_frequency: 2.0
static_map: true
rolling_window: false
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
costmap_common_params.yaml:
global_frame: /map
robot_base_frame: /base_link
map_type: voxel
publish_voxel_map: true
footprint: [[0.235, 0.31], [-0.515, 0.31], [-0.515, -0.31], [0.235, -0.31]]
static_layer:
map_topic: /map
obstacle_layer:
max_obstacle_height: 2.0
obstacle_range: 2.5
raytrace_range: 3.0
origin_z: -0.08
z_resolution: 0.2
z_voxels: 6
unknown_threshold: 6
mark_threshold: 0
track_unknown_space: true
combination_method: 0
observation_sources: laser
laser: {sensor_frame: base_laser_link, data_type: LaserScan, topic: scan, marking: true, clearing: true}
move_base.launch:
<?xml version="1.0" encoding="UTF-8" ?>
<launch>
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">
<!-- default:20.0. with this value dwa planner fails to find a valid plan a lot more -->
<param name="controller_frequency" value="10.0" />
<param name="controller_patience" value="15.0" />
<param name="planner_frequency" value="2.0" />
<param name="clearing_rotation_allowed" value="false" />
<rosparam file="$(find scitos_2d_navigation)/scitos_move_base_params/costmap_common_params.yaml" command="load" ns="global_costmap" />
<!--
<rosparam file="$(find scitos_2d_navigation)/scitos_move_base_params/local_costmap_params.yaml" command="load" />
-->
<rosparam file="$(find scitos_2d_navigation)/scitos_move_base_params/global_costmap_params.yaml" command="load" />
<param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
<rosparam file="$(find scitos_2d_navigation)/scitos_move_base_params/dwa_planner_ros.yaml" command="load" />
</node>
</launch>
launch-file for starting the bag-file:
<?xml version="1.0" encoding="UTF-8" ?>
<launch>
<!-- launch map server -->
<!--
<node name="map_server" pkg="map_server" type="map_server" args="$(find scitos_2d_navigation)/maps/floorsix.yaml"/>
-->
<!--
set up time nicely so there is no problem with old, outdated timestamps; rosparam set use_sim_time true
-->
<param name="/use_sim_time" value="true"/>
<node pkg="rosbag" type ...
I think you have adequate karma now. Please post pictures, because otherwise it is unclear what you are talking about. If you can't post pictures on the forum, please upload them elsewhere and link to them.
Thanks David. I updated my question with the screen shots.
Does the laser you're using move relative to the base of the robot? (like the PR2's tilting laser?)
The tf tree is fixed. So no moving lasers or anything.