Could not clear the obstacle_layer of costmap_2d package in ros hydro
Hi all,
I have followed the navigation tutorial for ros hydro this link and other link. I can see the obstacles are updated in the obstacle_layer. However the "clearing observation" task is not clear enough. For example, When I move in an move out the laser field of view, there are still several points can not be removed. Here is the link picture of obstacle_layer Did anyone have same problem before?
Here are my jaml and launch: Costmap_common_params
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.225,-0.225],[-0.225,0.225], [0.225, 0.225], [0.225,-0.225]]
#robot_radius: 0.225
inflation_radius: 0.55
obstacle_layer:
observation_sources: laser
laser: {sensor_frame: laser, data_type: LaserScan, topic: /scan, marking: true, clearing: true, inf_is_valid: true}
Local_costmap_params
local_costmap:
global_frame: /map
robot_base_frame: /base_footprint
update_frequency: 5.0
publish_frequency: 5.0
static_map: false
rolling_window: true
width: 6.0
height: 6.0
resolution: 0.01
plugins:
- {name: footprint_layer, type: "costmap_2d::FootprintLayer"}
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer" }
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
Global_costmap_params
global_costmap:
global_frame: /map
robot_base_frame: /base_footprint
update_frequency: 5.0
static_map: true
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
Move_base
enter code here
<!-- -->
<launch>
<!-- Run the map server -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find robot_platform)/maps/map.yaml" output="screen" clear_params="true"/>
<include file="$(find amcl)/examples/amcl_diff.launch" >
</include>
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find robot_platform)/params/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find robot_platform)/params/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find robot_platform)/params/local_costmap_params.yaml" command="load" />
<rosparam file="$(find robot_platform)/params/global_costmap_params.yaml" command="load" />
<rosparam file="$(find robot_platform)/params/base_local_planner_params.yaml" command="load" />
</node>
</launch>
Hi ,tl20003 ,I am coming across the same problem with you now .And I have tried almost all the ways that proposed by others,but in vain.Have you worked out the problem?
Hi, Yuichi, Have you solved that problem? I think our case is similar to this problem (http://answers.ros.org/question/30014/costmap-clearing-of-obstacles/). DimitriProsser suggested that we should use filter for laser scanner. However I did not check it by now.
Can you clarify what obstacles you want removed and why you want them removed, please?
Thanks David for your updating the post! The story is that, (1) I configure the navigation package using the jaml and launch file above (2) Then I run the program (3) I move around the laser field of view. Normally, when I move form one position to other position the program should clear the obstacles "laser points" from previous position. However as you can see in the picture, there are still several "laser points". That points are maintained until when I stop program.
According to DimitriProsser suggestion. I also used the range filter for laser data to remove the "inf", "nan" points. However I got the same result. What should I do to solve that problem?