ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Could not clear the obstacle_layer of costmap_2d package in ros hydro

asked 2014-06-04 09:18:20 -0600

tl20003 gravatar image

updated 2014-06-13 12:32:26 -0600

David Lu gravatar image

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>
edit retag flag offensive close merge delete

Comments

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?

Yuichi Chu gravatar image Yuichi Chu  ( 2014-06-05 03:26:16 -0600 )edit

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.

tl20003 gravatar image tl20003  ( 2014-06-08 22:44:00 -0600 )edit

Can you clarify what obstacles you want removed and why you want them removed, please?

David Lu gravatar image David Lu  ( 2014-06-13 12:34:37 -0600 )edit

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.

tl20003 gravatar image tl20003  ( 2014-06-16 14:11:13 -0600 )edit

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?

tl20003 gravatar image tl20003  ( 2014-06-16 14:16:59 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-06-17 02:55:02 -0600

Enrique gravatar image

If you're using a REP 117 compliant laser/driver, like the hokuyo_node, you must use navigation +1.11.5 and pass the inf_is_valid param to your global and local costmap configuration. Otherwise, when the laser doesn't see anything you'll have +Inf, and they're not converted from LaserScan to PC in the costmap_2d code, and consequently nothing is cleared.

edit flag offensive delete link more

Comments

Thanks Enrique, I will check and let you know.

tl20003 gravatar image tl20003  ( 2014-06-17 23:45:04 -0600 )edit
1

answered 2014-06-16 15:45:12 -0600

David Lu gravatar image

I think I understand what you're saying; correct me if I'm wrong.

The navstack will only remove an obstacle from the costmap if there is a clearing observation that will remove it. Simply moving the obstacle will not remove it if there is no clearing observation.

edit flag offensive delete link more

Comments

Thanks David. It is not totally true. I still do not know what is the reason. In my case, the navstack can remove the moving obstacles from the costmap. However, it did not remove clearly. Several points were still remained as you can see in the area "After move out the laser field of view" in the picture that I linked above.

tl20003 gravatar image tl20003  ( 2014-06-17 01:36:18 -0600 )edit

Can you add another picture with the sensor data visualized, before and after the move. Also, just to be specific, what is moving? The robot or the obstacle?

David Lu gravatar image David Lu  ( 2014-06-17 09:55:28 -0600 )edit

Hi David, In my case the robot is stable and the obstacle is moving.

tl20003 gravatar image tl20003  ( 2014-06-17 23:42:51 -0600 )edit

Are you also able to add another picture?

David Lu gravatar image David Lu  ( 2014-06-24 14:31:37 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2014-06-04 09:18:20 -0600

Seen: 1,680 times

Last updated: Jun 17 '14