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

Robot can not avoid obstacle in navigation stack [closed]

asked 2016-12-01 07:37:16 -0500

Atul Divekar gravatar image

updated 2016-12-19 21:42:37 -0500

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
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Procópio
close date 2017-09-19 06:15:39.166152

Comments

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.

Procópio gravatar image Procópio  ( 2016-12-19 02:55:42 -0500 )edit

Hi Procopio, Thanks for comments. My sensor frame height is at 0.71 meter.

Atul Divekar gravatar image Atul Divekar  ( 2016-12-19 21:54:21 -0500 )edit

Do you see the obstacles in rviz?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2016-12-20 08:47:49 -0500 )edit

Yes I can see the obstacle in rviz.

Atul Divekar gravatar image Atul Divekar  ( 2016-12-20 23:14:18 -0500 )edit

Do you see your costmaps in rqt dynamic reconfigure in move base?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2016-12-27 11:00:53 -0500 )edit

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

clyde gravatar image clyde  ( 2017-01-06 12:57:10 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-01-16 23:15:08 -0500

Atul Divekar gravatar image

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

plugins:

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

- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
edit flag offensive delete link more

Comments

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.

ssj gravatar image ssj  ( 2017-09-07 01:57:05 -0500 )edit

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

P Govind Rao gravatar image P Govind Rao  ( 2020-12-15 08:53:57 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-12-01 07:37:16 -0500

Seen: 1,845 times

Last updated: Jan 16 '17