Robotics StackExchange | Archived questions

AMCL pose estimation is not accurate.

I am using AMCL for localizing my omnidirectional-drive robot in simulation. The pose estimation is not accurate and in some cases, it fails completely. I have posted my launch file with all the params at the end of the question and linked a video that shows the amcl's pose estimation. In the video one can observe the laser measurements does not align well with the map and towards the end of the video, it is completely off.

I have already tried the following param values:

  1. laserzhit is now set to 0.9 but I also tried values ranging from 0.75 to 9.99 (I believe, this param means I can trust my laser measurements more and there is an obstacle when the laser hits an object)
  2. laserlikelihoodmax_dist is set to 3.0. I am entirely sure what this param does. The default is 2.0. I tried values ranging from 0.5 to 10.
  3. The odom_alpha values are based on the this question.
  4. My odommodetype is omni-corrected-

My amcl launch file:

<?xml version="1.0"?>
<launch>
<!-- https://answers.ros.org/question/227811/tuning-amcls-diff-corrected-and-omni-corrected-odom-models/ -->
<node pkg="amcl" type="amcl" name="amcl" respawn="false" output="screen">
  <remap from="scan" to="base_scan" />
  <param name="transform_tolerance" value="0.05" />
  <param name="gui_publish_rate" value="10.0"/>
  <param name="save_pose_rate" value="0.5"/>
  <param name="laser_max_beams" value="30"/>
  <param name="min_particles" value="500"/>
  <param name="max_particles" value="5000"/>
  <param name="kld_err" value="0.05"/>
  <param name="kld_z" value="0.99"/>
  <param name="odom_model_type" value="omni-corrected"/>
  <param name="odom_alpha1" value="0.005"/>
  <param name="odom_alpha2" value="0.005"/>
  <!-- translation variance, m -->
  <param name="odom_alpha3" value="0.010"/>
  <param name="odom_alpha4" value="0.005"/>
  <param name="odom_alpha5" value="0.003"/>

  <!--laser_z_hit probability that the laser actaully hit an object-->
  <param name="laser_z_hit" value="0.9"/>
  <param name="laser_z_short" value="0.1"/>
  <param name="laser_z_max" value="0.05"/>
  <!--laser_z_rand probability that the laser hit an object that is not part of the map (random).
  e.g. Dynamic obstacles like people -->
  <param name="laser_z_rand" value="0.05"/>
  <param name="laser_sigma_hit" value="0.1"/>
  <param name="laser_lambda_short" value="0.1"/>
  <param name="laser_lambda_short" value="0.1"/>
  <!-- <param name="laser_model_type" value="likelihood_field_prob"/> -->
  <param name="laser_model_type" value="likelihood_field_prob"/> -->
  <param name="laser_likelihood_max_dist" value="3.0"/>
  <param name="update_min_d" value="0.2"/>
  <param name="update_min_a" value="0.5"/>
  <param name="odom_frame_id" value="odom"/>
  <param name="resample_interval" value="1"/>
  <param name="recovery_alpha_slow" value="0.0"/>
  <param name="recovery_alpha_fast" value="0.0"/>

  <param name="initial_pose_x" value="0.0"/>
  <param name="initial_pose_y" value="0.0"/>
  <param name="initial_pose_a" value="0.0"/>
  <param name="initial_cov_xx" value="0.1"/>
  <param name="initial_cov_yy" value="0.1"/>
  <param name="initial_cov_aa" value="0.1"/>

  <param name="tf_broadcast" value="true"/>
</node>
</launch>

Linking the video once again The read polygon is the footprint of the robot. RGB axis represent the baselink frame. The big red arrow represent the amclpose with heading. The other flat red arrows represent the hypothesis particles. I am not sure how to tune amcl. Any help is hugely appreciated.

Asked by Arul Selvam on 2019-12-16 09:38:05 UTC

Comments

Are you sure its actually an issue with AMCL and not your odometry? I'm seeing alot more error and shaking than the 0.2m update distance would probably call for. (also may want to bump that up to 0.5m or something and if you want updates that fast, changing the resampling interval to 2)

Asked by stevemacenski on 2019-12-16 13:15:19 UTC

Answers