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

How to decrease obstacle area in costmaps

asked 2017-12-11 03:53:23 -0500

ROSuser97 gravatar image

Hello. First of all, I am very new to the ROS and robots in general as well. However, I am working with Turtlebot now (with Asus Pro Xtion Live camera) and I am trying to figure out how to manipulate parameters in the turtlebot_navigation package - especially costmaps. I have noticed that relatively small obstacles in the real word are represented as huge obstacles in a costmap and that causes the robot to use space ineffectively. I have already decreased the inflation area and that helped quite a bit, but I am interested whether there is any way to decrease an obstacle area in the costmaps. Moreover, I would like to understand parameters in costmap_common_params.yaml and what exactly they do. You can see the content of the file below.

max_obstacle_height: 0.60  # assume something like an arm is mounted on top of the robot

# Obstacle Cost Shaping (http://wiki.ros.org/costmap_2d/hydro/inflation)
robot_radius: 0.20  # distance a circular robot should be clear of the obstacle (kobuki: 0.18)
# footprint: [[x0, y0], [x1, y1], ... [xn, yn]]  # if the robot is not circular

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    #true needed for disabling global path planning through unknown space
  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.25
    max_obstacle_height: 0.35
  bump:
    data_type: PointCloud2
    topic: mobile_base/sensors/bumper_pointcloud
    marking: true
    clearing: false
    min_obstacle_height: 0.0
    max_obstacle_height: 0.15
  # for debugging only, let's you see the entire voxel grid

#cost_scaling_factor and inflation_radius were now moved to the inflation_layer ns
inflation_layer:
  enabled:              true
  cost_scaling_factor:  5.0  # exponential rate at which the obstacle cost drops off (default: 10)
  inflation_radius:     0.5  # max. distance from an obstacle at which costs are incurred for planning paths.

static_layer:
  enabled:              true

I am using Ubuntu 16.04 LTS and ROS Kinetic.

Thank you in advance for any help.

edit retag flag offensive close merge delete

Comments

1

Check the wiki as well as the subpages for the respective layers... If there are any open questions, please come back here and edit this with more specifics....

mgruhler gravatar image mgruhler  ( 2017-12-11 05:48:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-01-09 17:52:26 -0500

jorge gravatar image

As @mig says, costmap parameters are well described in the wiki.

What you are looking for is robot_radius. you have 20cm, what is around 2cm more than the physical TB2 base. That's fine for safe navigation, as it ensures that the robot won't pass closer than 2cm from any obstacle. You can try to reduce it at your own risk!

You can also tweak the costmap resolution in local_costmap_params.yaml and global_costmap_params.yaml. Increasing the resolution will define obstacles contours more precisely, and so prevent narrow passages to get unnecessarily blocked.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-12-11 03:53:23 -0500

Seen: 1,980 times

Last updated: Jan 09 '18