0
$\begingroup$

Rosanswers logo

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) :

local_costmap_params.yaml

local_costmap:     
   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

   #static_layer:
     #enabled: false



      plugins:
        - {name: obstacle_layer,  type:

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

global_costmap_params.yaml

  global_costmap:
   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
   static_layer:
        enabled: false

costmap_common_params.yaml

inflation_layer:
  cost_scaling_factor: 0.5  
  inflation_radius: 0.35 #0.45
  robot_radius: 0.35

obstacle_layer:
  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}

voxel_layer:
  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
  output_points:
    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

Originally posted by chengwei on ROS Answers with karma: 51 on 2016-12-05

Post score: 0


Original comments

Comment by simon.xm.lee on 2017-03-01:
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

Comment by chengwei on 2017-03-01:
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

Comment by simon.xm.lee on 2017-03-01:
Hi chengwei, have you try map_type parameter to "voxel"?

Comment by chengwei on 2017-03-01:
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.

Comment by chengwei on 2017-03-02:
map_type: voxel origin_z: 0.0 z_resolution: 0.1 z_voxels: 10 unknown_threshold: 10 mark_threshold: 0 publish_voxel_map: true

Comment by chengwei on 2017-03-02:
This might help. You could have a test, and tell me the result. Good luck!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by simon.xm.lee with karma: 43 on 2017-03-14

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.