ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why AMCL not update the tf values between map and base_link?

asked 2019-10-31 10:38:35 -0600

Chamith gravatar image

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.

<launch>
<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"/>
</node>
</launch>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-10-31 11:47:00 -0600

Carl D gravatar image

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.

edit flag offensive delete link more

Comments

Is there any possibility to use laser scan data to create odomerty? Thank you for the reply.

Chamith gravatar image Chamith  ( 2019-11-01 03:26:54 -0600 )edit

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

Carl D gravatar image Carl D  ( 2019-11-01 11:32:11 -0600 )edit

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?

Chamith gravatar image Chamith  ( 2019-11-03 06:19:16 -0600 )edit

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.

Carl D gravatar image Carl D  ( 2019-11-06 11:33:29 -0600 )edit

Question Tools

Stats

Asked: 2019-10-31 10:36:12 -0600

Seen: 1,145 times

Last updated: Oct 31 '19