What's the difference between melodic and kinetic on navigation stack

asked 2020-09-15 22:29:10 -0500

Phymin gravatar image


First, I deploy kinetic to a real differential vehicle, and the performance is satisfying. And because kinetic is about to reach its end of maintance, so I upgrade kinetic to melodic, and think that the performance in melodic should be better. But in reality, I find the performance of melodic is worse than kinetic with the same parameters and map. For example, every time I give a goal in rviz, the kinetic vehicle will reach the goal with no hesitation. But with melodic, when the vehicle is near the goal, it'll always clear the costmap first and if this not working, it will launch rotation recovery, after serveral rotations, the vehicle finally reached the goal. So I was wondering if there is some difference between melodic and kinetic on navigation stack, so that the parameters should be tuned seperately?

Here are some parameters I use:


<node pkg="amcl" type="amcl" name="amcl">
<param name="use_map_topic"             value="$(arg use_map_topic)"/>
<!-- Publish scans from best pose at a max of 10 Hz -->
<param name="odom_model_type"           value="diff"/>
<param name="odom_alpha5"               value="0.1"/>
<param name="gui_publish_rate"          value="10.0"/>
<param name="laser_max_beams"             value="720"/>
<param name="laser_max_range"           value="30"/>
<param name="min_particles"             value="300"/>
<param name="max_particles"             value="2000"/>
<param name="kld_err"                   value="0.05"/>
<param name="kld_z"                     value="0.99"/>
<param name="odom_alpha1"               value="0.2"/>
<param name="odom_alpha2"               value="0.2"/>
<!-- translation std dev, m -->
<param name="odom_alpha3"               value="0.2"/>
<param name="odom_alpha4"               value="0.2"/>
<param name="laser_z_hit"               value="0.95"/>
<param name="laser_z_short"             value="0.05"/>
<param name="laser_z_max"               value="0.05"/>
<param name="laser_z_rand"              value="0.05"/>
<param name="laser_sigma_hit"           value="0.2"/>
<param name="laser_lambda_short"        value="0.1"/>
<param name="laser_model_type"          value="likelihood_field"/>
<!-- <param name="laser_model_type" value="beam"/> -->
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="update_min_d"              value="0.1"/>
<param name="update_min_a"              value="0.2"/>
<param name="odom_frame_id"             value="$(arg odom_frame_id)"/> 
<param name="base_frame_id"             value="$(arg base_frame_id)"/> 
<param name="global_frame_id"           value="$(arg global_frame_id)"/>
<param name="resample_interval"         value="1"/>
<!-- Increase tolerance because the computer can get quite busy -->
<param name="transform_tolerance"       value="1.0"/>
<param name="recovery_alpha_slow"       value="0.0"/>
<param name="recovery_alpha_fast"       value="0.0"/>
<param name="initial_pose_x"            value="$(arg initial_pose_x)"/>
<param name="initial_pose_y"            value="$(arg initial_pose_y)"/>
<param name="initial_pose_a"            value="$(arg initial_pose_a)"/>
<remap from="scan"                      to="$(arg scan_topic)"/>


Move base:

shutdown_costmaps: false
controller_frequency: 10.0
controller_patience: 3.0
planner_frequency: 1.0
planner_patience: 5.0
oscillation_timeout: 10.0
oscillation_distance: 0.2
# local planner - default is trajectory rollout
base_local_planner: "base_local_planner/TrajectoryPlannerROS" #DWAPlannerROS
base_global_planner: "navfn/NavfnROS"

local planner:

#Independent settings for the local costmap
transform_tolerance: 1.0
sim_time: 2.0
sim_granularity: 0.025
dwa: true
vx_samples: 5
vtheta_samples: 20
escape_vel: -0.0
max_vel_x: 0.5
min_vel_x ...
edit retag flag offensive close merge delete


Some default values seems to have changed (e.g. amcl) and some parameters even seen to have been renamed, e.g. local planners pdist_scale to path_distance_bias. You have different values for both (0.6 and 20). Maybe start there, diff: https://github.com/ros-planning/navig...

Humpelstilzchen gravatar image Humpelstilzchen  ( 2020-09-16 03:24:05 -0500 )edit

Thanks for your comment, I will give it a try.

Phymin gravatar image Phymin  ( 2020-09-16 21:50:33 -0500 )edit

@Humpelstilzchen Yes, you're right, it's the pdist_scale parameter which makes this difference, but what's strange is that, from ros wiki, the melodic still use pdist_scale, and in practise, I only receive the warning of the parameter pdist_scaleis deprecated once and never receive warning of gdist_scale. I don't know why.

Phymin gravatar image Phymin  ( 2020-09-17 02:41:55 -0500 )edit

The wiki probably has been forgotten to update. But you are probably welcome to fix it ;)

Humpelstilzchen gravatar image Humpelstilzchen  ( 2020-09-17 03:00:16 -0500 )edit