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

Raytrace not clearing the costmap

asked 2016-04-10 23:21:13 -0600

automate gravatar image

Hi, I am using navigation stack for 2d navigation of UAV. I am using Hokuyo Lidar for obstacle detection. When the laser scan sees an obstacle it marks the points in costmap as obstacle. However if during the later scans if it doesnot find obstacle in the same spot it doesnt clear the obstacles from the costmap.

I havemarking: true, clearing: true, obstacle_range:2 and raytrace_range:20 in my costmap_common_params.yaml file. By these parameters I assume when no obstacles are seen by laserscan it shold clear area of 20m in front of it. But that doesnt happen. It clears around 1.5m area in front of it no matter what the raytrace_range is. Any insight as to what am I missing or what can i do will be very helpful.

I am using ROS Indigo.

Thanks. Please find below my costmap param files

costmap_common_params.yaml

obstacle_range: 2
raytrace_range: 20
footprint: [[-0.2,-0.2],[-0.2,0.2], [0.2, 0.2], [0.2,-0.2]]
#robot_radius: ir_of_robot
inflation_radius: 0.2

observation_sources: scan

scan: {sensor_frame: /laser, data_type: LaserScan, topic: /scan_filtered, marking: true, clearing: true}

global_costmap_params.yaml

global_costmap:
  global_frame: /map
  robot_base_frame: /base_link
  update_frequency: 1.0
  publish_frequency: 0.5
  static_map: false
  transform_tolerance: 5.0
  static_map: false
  rolling_window: true
  width: 50.0
  height: 50.0

local_costmap_params.yaml

local_costmap:
  global_frame: /map
  robot_base_frame: /base_link
  update_frequency: 50.0
  publish_frequency: 50.0
  static_map: false
  rolling_window: true
  width: 8.0
  height: 8.0
  resolution: 0.1
  transform_tolerance: 5.0
  planner_frequency: 5.0
  planner_patience: 5.0
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2016-04-11 02:11:59 -0600

Procópio gravatar image

Depending on the laser sensor, if a scan does not hit an obstacle, different values can be associated with it: nan, inf, etc... As a consequence, depending on the values on the /scan topic, the costmap may not treat it.

I am not sure how the hokuyo works, but you can try to add this line to your costmap config: inf_is_valid: true which means that the costmap will treat readings containing "inf" as valid, and therefore use it to clean or mark the costmaps.

If it does not help, you can try to filter your scan to remove and/or change values in its output to make sure they are valid numbers and withing min/max range. Check the laser_filters package.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-04-10 23:21:13 -0600

Seen: 3,285 times

Last updated: Apr 11 '16