ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

AMCL randomly loses localisation.

asked 2019-03-21 06:28:08 -0600

starter gravatar image

updated 2019-03-21 06:28:17 -0600


I am using the `AMCL package with the following configuration:

<node pkg="amcl" type="amcl" name="amcl" clear_params="true">
    <param name="use_map_topic" value="$(arg use_map_topic)"/>

    <param name="odom_model_type" value="diff-corrected"/>
    <param name="odom_alpha5" value="0.0"/>
    <param name="gui_publish_rate" value="10.0"/>

    <param name="laser_max_beams" value="30"/>

    <param name="laser_max_range" value="-1.0"/> 
    <param name="laser_min_range" value="-1.0"/> 
    <param name="min_particles" value="500"/>

   <param name="max_particles" value="5000"/>
    <param name="kld_err" value="0.01"/> <!-- 0.05-->
    <param name="kld_z" value="0.99"/>
    <param name="odom_alpha1" value="4.0"/> <!-- 0.2-->
    <param name="odom_alpha2" value="0.9"/> <!-- 0.2-->

    <param name="odom_alpha3" value="0.2"/> <!-- 0.8 --> 
    <param name="odom_alpha4" value="0.2"/> <!-- 0.2-->
    <param name="laser_z_hit" value="0.5"/>
    <param name="laser_z_short" value="0.0"/>
    <param name="laser_z_max" value="0.0"/>
    <param name="laser_z_rand" value="0.5"/>
    <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_likelihood_max_dist" value="2.0"/>
    <param name="update_min_d" value="-0.2"/> <!-- 0.25 -->
    <param name="update_min_a" value="-0.5"/> <!-- 0.2 -->
    <param name="odom_frame_id" value="odom"/>
    <param name="resample_interval" value="1"/>

    <param name="transform_tolerance" value="0.3"/> <!-- 1.0 -->
    <param name="recovery_alpha_slow" value="0.0"/>
    <param name="recovery_alpha_fast" value="0.0"/>

The good thing is when the laser points matches exactly the map then the localisation is perfect, however when the laser points does not match exactly the map (even slight difference) the AMCL tries correcting the robot's position on the map but it sets the robot in a completely wrong position.

I think it is something about the AMCL configuration but I do not know exactly which parameter.

edit retag flag offensive close merge delete


Check your odometry first, see navigation troubleshooting

Humpelstilzchen gravatar image Humpelstilzchen  ( 2019-03-21 13:38:30 -0600 )edit

The odometry works fine, the problem is that the robot relies too much on the map for the localisation, therefore if the laser points are not exactly matching the map, you can see the robot location starts jumping all over the map trying to match the laser points with the map.

starter gravatar image starter  ( 2019-03-22 04:02:44 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-07-06 02:08:17 -0600

siddharthcb gravatar image

for <param name="odom_model_type" value="diff-corrected"/> type robot,

try to keep

 <param name="odom_alpha1" value="0.005"/> 
 <param name="odom_alpha2" value="0.005"/> 

 <param name="odom_alpha3" value="0.01"/> 
 <param name="odom_alpha4" value="0.005"/>

and if your map environment has low dynamic obstacles trusting your map(param name="laser_z_hit") a bit more might improve the localization.

and also try and increase the "laser_max_beams" to allow more laser points for localization.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-03-21 06:28:08 -0600

Seen: 414 times

Last updated: Jul 06 '21