Rosanswers logo

Hi all,

I have a mobile robot and I would like it to navigate in a room, I already have a map of the room. I am using wheel encoders for the odometry, robot_pose_ekf for fusing data from wheel encoders and IMU and to get the odom_combined -> base_footprint transformation. Then , I have amcl for localization and move_base is doing the planning. I am able to start everything smoothly and give the goal through RVIZ and the tf tree looks correct: image description

After I give the goal, robot starts moving towards it and on the way, its localization gets messed up. Once, it is close to the goal it starts rotating in a random manner which also messes up the localization of the robot. The problem is more common when it is near to the goal, it starts rotating randomly and gets lost. Also sometimes, I get the warning:

Clearing costmap to unstuck robot (3.000000m).  
Rotate recovery behavior started. 

but I dont see the robot being stuck. I think there is some issue with amcl but I am not sure. I saved all the data in a bag file and ran it and made two videos for two different goal positions. In first two cases, the correct orientation should be pi/2 (south direction) and in the last case the robot should point right:
Video - 1
Video - 2
Video - 3
The parameters for amcl is shown below:


<node pkg="amcl" type="amcl" name="amcl" output="screen">
    <param name="odom_frame_id" value="odom_combined"/>
    <param name="base_frame_id" value="base_link"/>
    <param name="odom_model_type" value="diff"/>
    <param name="laser_model_type" value="likelihood_field"/>
    <param name="use_map_topic" value="true"/>
    <param name="odom_alpha5" value="0.1"/>
    <param name="transform_tolerance" value="0.2" />
    <param name="gui_publish_rate" value="10.0"/>
    <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_alpha1" value="0.8"/>
    <param name="odom_alpha2" value="1.0"/>
    <param name="odom_alpha3" value="0.8"/>
    <param name="odom_alpha4" value="1.0"/>
    <param name="laser_z_hit" value="0.5"/>
    <param name="laser_z_short" value="0.05"/>
    <param name="laser_z_max" value="0.05"/>
    <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_lambda_short" value="0.1"/>
    <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="resample_interval" value="0.5"/>
    <param name="transform_tolerance" value="0.1"/>
    <param name="recovery_alpha_slow" value="0.0"/>
    <param name="recovery_alpha_fast" value="0.0"/>

    <param name="initial_pose_x" value="1.30"/>
    <param name="initial_pose_y" value="2.0"/>
    <param name="initial_pose_a" value="1.57"/>

I am not able to figure out what exactly is causing such a behavior but it looks like its a very common problem. Therefore, I hope someone who has faced such issues before can help me out here. Let me know if you need any more information from me

Thanks in advance.
Naman Kumar

Originally posted by Naman on ROS Answers with karma: 1464 on 2015-05-01

Post score: 0

Original comments

Comment by jseal on 2015-05-04:
what value do you have for yaw_goal_tolerance in your base_local_planner config file. If that's too small it will have a tendency to rotate around the goal as you described.

Comment by Naman on 2015-05-05:
It is 0.2, I think its not too small.

Comment by jseal on 2015-05-05:
That should be fine, have you tried running it without the amcl node and see if the behavior is the same?


1 Answer 1


Rosanswers logo

If you haven't done it already, you can try to find the failure with the Navigation Tuning Guide

Originally posted by pilleatus with karma: 31 on 2016-06-28

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.