Rosanswers logo

I am developing an Omnidirectional robot's controlling system using ROS kinetic. And I am trying to use AMCL to localize the robot on a saved map. Also I don't use any odom data. I use laser scan data only. So in my AMCL launch file I have used base_link as odom frame. My problem is, tf values between map and base_link does not update when the robot is moving on gazebo. Also the pose array does not converge. This is my AMCL launch file.

<node pkg="amcl" type="amcl" name="amcl" respawn="true" output="screen">
<remap from="scan" to="scan" />
<remap from="odom" to="base_link" />
<param name="odom_model_type" value="omni"/>
<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="laser_max_range" value="12.0"/>
<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.2"/>
<param name="odom_alpha2" value="0.2"/>
<!-- translation std dev, m -->
<param name="odom_alpha3" value="0.8"/>
<param name="odom_alpha4" value="0.2"/>
<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_model_type" value="likelihood_field"/>
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="update_min_d" value="0.2"/>
<param name="update_min_a" value="0.5"/>
<param name="odom_frame_id" value="base_link"/>
<param name="global_frame_id" value="map"/>
<param name="base_frame_id" value="base_link"/>
<param name="resample_interval" value="1"/>
<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="tf_broadcast" value="true"/>

Originally posted by Chamith on ROS Answers with karma: 3 on 2019-10-31

Post score: 0


1 Answer 1


Rosanswers logo

AMCL only publishes a transform when the robot has moved a certain distance in the odom frame. It determines the distance the robot has moved by using the BaseLink - Odom TF.

I don't think there is any easy way to change this behavior in AMCL. In the long run, you won't want to. The robot control precision is likely to be disappointing without a fast-updating BaseLink-Odom transform.

If you have sensors on your robot that will let you compute some sort of odometry data (eg, an IMU or wheel encoders) I'd strongly encourage you to use them.

If you don't have those sensors, I'd publish the baselink-odom transform based on your best guess (dead reckoning). For instance, if you've sent the robot a cmd_vel to move in x direction at .1 m/s, you could publish a baselink-odom transform that updates the x position by 1 cm every 10 ms.

Originally posted by Carl D with karma: 303 on 2019-10-31

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by Chamith on 2019-11-01:
Is there any possibility to use laser scan data to create odomerty? Thank you for the reply.

Comment by Carl D on 2019-11-01:
That's an interesting idea. It might be possible to determine a "flow" to the laser scan points, similar to the idea of optical flow. I don't know if anyone has ever done this or if it is practical though

Comment by Chamith on 2019-11-03:
Thank you for the reply. I used rf2o_laser_odometry for create odometry. But there is a small issue. The pose array and the laser scan output match precisely with the map when the robot rotating with it's axis. But when the robot has straight motion, AMCL not working correctly. Do you know the reason?

Comment by Carl D on 2019-11-06:
I don't know the reason off hand. If you still see this problem, I'd recommend opening a new question on the site so it gets more eyes on it. Also, you could post a screen shot or video of the problem perhaps.


Your Answer

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