Rosanswers logo

Hi, I am using ros-indigo on ubuntu 14.04 LTS. I am trying to use navigation stack, but I have some problem. My robot can move "Initial Pose" to "goal", But can't avoid obstacles. Whether the obstacle require plugins (costmap_2d::StaticLayer) to be inserted in configuration file. Please can one suggest me asap. Thank's in advanced.

My configuration files are as following:

  1. common_costmap_params.yaml

    obstacle_range: 2.5 raytrace_range: 3.0

    footprint: [[-0.20, -0.20], [-0.20, 0.20], [0.20, 0.20], [0.20, 0.20]]

    footprint_padding : 0.03 inflation_radius: 0.30 cost_scaling_factor: 1 map_type: costmap

    max_obstacle_height: 1.0 min_obstacle_height: 0.65

    transform_tolerance: 10.0

    obstacle_layer: observation_sources: laser_scan_sensor laser_scan_sensor: {sensor_frame: sensor, data_type: LaserScan, topic: scan, marking: true, clearing: true, observation_persistence: 0.0, expected_update_rate: 0.0, max_obstacle_height: 1.0, min_obstacle_height: 0.65, obstacle_range: 2.5, raytrace_range: 3.0, inf_is_valid: false}

  2. global_costmap_params.yaml

    global_costmap: global_frame: /map robot_base_frame: /base_link update_frequency: 3.0 #20 3 publish_frequency: 2.0 #20 2 static_map: true

    rolling_window : true

    width: 10.0 height: 10.0

    resolution: 0.1

  3. local_costmap_params.yaml

    local_costmap: global_frame: /map robot_base_frame: /base_link update_frequency: 8.0 #10 publish_frequency: 6.0 #10 static_map: false rolling_window: true

    width: 4 #10.0 height: 4 #10.0 resolution: 0.01 #0.05

  4. dwa_local_planner.yaml

    DWAPlannerROS: max_vel_x: 0.1099
    min_vel_x: -0.1099

    max_vel_y: 0.0
    min_vel_y: 0.0

    acc_lim_th: 0.01099
    acc_lim_x: 0.07999 acc_lim_y: 0.0 #0.0

    max_trans_vel: 0.0999
    min_trans_vel: 0.0199

    max_rot_vel: 0.05099
    min_rot_vel: 0.01999
    rot_stopped_vel: 0.02

    sim_time: 1.7
    vx_samples: 10
    vy_samples: 1
    vtheta_samples: 40

    forward_point_distance: 0.0 # this value is being used as a cost value for robot alignment to the path holonomic_robot: false

    meter_scoring: true

    dwa: true

    yaw_goal_tolerance: 0.1
    xy_goal_tolerance: 0.3
    latch_xy_goal_tolerance: true

    publish_cost_grid: true

    path_distance_bias: 32.0 goal_distance_bias: 24.0 occdist_scale: 0.1
    stop_time_buffer: 2.0 oscillation_reset_dist: 0.1
    prune_plan: false

  5. move_base_params.yaml

    shutdown_costmaps: false

    controller_frequency: 1.0 controller_patience: 1.0

    planner_frequency: 1.0 planner_patience: 1.0

    conservative_reset_dist: 0.2 #distance from an obstacle at which it will unstuck itself

Originally posted by Atul Divekar on ROS Answers with karma: 26 on 2016-12-01

Post score: 0

Original comments

Comment by Procópio on 2016-12-19:
at what height is your sensor frame? If it is outside the limits max_obstacle_height: 1.0, min_obstacle_height: 0.65, it would not work.

Comment by Atul Divekar on 2016-12-19:
Hi Procopio, Thanks for comments. My sensor frame height is at 0.71 meter.

Comment by Humpelstilzchen on 2016-12-20:
Do you see the obstacles in rviz?

Comment by Atul Divekar on 2016-12-21:
Yes I can see the obstacle in rviz.

Comment by Humpelstilzchen on 2016-12-27:
Do you see your costmaps in rqt dynamic reconfigure in move base?

Comment by clyde on 2017-01-06:
This won't solve your problem, but there's a YAML bug in the global_costmap_params.yaml you posted: you forgot to indent the lines after "global_costmap:".


1 Answer 1


Rosanswers logo

Hi, Sorry for late reply. I added following plugins in global_costmap_params.yaml and local_costmap_params.yaml which solved the problem.


- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"} 

- {name: inflation_layer, type: "costmap_2d::InflationLayer"}

Originally posted by Atul Divekar with karma: 26 on 2017-01-17

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by ssj on 2017-09-07:
Thank you for your answer,I am facing same problem I added the above plugins but still no difference in robot behaviour, it still does not maintain distance from obstacle and then stuck in obstacles and cant move further.

Comment by P Govind Rao on 2020-12-15:
Sir i am also facing same problem i did what you did still my robot is not avoiding obstacles it's colliding sir please help me out i am going through a robotics competition


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.