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

local cost map not updated

asked 2014-08-14 03:55:24 -0500

dreamcase gravatar image

Hi, All,

I am using a 6m laser range finder to generate local cost map. (Hokuyo URG). I found the the local cost map was not updated promptly.

what happens is that, whenever an obstacle occurs in the range. an inflated object is generated in the local cost map. however, after it disappears, the inflated object remains there for a very long time.

I have set the cost map update frequency to 10Hz. but it does not seems to help. any other suggestion?

I have an unverified postulation here. on the actual laser packets received, after the obstacle disappears, the range readings at that particular points becomes 0 or NaN. somehow cost_map_2D keeps the old data if the particular beam is 0.

thanks

ray

edit retag flag offensive close merge delete

Comments

http://wiki.ros.org/costmap_2d#Markin...

I notice the error could be an anomaly in clearing process. somehow, the clearing part is not functioning.

below is my config file. can someone help me check it?

costmap_common_params.yaml

obstacle_range: 4.0
raytrace_range: 4.0
transform_tolerance: 5.0
footprint: [[0.75,0.4], [0.8, 0], [0.75, -0.4],[-0.75, -0.4], [-0.75, 0.4]]

robot_radius: 1.0
inflation_radius: 2.0
footprint_padding: 0.01
cost_scaling_factor: 7
lethal_cost_threshold: 100
observation_sources: laser_scan_sensor point_cloud_sensor

laser_scan_sensor: {sensor_frame: local_laser, data_type: LaserScan, topic: localscan, marking: true, clearing: true}
point_cloud_sensor: {sensor_frame: local_laser, data_type: PointCloud, topic: point_cloud, marking: true, clearing: true}

local_costmap_params.yaml

local_costmap:
 global_frame: /world
  robot_base_frame: base_link
  update_frequency: 5.0
  transform_tolerance: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true

  width: 10.0
  height: 10.0
  resolution: 0.05

  origin_x: -293.6
  origin_y: -100.0
  allow_unknown: false
dreamcase gravatar image dreamcase  ( 2014-08-14 05:45:20 -0500 )edit

can you please also post the output of rostopic list ?

pkohout gravatar image pkohout  ( 2014-08-14 08:25:45 -0500 )edit

some more observations. if change the laser source to SICK long range laser LMS111, the cost map gets updated properly.

has it something to do with the resolution of the laser? what if the laser is not able to cover all the 5cmx5cm grid within the local cost map? does it cause residues on the local cost map?

dreamcase gravatar image dreamcase  ( 2014-08-14 13:09:33 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-08-14 09:17:33 -0500

paulbovbel gravatar image

updated 2014-08-14 09:19:35 -0500

This looks like it's being caused by your laser driver reporting 0 and NaN when you'd like it to report maxRange or inf.

This can be a safety constraint when your scanner can't detect anything in range, in case of situations such as scanning a mirrored surface which doesn't get picked up as on obstacle. In practice, for controlled environments, this is probably not your desired behaviour.

You can setup a custom node, or implement a laser_filter which would convert the 0s and NaNs to maxRange (which the costmap obstacle layer will pick up as 'no obstacles') or inf (which requires the inf_is_valid parameter to be set on the costmap obstacle layer for that sensor), and then republish the scan message on a filtered topic. This will allow the costmap to properly clear 'empty space' for rays with no obstacles in range.

edit flag offensive delete link more

Comments

Does anyone know exactly how to implement a solution like this? I'm not sure where to start. How do I use laser_filter to get rid of 0s and NaNs for maxRange and inf?

musiqsoulchild gravatar image musiqsoulchild  ( 2015-03-23 02:30:17 -0500 )edit

I encountered the same problem. Anyone plz??

kevin.kuei.0321@gmail.com gravatar image kevin.kuei.0321@gmail.com  ( 2015-10-29 20:26:41 -0500 )edit
0

answered 2015-11-01 20:37:10 -0500

kevin.kuei.0321@gmail.com gravatar image
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-08-14 03:55:24 -0500

Seen: 3,567 times

Last updated: Nov 01 '15