DWA Planner Issue
Hello Everyone,
I am trying to use the DWA planner of the navigation stack with a static map of the office floor loaded. The robot is of rectangular shape and uses 4 sonar sensors and a kinect sensor for obstacle detection. When we give a destination on a straight line the robot moves swiftly to its goal, but if i have a turn it goes and hit the edges. In the RVIZ simulator i can see the footprint of the robot going to hit the edges as in the static map but still the robot goes the same path. Ideally as per the tutorial the DWA planner will ensure the footprint is not in touch with the obstacles.
dwa_local_planner.yaml file below
controller_frequency: 1.0
DWAPlannerROS:
# Robot Configuration Parameters
max_vel_x: 1.0 #0.3 # 0.5
min_vel_x: 0.1 # 0.0
max_vel_y: 0.0 # diff drive robot
min_vel_y: 0.0 # diff drive robot
max_trans_vel: 1.0
min_trans_vel: 0.0
max_rot_vel: 0.5 # 1.0
min_rot_vel: -0.5 # could set this lower
acc_lim_x: 1.0
acc_lim_th: 1.0 # 1.0
acc_lim_y: 0.0 # diff drive robot
# Goal Tolerance Parameters
yaw_goal_tolerance: 0.05 # 0.05
xy_goal_tolerance: 0.15 # 0.10
latch_xy_goal_tolerance: false
# Forward Simulation Parameters
sim_time: 1.0 # 1.7
vx_samples: 20 # 3
vy_samples: 1 # diff drive robot
vtheta_samples: 20 # 20
meter_scoring: true
penalize_negative_x: false
# Oscillation Prevention Parameters
oscillation_reset_dist: 0.05 # 0.05 - how far to travel before resetting oscillation flags
# Debugging
publish_traj_pc : true
publish_cost_grid_pc: true
global_frame_id: map
# Differential-drive robot configuration - necessary?
holonomic_robot: false
Moreover if i give a heading in opposite direction the robot doesnt do a in place rotation even when there is sufficient space.
I would like to attach all the yaml files but dont have sufficient points to load it.
Any response much appreciated.
Including rest of the yaml files
costmap_common_params.yaml
obstacle_range: 0.5
raytrace_range: 1.0
max_obstacle_height: 1.75
#footprint: [[-0.3,-0.29],[-0.3,0.29],[0.3,0.29],[0.48,0.0], [0.3,-0.29]]
#footprint_radius: 0.5
robot_radius: 0.4
inflation_radius: 0.15
obstacles: laser_scan sonar_scan_1 sonar_scan_2 sonar_scan_3 sonar_scan_4
observation_sources: laser_scan sonar_scan_1 sonar_scan_2 sonar_scan_3 sonar_scan_4
laser_scan_sensor: {data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: -0.05, max_obstacle_height: 2.0}
sonar_scan_1: {data_type: LaserScan, topic: sonar_scan_1, marking: true, clearing: true, min_obstacle_height: -1.0 , max_obstacle_height: 2.0}
sonar_scan_2: {data_type: LaserScan, topic: sonar_scan_2, marking: true, clearing: true, min_obstacle_height: -1.0, max_obstacle_height: 2.0}
sonar_scan_3: {data_type: LaserScan, topic: sonar_scan_3, marking: true, clearing: true, min_obstacle_height: -1.0 , max_obstacle_height: 2.0}
sonar_scan_4: {data_type: LaserScan, topic: sonar_scan_4, marking: true, clearing: true, min_obstacle_height: -1.0, max_obstacle_height: 2.0}
global_costmap_params.yaml
global_costmap:
global_frame: /map
robot_base_frame: /base_link
update_frequency: 5.0
publish_frequency: 1.0
static_map: true
rolling_window: false
resolution: 0.05
map_type: costmap
transform_tolerance: 0.5
local_costmap_params.yaml
local_costmap:
global_frame: /map
robot_base_frame: /base_link
update_frequency: 5.0
publish_frequency: 1.0
static_map: false
rolling_window: true
width: 3.0
height: 3.0
resolution: 0.01
transform_tolerance: 0.5
map_type: costmap
move_base.launch
<launch>
<env name="ROSCONSOLE_CONFIG_FILE"
value="$(find security_robot_2dnav)/rosconsole.conf"/>
<master auto="start ...
Any idea on the above issue?
I don't have any good ideas. I've bumped your karma; you should be able to attach files now. In particular, the global and local costmap configurations, and maybe a screenshot of rviz when the robot is not doing the right thing.
Could you maybe check if the robot also hits the edges if you have a round footprint? Could be that there are bugs for rectengular shaped footprints as it is not tested / used that much..
Tried with circular footprint but still the robot goes and hits the obstacles. Looks like for attching any files i need points greater than 20 which i dont . so cant attach even the screen shots. Have added all the yaml files. Should i be changing global planner to sbpl?
Thanks, Nithin
Hitting obstacles is entirely the fault of the local planner; you shouldn't need to change the global planner. I've bumped your karma above 20, so you should be able to attach files now.
But the global path itself is taking the robot close to the edges around corners. All the yaml files has been now included as part of the question itself. Attaching the screen shot of rviz simulator where the footprint is in contact with the obstacles
What are the dimensions of your robt? And could you add a screenshot which shows the global path in it? Maybe also add the paramater occdist_scale in the dwa_local_planner.yaml and set it to 0.5.
Your local costmap resolution should be the same as the global one (0.05)