Poor performance of base_local_planner - advice for parameter tuning?
Hi All,
I am having some issues with object avoidance when using move_base. As you can see in this video I made the robot doesn't navigate the obstacles in a smooth manner. My suspicion is that my local_planner parameters need tuning. However I've spend hours playing with all the different parameters and am not seeing improved results. I have checked my odometry data and it's very accurate, so that's not the problem.
I'll attach my parameter configuration files below. I would really appreciate any tips, particularly from those who have success in tuning their robots to navigate smoothly around obstacles.
base_local_planner_params.yaml
controller_frequency: 2.0
recovery_behavior_enabled: false
clearing_rotation_allowed: false
TrajectoryPlannerROS:
max_vel_x: 0.36
min_vel_x: 0.2
max_vel_y: 0.0 # zero for a differential drive robot
min_vel_y: 0.0
max_vel_theta: 0.7
min_vel_theta: -0.7
min_in_place_vel_theta: 0.5
escape_vel: -0.15
acc_lim_x: 0.3 # From test trials (0.304,0.285,0.26,0.365)
acc_lim_y: 0.0 # zero for a differential drive robot
acc_lim_theta: 1.0 #probably closer to 1.3
holonomic_robot: false
yaw_goal_tolerance: 0.25 # about 12 degrees
xy_goal_tolerance: 0.25 # 20 cm
latch_xy_goal_tolerance: false
pdist_scale: 0.6
gdist_scale: 0.7
meter_scoring: true
heading_lookahead: 0.375
heading_scoring: false
heading_scoring_timestep: 0.8
occdist_scale: 0.01
oscillation_reset_dist: 0.05
publish_cost_grid_pc: false
prune_plan: true
#sim_time: 4
sim_granularity: 0.025
angular_sim_granularity: 0.025
vx_samples: 8
vy_samples: 0 # zero for a differential drive robot
vtheta_samples: 20
dwa: true
simple_attractor: false
costmap_common_params.yaml
obstacle_range: 4.0
raytrace_range: 5.0
inf_is_valid: false
robot_radius: 0.3 # - dont need a radius if we have a footprint.
inflation_radius: 0.3
# footprint: [[-15,0.26],[0.42,0.26],[0.42,-0.26],[-15,-0.26]] # Note Base_link is on top of the lidar and x axis is forwards
observation_sources: scan
scan:
data_type: LaserScan
topic: scan
marking: true
clearing: true
map_type: costmap
global_costmap_params.yaml
global_costmap:
global_frame: /map
robot_base_frame: /base_footprint
update_frequency: 1.0
publish_frequency: 0.5
static_map: true
rolling_window: false
resolution: 0.025
transform_tolerance: 1.0
map_type: costmap
local_costmap_params.yaml
local_costmap:
global_frame: /odom
robot_base_frame: /base_footprint
update_frequency: 1
publish_frequency: 2
static_map: false
rolling_window: true
width: 5.0
height: 5.0
resolution: 0.025
transform_tolerance: 1.0
map_type: costmap
move_base_params.yaml
shutdown_costmaps: false
controller_frequency: 5.0 #before 5.0
controller_patience: 3.0
planner_frequency: 0.5
planner_patience: 5.0
oscillation_timeout: 10.0
oscillation_distance: 0.2
conservative_reset_dist: 0.10 #distance from an obstacle at which it will unstuck itself
Suggestion: Check your cmd_vel accuracy. Real world/odom reported translation and rotation should match the cmd_vel input.
Thanks Humpels, I used rqt_plot to view /odom and /cmd_vel and saw some differences so tuned my PID parameters now the velocities match better. However the problem still exists. I also increased sim_time to help avoid the obstacles earlier but this made it perform even worse. Any other tips?