Ask Your Question
1

min_obstacle_height for obstacle costmap

asked 2017-10-25 22:31:02 -0500

notinuse gravatar image

updated 2017-10-26 19:40:44 -0500

image description

This is my urdf xacrp for mounting and rotating the lidar

<!-- Vertical Lidar Left-->
<xacro:hokuyo_utm30lx name="vert_left_laser" parent="lidar_block1" ros_topic="left_scan"
                      update_rate="5" ray_count="100" min_angle="-90" max_angle="90" >
   <origin xyz="${0} ${0.090/2} ${lblength}" rpy="-1.5708 0 0" />
</xacro:hokuyo_utm30lx>

My common costmap params for the vertical layer.

vertical_obstacle_layer:
  enabled: true
  obstacle_range: 5.0
  raytrace_range: 30.0
  max_obstacle_height: 1.0
  min_obstacle_height: 0.1
  inflation_radius: 0.5
  observation_sources: laser_scan_sensor
  laser_scan_sensor: {sensor_frame: vert_left_laser_frame, data_type: LaserScan, topic: left_scan, marking: true, clearing: true, inf_is_valid: true}

My local costmap params.

local_costmap:
  global_frame: /odom
  robot_base_frame: base_footprint
  update_frequency: 3.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05
  transform_tolerance: 5.0
  plugins:
    - {name: vertical_obstacle_layer,      type: "costmap_2d::VoxelLayer"}
    - {name: inflation_layer,     type: "costmap_2d::InflationLayer"}

As you can see in the picture, the floor that being scanned by the laser get inserted as obstacle to the costmap. I have already set the parameters of max_obstacle_height to 1.0 and min_obstacle_height to 0.1. I wanted to add the obstacle only when it is above ground level and is within 5m range. What could possibly goes wrong here?

edit retag flag offensive close merge delete

Comments

Are you sure its the laser? The sensor data looks like a straight line but the costmap doesn't reflect that.

David Lu gravatar imageDavid Lu ( 2017-10-26 15:49:35 -0500 )edit

Yes i am sure it is the laser. This was because my robot odom is drifting a little in gazebo. I uploaded a new one to prevent confusion to others now.

notinuse gravatar imagenotinuse ( 2017-10-26 19:23:48 -0500 )edit

Anyway i think my question is similar with https://answers.ros.org/question/2572... .

notinuse gravatar imagenotinuse ( 2017-10-26 19:25:06 -0500 )edit

How high are the points? Is there any value of min_obstacle_height that eliminates them?

David Lu gravatar imageDavid Lu ( 2017-11-12 14:36:00 -0500 )edit

Setting the min_obstacle_height under sensor parameter will eliminates those obstacle on the ground plane. The purpose of having vertical lidar is to improve the obstacle avoidance capability when the obstacle is not in the same height of the horizontal lidar plane.

notinuse gravatar imagenotinuse ( 2017-11-12 19:25:55 -0500 )edit

I dont think VoxelCostmapPlugin is suitable for vertical lidar. I think VoxelCostmapPlugin is only intended for horizontal lidar due to how it codes the raytrace and clear obstacle method? I am still in the midst of figuring how to use the vertical lidar to contribute to my local costmap.

notinuse gravatar imagenotinuse ( 2017-11-12 19:39:24 -0500 )edit

For now, i created my own plugin which always use a new voxelgrid on every vertical scan. This is bad as it "forgets" the obstacle when the obstacle is out of its scanning plane. Do you have any advice/experience on using vertical lidar to contribute to a 2d costmap?

notinuse gravatar imagenotinuse ( 2017-11-12 19:54:40 -0500 )edit

I will open another thread to discuss when i am able to at least try out some method first.

notinuse gravatar imagenotinuse ( 2017-11-12 19:56:25 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-11-12 19:11:38 -0500

notinuse gravatar image

min_obstacle_height parameter have to be set under sensor namespace.

 ~<name>/<source_name>/min_obstacle_height(double, default: 0.0)

Reference: http://wiki.ros.org/costmap_2d/hydro/...

Example:

vertical_obstacle_layer:
  enabled: true
  obstacle_range: 3.0
  raytrace_range: 30.0
  max_obstacle_height: 1.0
  inflation_radius: 0.5
  publish_voxel_map: true
  observation_sources: right_scan_sensor
  right_scan_sensor: {sensor_frame: vert_right_laser_frame, data_type: LaserScan, topic: right_scan, marking: true, clearing: true, inf_is_valid: true, min_obstacle_height: 0.1, max_obstacle_height: 1.0}
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

3 followers

Stats

Asked: 2017-10-25 22:31:02 -0500

Seen: 670 times

Last updated: Nov 12 '17