Rviz local costmap not working

asked 2023-05-21 21:39:46 -0500

iamsdevaprasad gravatar image

I have been navigating a diffdrive mobile robot in ros, while visualising it in rviz the local cost map doesn't work as expected it doesn't show any obstacles in it, it shows only white and black shaded area. I am new to ros nav so, please help.

common_costmap.yaml

robot_radius: 0.175

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

static:
    map_topic: /map
    subscribe_to_updates: true

obstacles_laser:
    observation_sources: /scan
    laser: {data_type: LaserScan, clearing: true, marking: true, topic: scan, inf_is_valid: true}

inflation:
    inflation_radius: 0.6

global_costmap.yaml

global_costmap:
  global_frame: map
  robot_base_frame: base_link

  update_frequency: 50
  publish_frequency: 50
  transform_tolerance: 0.5

  static_map: true

local_costmap.yaml

local_costmap:
  global_frame: odom
  robot_base_frame: base_link

  update_frequency: 50
  publish_frequency: 50
  transform_tolerance: 0.5  

  static_map: false  
  rolling_window: true
  width: 3
  height: 3
  resolution: 0.05

dwa_planner.yaml

DWAPlannerROS:

# Robot Configuration Parameters
  max_vel_x: 0.5
  min_vel_x: 0.0

  max_vel_y: 0.0
  min_vel_y: 0.0

# The velocity when robot is moving in a straight line
  max_vel_trans:  0.2
  min_vel_trans:  0.035

  max_vel_theta: 4.0
  min_vel_theta: 0.0

  acc_lim_x: 2.5
  acc_lim_y: 0.0
  acc_lim_theta: 4.0

# Goal Tolerance Parametes
  xy_goal_tolerance: 0.2
  yaw_goal_tolerance: 0.2
  latch_xy_goal_tolerance: false

# Forward Simulation Parameters
  sim_time: 1.5 # sec
  vx_samples: 20 # units
  vy_samples: 0
  vth_samples: 40
  controller_frequency: 10.0 #hz

# Trajectory Scoring Parameters
  path_distance_bias: 32.0
  goal_distance_bias: 20.0
  occdist_scale: 0.02
  forward_point_distance: 0.325
  stop_time_buffer: 0.2
  scaling_speed: 0.05
  max_scaling_factor: 0.09

# Oscillation Prevention Parameters
  oscillation_reset_dist: 0.05

# Debugging
  publish_traj_pc : true
  publish_cost_grid_pc: true

move_base.yaml

shutdown_costmaps: false
controller_frequency: 10.0
planner_patience: 5.0
controller_patience: 15.0
conservative_reset_dist: 3.0
planner_frequency: 5.0
oscillation_timeout: 10.0
oscillation_distance: 0.2
edit retag flag offensive close merge delete