How to prevent navigation path from hugging close to obstacles

asked 2023-06-30 11:18:48 -0500

chm007 gravatar image

Hello All, I have an omnidirectional robot and I am using DWA Local Planner on Noetic. I followed the fine tuning guide but my navigation path get very close to obstacles on the right when going between furniture to the point where it Aborts navigation or rotates to recover then aborts. My cosmap, global, DWA config and Rviz image is below. Any advice on how to fix this?

Costmap_Common

resolution: 0.05

robot_radius: 0.22
plugins:
       - { name: static_map, type: "costmap_2d::StaticLayer"}
       - { name: sensor, type: "costmap_2d::ObstacleLayer"}
       - { name: inflation, type: "costmap_2d::InflationLayer"}

sensor:
        observation_sources: laser_scan_sensor
        laser_scan_sensor: {sensor_frame: base_laser, data_type: LaserScan, topic: scan, marking: true, clearing: true, track_unknown_space: true, observation_persistance: 0.0, obstacle_range: 2.5, raytrace_range: 6.0, inf_is_valid: true}
        combination_method: 1
inflation:
        inflation_radius: 0.75 #was 1.25

Global_Planner

base_global_planner: "global_planner/GlobalPlanner"
allow_unknown: false
use_dijkstra: true
use_quadratic: true
use_grid_path: false
old_navfn_behavoir: false
cost_factor: 0.55
neutral_cost: 66
lethal_cost: 253
#resolution: 0.05
cost_scaling_factor: 2.58 #was 2.58

DWA_Planner

   base_local_planner: "dwa_local_planner/DWAPlannerROS"

controller_frequency: 5.0      # 10.0  could be a problem for control loop error
controller_patience:  15.0      # 15.0

DWAPlannerROS:

  holonomic_robot: true

  # Tolerances                  Defaults
  yaw_goal_tolerance: 0.05      # was .05      
  xy_goal_tolerance:  0.10      # 0.10 **was0.05same above
  latch_xy_goal_tolerance: false # false
  prune_plan: true

  # Forward simulation          Defaults
  use_dwa: true                 # true
  sim_time: 3.5                 # was 2.3 before**
  sim_granularity: 0.025        # 0.025
  angular_sim_granularity: 0.017 # 0.10 (1 degree = 0.017 rad)
  vx_samples: 13                 # 3 **was default
  vy_samples: 13             # 10 **was default
  vth_samples: 20      # 20  **was default

  # Scoring                     Defaults
  meter_scoring: false          # Is this even taken into account?
  path_distance_bias: 32.0      # 32.0**was1**B10
  goal_distance_bias: 20.0      # 24.0 was 0.10 *****B32
  occdist_scale: 0.05           # 0.02 ******B0.05
  forward_point_distance: 0.325 # 0.325
  stop_time_buffer: 0.20        # 0.20
  scaling_speed: 0.25           # 0.25
  max_scaling_factor: 0.20      # 0.20
  heading_lookahead: 0.325
  heading_scoring_timestep: 0.8
  heading_scoring: true         # Is this even taken into account?
  penalize_negative_x: false    # Is this even taken into account?

  # Acceleration and velocity limits

  # acc_limit_trans: 1.0
  acc_lim_x: 1.0                # 2.5
  acc_lim_y: 1.0                # 2.5
  acc_lim_theta: 1.0            # 3.2

  max_vel_x: +0.20
  min_vel_x: -0.20   #was -0.22 #t
  max_vel_y: +0.20
  min_vel_y: -0.20

  max_vel_theta: 0.2    #t
  min_vel_theta: -0.2    #ch

  # Other                       Defaults
  oscillation_reset_dist: 0.05  # 0.05
  #oscillation_reset_angle: 0.20 # 0.20
  #prune_plan: false             # true
  #trans_stopped_vel: 0.1        # 0.1
  theta_stopped_vel: 0.1          # 0.1
  #publish_cost_grid_pc: true    # false

C:\fakepath\Close_to_Obstacle (2).png

edit retag flag offensive close merge delete