ROS frontier exploration: Robot doesn't move
Hi there. I'm currently trying to use move_base, base_local_planner and frontier_exploration on a turtlebot 2 to autonomously explore a room. I currently am using a static map (from hector mapping) for the global costmap and building an obstacle layer in my local costmap as I go with my horizontal hokuyo. The config files that I am using are based off the husky_navigation config files.
These are my parameter files for the costmaps (I can add the rest of my config files for the planners etc if they're needed):
costmap_common.yaml
#footprint: [[-0.5, -0.33], [-0.5, 0.33], [0.5, 0.33], [0.5, -0.33]]
robot_radius: 0.25
footprint_padding: 0.01
robot_base_frame: base_footprint
update_frequency: 4.0
publish_frequency: 3.0
transform_tolerance: 0.5
resolution: 0.05
obstacle_range: 5.5
raytrace_range: 6.0
#layer definitions
static:
map_topic: /map
subscribe_to_updates: true
obstacles_laser:
observation_sources: laser
laser: {data_type: LaserScan, sensor_frame: /laser_lsl, clearing: true, marking: true,
topic: /scan_lsl, inf_is_valid: true}
inflation:
inflation_radius: 1.0
costmap_local.yaml
global_frame: odom
rolling_window: true
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 20.0
height: 20.0
resolution: 0.05
transform_tolerance: 0.5
plugins:
- {name: obstacles_laser, type: "costmap_2d::ObstacleLayer"}
- {name: inflation, type: "costmap_2d::InflationLayer"}
costmap_global.yaml
global_frame: map
static_map: true
rolling_window: false
track_unknown_space: true
update_frequency: 1.0
publish_frequency: 0.5
transform_tolerance: 0.5
plugins:
- {name: static, type: "costmap_2d::StaticLayer"}
- {name: inflation, type: "costmap_2d::InflationLayer"}
I am able to get the correct robot pose using hector mapping and can also get the correct static map, global costmap and local costmap. Images here
The issue is that when I try and send the robot movement commands using either a 2D nav goal or set a region to be explored, the robot doesn't move as it thinks it's stuck. It prints:
[ WARN] [1465787788.724254866]: Clearing costmap to unstuck robot (3.000000m).
[ WARN] [1465787799.324231262]: Rotate recovery behavior started.
I've run the program in debugging mode and this is what it prints for the various nodes that are running (note. I've deleted some of the repeated lines to keep the output more readable):
Local planner
[DEBUG] [1465797982.956315651]: Path/Goal distance computed
[DEBUG] [1465797982.958396979]: Trajectories created
[DEBUG] [1465797982.987519030]: Cost PointCloud published
[DEBUG] [1465797982.987591393]: A valid velocity command of (0.10, 0.00, -0.22) was found for this cycle.
[DEBUG] [1465797983.141464666]: Nearest waypoint to <0.000000, 0.000000> is <-0.025508, -0.019038>
costmap_2d
[DEBUG] [1465798020.176874025]: Updating area x: [293, 485] y: [174, 365]
[DEBUG] [1465798020.180376176]: Map update time: 0.004092932
[DEBUG] [1465798020.203780619]: MessageFilter [target=odom laser_lsl ]: Message ready in frame laser_lsl at time 1465798020.106, count now 3
[DEBUG] [1465798020.203981715]: MessageFilter [target=odom laser_lsl ]: Message ready in frame laser_lsl at time 1465798020.131, count now 2
[DEBUG] [1465798020.215840402]: MessageFilter [target=odom laser_lsl ]: Added message in frame laser_lsl at time 1465798020.181, count now 2
[DEBUG] [1465798020.217410425]: Received a 1024 X 1024 map at 0.050000 m/pix
[DEBUG] [1465798020.224168259]: MessageFilter [target ...