Ask Your Question

obstacle add from voxel_layer cannot clear

asked 2016-12-04 23:08:28 -0600

chengwei gravatar image

updated 2016-12-04 23:14:10 -0600

I am trying to test the obstacle avoid in my robot, I am using a laserscan and a pointcloud2 sensors to get the information of the obstacles, they add the obstacles right in the 2d visualization, the obstacle added from laser can clear automatically, but the obstacle add from the 3D depth sensor can't clear automatically. Anyone encounter this problem? Any suggests?

here is navigation configure(move_base) :


   global_frame: /odom
   robot_base_frame: /base_link 
   update_frequency: 3
   publish_frequency: 3
   static_map: false
   rolling_window: true
   width: 6.0
   height: 6.0
   resolution: 0.025
   transform_tolerance: 1.0
   map_type: costmap

     #enabled: false

        - {name: obstacle_layer,  type:

    - {name: voxel_layer, type: "costmap_2d::VoxelLayer"}
    - {name: inflation_layer,   type: "costmap_2d::InflationLayer"}


   global_frame: /map
   robot_base_frame: /base_link    
   update_frequency: 3
   publish_frequency: 0.2
   static_map: true
   rolling_window: false
   resolution: 0.025
   transform_tolerance: 1.0
   map_type: costmap
        enabled: false


  cost_scaling_factor: 0.5  
  inflation_radius: 0.35 #0.45
  robot_radius: 0.35

  obstacle_range: 2.5
  raytrace_range: 3.0
  max_obstacle_height: 1.6 #1.3
  min_obstacle_height: 0.03
  observation_sources: scan
  scan: {data_type: LaserScan, topic: /scan, marking: true, clearing: true, expected_update_rate: 0, inf_is_valid: true}

  enabled: true
  origin_z: 0.0
  z_resolution: 0.05
  z_voxels: 10
  unknown_threshold: 0
  #mark_threshold: 2
  publish_voxel_map: true
  combination_method: 1
  observation_sources: output_points  # from the 3D depth sensor
    data_type: PointCloud2
    topic: /output_points
    marking: true
    clearing: true
    obstacle_range: 1.90
    raytrace_range: 2.00
    min_obstacle_height: 0.00
    max_obstacle_height: 3.00
    mark_threshold: 3
    observation_persistence: 2.0
edit retag flag offensive close merge delete


Hi chengwei, Do you solve this problem? I also encounter this problem too. If you solve it, can you share the answer?

Thanks a lot

simon.xm.lee gravatar imagesimon.xm.lee ( 2017-03-01 04:03:26 -0600 )edit

Hi, Simon, I also in solving this problem, and I think the question is caused by the narrow vision, and the fellow link might help. field of vision

chengwei gravatar imagechengwei ( 2017-03-01 20:09:07 -0600 )edit

Hi chengwei, have you try map_type parameter to "voxel"?

simon.xm.lee gravatar imagesimon.xm.lee ( 2017-03-01 20:44:43 -0600 )edit

I don't have this test.Maybe this is the problem. You cloud have a test, and if you solve the problem,please tell me.

chengwei gravatar imagechengwei ( 2017-03-01 21:30:00 -0600 )edit

map_type: voxel origin_z: 0.0 z_resolution: 0.1 z_voxels: 10 unknown_threshold: 10 mark_threshold: 0 publish_voxel_map: true

chengwei gravatar imagechengwei ( 2017-03-01 23:11:43 -0600 )edit

This might help. You could have a test, and tell me the result. Good luck!

chengwei gravatar imagechengwei ( 2017-03-01 23:14:05 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-03-14 20:47:02 -0600

simon.xm.lee gravatar image

Hi Chengwei,

I already fix this problem and I can share my experience to you.

  1. You can visualize the pointcloud2 points by choose the topic on RVIZ. You can check the obstacle which cannot clear whether is caused by noise points from original pointcloud2 topic.

  2. If yes, you may need to calibration the sensor which produce pointcloud2 data(maybe camera, or others).

  3. If no, please change below parameters: (1) z_resolution (2) z_voxels (3) max_obstacle_height

For max_obstacle_height, I suggest you to set it as slightly higher than the height of your robot.

For z_resolution and z_voxels, I suggest you to set them as below condition. z_resolution * z_voxels = max_obstacle_height

(ex. If the max_obstacle_height set to 1.00, z_resoultion and z_voxels should set 0.2 and 5. Because 0.2 * 5 = 1.00)

Hope these suggestion can help you.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-12-04 23:08:28 -0600

Seen: 543 times

Last updated: Mar 14 '17