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

cannot clear obstacles in costmap

asked 2016-05-25 22:36:03 -0500

NicoNie gravatar image

updated 2016-05-26 22:41:27 -0500

  I am quite a beginner in ros, and when I used the turtlebot to test the ros nav stack, the bot often stucked though some recovery behaviors(the default behaviors of ros nav stack) were operated, and the error is "Aborting because a valid plan could not be found. Even after executing all recovery behaviors". It seemed that there were lots of obstales around the turtlebot in the costmap of rviz,  but in fact it was not the case. The costmap cannot clear the old or sudden obstacles(like people walking by). I have tried to  change some parameters(such as the robot radius), but it didn't work. Also I have tried to call the ~clear_costmaps services, and still made no sense. So if anybody  can tell me what should i do to solve the problem, and how can I improve the performance of ros nav stack?Thanks

Update the costmap_common_params.yaml

max_obstacle_height: 0.60  # assume something like an arm is mounted on top of the robot
robot_radius: 0.26  # distance a circular robot should be clear of the obstacle (kobuki: 0.18)
map_type: voxel
obstacle_layer:
  enabled:              true
  max_obstacle_height:  0.6
  origin_z:             0.0
  z_resolution:         0.2
  z_voxels:             2
  unknown_threshold:    15
  mark_threshold:       0
  combination_method:   1
  track_unknown_space:  true   
  obstacle_range: 2.5
  raytrace_range: 3.0
  origin_z: 0.0
  z_resolution: 0.2
  z_voxels: 2
  publish_voxel_map: false
  observation_sources:  scan bump
  scan:
    data_type: LaserScan
    topic: scan
    marking: true
    clearing: true
    min_obstacle_height: 0.05
    max_obstacle_height: 0.45
  bump:
    data_type: PointCloud2
    topic: mobile_base/sensors/bumper_pointcloud
    marking: true
    clearing: false
    min_obstacle_height: 0.0
    max_obstacle_height: 0.35

inflation_layer:
  enabled:              true
  cost_scaling_factor:  10.0  # exponential rate at which the obstacle cost drops off (default: 10)
  inflation_radius:     0.28  # max. distance from an obstacle at which costs are incurred for planning paths.
static_layer:
  enabled:              true

Update the global_costmap_params.yaml

global_costmap:
   global_frame: /map
   robot_base_frame: /base_footprint
   update_frequency: 1.0
   publish_frequency: 0.5
   static_map: true
   transform_tolerance: 0.5
   plugins:
     - {name: static_layer,            type: "costmap_2d::StaticLayer"}
     - {name: obstacle_layer,          type: "costmap_2d::VoxelLayer"}
     - {name: inflation_layer,         type: "costmap_2d::InflationLayer"}

Update the local_cosmtap_params.yaml

local_costmap:
   global_frame: odom
   robot_base_frame: /base_footprint
   update_frequency: 5.0
   publish_frequency: 2.0
   static_map: false
   rolling_window: true
   width: 4.0
   height: 4.0
   resolution: 0.05
   transform_tolerance: 0.5
   plugins:
    - {name: obstacle_layer,      type: "costmap_2d::VoxelLayer"}
    - {name: inflation_layer,     type: "costmap_2d::InflationLayer"}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-05-26 03:11:21 -0500

stfn gravatar image

updated 2016-05-26 03:22:26 -0500

The navigation stack is huge, so hundreds of parameters need to be tuned to your specific situation. It is impossible to help you without a very detailed description of your setup. However, there is a guideline on common mistakes and assumptions to check.

The most obvious thing to me would be to check if the clearing parameter in your costmap observation sensor config (usually costmap_common_params.yaml) is set to true anf if raytrace_range is big enough. If you use a VoxelGrid for obstacles, visualize the voxels and raytrace endpoints in RViz for any hints on what is going wrong.

edit flag offensive delete link more

Comments

I have not enough points to upload my config files, the clearing parameter is set to true and the raytrace_range is 3, also I use a VoxelGrid both in global_costmap and local_costmap. I use a kinect like rgbd camera to detect the environment. Thansk for you answer, it helped me a lot.

NicoNie gravatar image NicoNie  ( 2016-05-26 22:36:45 -0500 )edit

Well you set the clearing param for your bump sensor (PointCloud2) to false. Therefore the Laserscanner alone is used for clearing, i.e. you mark in 3D but clear only in 2D. That should be the cause of your trouble.

stfn gravatar image stfn  ( 2016-05-27 04:27:12 -0500 )edit

Question Tools

Stats

Asked: 2016-05-25 22:36:03 -0500

Seen: 1,499 times

Last updated: May 26 '16