Naviagtion local costmap doesn't align with static map
Hi, I have been using turtlebot3 waffle pi and doing navigation in a hallway (about 30 m long and 3 m wide) several times, and it works perfectly. However, recently the navigation (local costmap) doesn't work properly. The local costmap doesn't align with the static map as shown below, even though it's perfectly aligned at the beginning of the navigation.
I searched several solutions and tuned several parameters, but I still get the same problem. Can anyone help me with these problems? Thanks.
My parameters are as follows.
DWAPlannerROS:
# Robot Configuration Parameters
max_vel_x: 0.05
min_vel_x: -0.05
max_vel_y: 0.0
min_vel_y: 0.0
# The velocity when robot is moving in a straight line
max_trans_vel: 0.05
min_trans_vel: 0.02
max_rot_vel: 0.91
min_rot_vel: 0.4
acc_lim_x: 2.5
acc_lim_y: 0.0
acc_lim_theta: 3.2
# Goal Tolerance Parametes
xy_goal_tolerance: 0.30
yaw_goal_tolerance: 0.52
latch_xy_goal_tolerance: false
# Forward Simulation Parameters
sim_time: 2.0
vx_samples: 20
vy_samples: 0
vth_samples: 40
controller_frequency: 5.0
# 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.25
max_scaling_factor: 0.2
# Oscillation Prevention Parameters
oscillation_reset_dist: 0.25
# Debugging
publish_traj_pc : true
publish_cost_grid_pc: true
global costmap
global_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 5.0
publish_frequency: 5.0
transform_tolerance: 2.0
In the local costmap, I did try setting static map to be true and false, but I still got the same problem in both cases.
local_costmap:
global_frame: odom
robot_base_frame: base_footprint
update_frequency: 5.0
publish_frequency: 5.0
transform_tolerance: 2.0
static_map: true
rolling_window: true
width: 3
height: 3
resolution: 0.10
static_map: true
Can I assume you're using AMCL for localization? AMCL can only only make small updates and once there is a loss of alignment from the map, AMCL is lost and will never localize properly and the costmap can stay rotated relative to the map map.
If this is a new issue, have you recently increased the speed the robot is allowed to rotate? Rotating more quickly than your scanner allows can create this issue. Have you possibly made an error with a transform?
Issues with encoders, or wheel slip may also play a role. Anything capable of creating a sudden apparent error that AMCL isn't able to cover for will do what you're seeing. Looking at the just the parameters is only part of the issue. Chances are good the HW plays a role in this. For example one set of parameter will work just fine on ...(more)
Thanks for the comment, billy. I think your suggestion is correct because at first after fresh installed (all parameters are in default value), the navigation works perfectly. Then, I reduce the moving speed, it still works perfectly, but I got some controller loop error and sometimes it starts oscillating. So, I tune some parameters. I will reset back the parameter to the default value.