# Robot doesn't avoid obstacles Move Base

Hello,

I try to make my robot navigate through some narrow passways (70cm) (robot 40cm wide), but no matter what paramaters i change the robot doesnt respect the inflation and doesnt correct it's course when near walls

My odom and amcl although not perfect, i think are pretty good odom (test by setting the decay time for the laser e.q 20) ideally the scans should align

pic odom:

amcl test :

bump into wall test (move base) :

local costmap

P.S with dwa local planner which is the defacto the robot rotates so i use Trajectory planner, maybe by fixing this problem i can use dwa after P.S also the local costmap i can visualize only with map scheme or raw but no costmap? weird ,i think i can see the inflation layer of new obstacles

Any help to increase the robustness of move base to navigate in tight corridors welcome

Thanks so much for your time!!

config of move base and amcl code below:

Base global planner

recovery_behaviour_enabled: true
#controller_frequency: 2
NavfnROS:
allow_unknown: false # Specifies whether or not to allow navfn to create plans that traverse unknown space.
default_tolerance: 0.2 # A tolerance on the goal point for the planner.


Base local planner

recovery_behaviour_enabled: true

TrajectoryPlannerROS:
# Robot Configuration Parameters
acc_lim_x: 0.5
acc_lim_theta:  0.5
max_vel_x: 0.17
min_vel_x: 0.11
max_vel_theta: 0.11
min_vel_theta: 0.075
max_in_place_vel_theta: 0.11
min_in_place_vel_theta: 0.075
holonomic_robot: false
escape_vel: -0.1
# Goal Tolerance Parameters
yaw_goal_tolerance: 0.15
xy_goal_tolerance: 0.15
latch_xy_goal_tolerance: true
# Forward Simulation Parameters
sim_time: 2
sim_granularity: 0.02
angular_sim_granularity: 0.02
vx_samples: 10
vtheta_samples: 25
controller_frequency: 20.0
# Trajectory scoring parameters
meter_scoring: true # Whether the gdist_scale and pdist_scale parameters should assume that goal_distance and  path_distance are expressed in units of meters or cells. Cells are assumed by default (false).
occdist_scale:  0.2 #The weighting for how much the controller should attempt to avoid obstacles. default 0.01
pdist_scale: 1.5  #     The weighting for how much the controller should stay close to the path it was given . default 0.6
gdist_scale: 1.5 #     The weighting for how much the controller should attempt to reach its local goal, also controls speed  default 0.8
heading_lookahead: 0.1  #How far to look ahead in meters when scoring different in-place-rotation trajectories
heading_scoring: false  #Whether to score based on the robot's heading to the path or its distance from the path. default false
heading_scoring_timestep: 0.4   #How far to look ahead in time in seconds along the simulated trajectory when using   heading scoring
dwa: false #Whether to use the Dynamic Window Approach (DWA)_ or whether to use Trajectory Rollout
simple_attractor: false
publish_cost_grid_pc: true
# Oscillation Prevention Parameters
oscillation_reset_dist: 0.1 #How far the robot must travel in meters before oscillation flags are reset (double, default: 0.05)
escape_reset_dist: 0.2
escape_reset_theta: 0.2


Costmap common Paramaters

footprint: [[-0.175, -0.175], [-0.175, 0.175], [0.175, 0.175], [0.175, -0.175]]
footprint_padding: 0.05
map_type: costmap

obstacle_range: 3
raytrace_range: 3 ...
edit retag close merge delete

## Comments

Can you please update your question with the images attached directly? I've upvoted your question so that you can have enough karma to do ao

( 2019-08-10 21:20:23 -0500 )edit

hm, it needs 5 points per picture to upload pictures your upvote gave me 1 point, i can change my profile pic with 1 point though P. is it a big problem they way it is now? Thank you though!!

( 2019-08-11 02:12:39 -0500 )edit
1

It gives you 10 points but for some reason my upvote didn't go through. So, I upvoted again and now you have enough to attach the images (it's only 10 points total to attach images). We like to keep questions self-contained, and by attaching your images directly to the question your question becomes self-contained. Otherwise, the images can disappear if/when the external site goes down

( 2019-08-11 02:41:12 -0500 )edit

thanks!! now it is self contained :)

( 2019-08-11 02:45:23 -0500 )edit

Can you post a screenshot of your local costmap as well?

( 2019-08-12 16:43:36 -0500 )edit

Hi, i posted the local costmap after some fiddling i found some good behaviour,

inflation radius:0.27 cost_scaling_factor:1.5 on the global planner orientation_mode:3 acc_lim_x and th : 0.5, sim time =1 , pdist:0.85 gdist:1.0 , occdist:0.2

I tested teb_local_planner and dwa_local_planner

But Trajectory planner worked well for me in the narrow environments (with dwa=false), Because it has a recovery behaviour that moves your robot sligthly back, instead of clearing costmap and rotating in place and after telling you infissible trajectory, Dwa worked for me too but i couldnt make it to have this recovery (maybe plugin on the global planner??) With teb i had some problems

( 2019-08-13 04:18:42 -0500 )edit