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

DWA Planner Issue

asked 2014-11-20 08:29:51 -0500

Nithin gravatar image

updated 2014-11-24 23:33:00 -0500

image descriptionHello 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 ...
(more)
edit retag flag offensive close merge delete

Comments

Any idea on the above issue?

Nithin gravatar image Nithin  ( 2014-11-21 09:36:55 -0500 )edit

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.

ahendrix gravatar image ahendrix  ( 2014-11-21 13:26:36 -0500 )edit

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

AReimann gravatar image AReimann  ( 2014-11-23 19:34:52 -0500 )edit

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

Nithin gravatar image Nithin  ( 2014-11-24 05:40:54 -0500 )edit

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.

ahendrix gravatar image ahendrix  ( 2014-11-24 11:01:40 -0500 )edit
1

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

Nithin gravatar image Nithin  ( 2014-11-24 22:56:28 -0500 )edit

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.

AReimann gravatar image AReimann  ( 2014-11-24 23:39:53 -0500 )edit

Your local costmap resolution should be the same as the global one (0.05)

AReimann gravatar image AReimann  ( 2014-11-24 23:42:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-11-25 06:29:43 -0500

ahendrix gravatar image

Which version of ROS are you using? It looks like you're using an older version of the nav stack configuration for obstacle sources.

Obstacle avoidance is performed based on the local costmap, but it looks like you're visualizing the global costmap. Does the robot's footprint intersect with obstacles in the local costmap?

The global planner will tend to plan close to obstacles near corners; this is one effect of finding the shortest path. It should be possible to tune this, but you should save that for later, once the local planner no longer runs into obstacles.

edit flag offensive delete link more

Comments

I am using ROS hydro. In local costmap it does try to avoid intersecting with the obstacles sometimes. But most often it doesnt. But i can see obstacle detected in the rviz simulator

Nithin gravatar image Nithin  ( 2014-11-25 08:02:39 -0500 )edit

rviz is a visualizer, not a simulator. I assume you're running navigation on a real robot?

ahendrix gravatar image ahendrix  ( 2014-11-25 08:29:11 -0500 )edit

Does the robot physically drive into obstacles? If it drives into obstacles very slowly, you may want to try decreasing min_vel_x to 0

ahendrix gravatar image ahendrix  ( 2014-11-25 08:30:18 -0500 )edit

Yes the robot physically drives into obstacles at reasonable speed as if there is no obstacle at all. We had tried to reduce the speed also but it didnt help.

Nithin gravatar image Nithin  ( 2014-11-25 09:33:41 -0500 )edit

Are you absolutely certain your obstacles are correctly represented in the LOCAL costmap? Please post a screenshot of rviz showing only the robot's footprint and the local costmap.

ahendrix gravatar image ahendrix  ( 2014-11-25 09:54:04 -0500 )edit

I have the same problem when i adjusted the accel lim x to 5 and sim time to 3.6 it would go around the obstacles with the odd stumble I using hydro with a arbotix in simulation mode the longer sim time is really a cheat as it takes the robot further away from the global path

Peter Heim gravatar image Peter Heim  ( 2014-11-25 16:35:39 -0500 )edit

I have noticed now when the robot moves the footprint keeps drifting sometimes in rviz although i dont see much deflection in odometry. Moreover I am using odo fused with yaw using robot_pose_ekf. Not sure why the robot suddenly drifts while navigating. Will attach better screenshot of the localcmap

Nithin gravatar image Nithin  ( 2014-11-26 09:19:45 -0500 )edit

@Peter Heim What is your map resolution? You have to adjust the forward_point_distance if your resolution is different than 0.05 or the position accuracy of your robot is lower. If it "cuts" corners, set it lower (scale it the same way as the resolution), but at least the the size of the resolution.

AReimann gravatar image AReimann  ( 2014-11-27 21:35:14 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2014-11-20 08:29:51 -0500

Seen: 3,455 times

Last updated: Nov 25 '14