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

turtlebot runs into obstacles

asked 2017-09-15 14:21:25 -0600

tjadhav gravatar image

updated 2017-09-15 14:36:04 -0600

jayess gravatar image

Im a very new to ROS. I have a turtlebot with a Kobuki base. Bot came with an Astra camera and I was able to use gmapping and save the map. I was able to run amcl to navigate the map. I have added a xv-11 lidar recently and used the wiki about adding a Lidar. I used the XV-11 driver. I am able to create and save the map using the xv-11 laser. But I am unable to navigate while avoiding obstacles. Turtlebot sees the obstacles via the xv-11 scan but it runs right into the obstacles. I have searched high and low and made some tweaks but nothing seemed to have help. Not sure why I'm doing wrong. Can someone point me in the right direction ?

here is my costmap common file

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/... )

robot_radius: 0.14  # distance a circular robot should be clear of the obstacle (kobuki: 0.18) #changed-tkj

# footprint: [[x0, y0], [x1, y1], ... [xn, yn]]  # if the robot is not circular
footprint: [[0.20, 0.20], [-0.20, 0.20], [-0.20, -0.20], [0.20, -0.20]] #added-by-tkj

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:  laser_scan bump
  laser_scan:
    data_type: LaserScan
    topic: scan
    sensor_frame: neato_laser
    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.25  # max. distance from an obstacle at which costs are incurred for planning paths. #changed-tkj

static_layer:
  enabled:              true
edit retag flag offensive close merge delete

Comments

I formatted the config files to make it easier to read. The easiest way to do that is to paste your config/source/etc. in the text box, highlight it, click the 101010 button.

jayess gravatar image jayess  ( 2017-09-15 14:37:05 -0600 )edit

Jayess - thanks for fixing the log file. Next time I will use the button.

tjadhav gravatar image tjadhav  ( 2017-09-15 15:18:18 -0600 )edit

Have you gone through the navigation tuning guide?

jayess gravatar image jayess  ( 2017-09-15 15:29:18 -0600 )edit

yes, to the best of my newb abilities. Seems to be like the obstacles are not getting published in the costmap.

tjadhav gravatar image tjadhav  ( 2017-09-15 15:42:38 -0600 )edit

Is there a topic is need to make sure that needs to be published to troubleshoot this?

tjadhav gravatar image tjadhav  ( 2017-09-15 17:10:28 -0600 )edit

ok my turtlebot seems to be behaving correct and avoiding obstacles now. I changed the line in costmap_common_params.yaml.

from

observation _sources: bump laser_scan

to

obstacle_layer: observation_sources: bump laser_scan

tjadhav gravatar image tjadhav  ( 2017-09-15 19:36:20 -0600 )edit

saw this on another question in this forum. I will try and find the link.

tjadhav gravatar image tjadhav  ( 2017-09-15 19:49:20 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-09-15 19:36:42 -0600

tjadhav gravatar image

updated 2017-09-15 19:37:53 -0600

jayess gravatar image

ok my turtlebot seems to be behaving correct and avoiding obstacles now. I changed the line in costmap_common_params.yaml. from

observation _sources: bump laser_scan

to

obstacle_layer: observation_sources: bump laser_scan
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-09-15 14:21:25 -0600

Seen: 793 times

Last updated: Sep 15 '17