0
$\begingroup$

Rosanswers logo

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?


Originally posted by notinuse on ROS Answers with karma: 48 on 2017-10-25

Post score: 1


Original comments

Comment by David Lu on 2017-10-26:
Are you sure its the laser? The sensor data looks like a straight line but the costmap doesn't reflect that.

Comment by notinuse on 2017-10-26:
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.

Comment by notinuse on 2017-10-26:
Anyway i think my question is similar with https://answers.ros.org/question/257276/min_obstacle_height-seems-ignored-in-costmap_2d-with-laserscan-pointcloud/ .

Comment by David Lu on 2017-11-12:
How high are the points? Is there any value of min_obstacle_height that eliminates them?

Comment by notinuse on 2017-11-12:
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.

Comment by notinuse on 2017-11-12:
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.

Comment by notinuse on 2017-11-12:
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?

Comment by notinuse on 2017-11-12:
I will open another thread to discuss when i am able to at least try out some method first.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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/obstacles#VoxelCostmapPlugin

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}

Originally posted by notinuse with karma: 48 on 2017-11-12

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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