Ask Your Question
0

AMCL doesn't work well with my robot [closed]

asked 2011-11-19 13:26:12 -0500

Charles gravatar image

updated 2011-11-19 13:40:08 -0500

Hi,everyone. I'm trying to turn on navigation module on my robot,but i don't know how to judge weather the AMCL is working well on my robot. These two videos were recorded when I driving my robot around with a joystick.

http://www.youtube.com/watch?v=nKyDSSDDfsU

http://www.youtube.com/watch?v=eJ9-8BQTi1M

According to the videos, particles have been updated, it seems that amcl really worked, but the red laser line didn't match the black line in the map very well, it seems that amcl didn't work well.

this is the output of tf_monitor:

RESULTS: for all Frames

Frames:
Frame: /base_link published by /we_base_odom Average Delay: 0.000288508 Max Delay: 0.00262595
Frame: /laser_link published by /base_laser_tf Average Delay: -0.099723 Max Delay: 0
Frame: /odom published by /amcl Average Delay: -0.17089 Max Delay: 0

All Broadcasters:
Node: /amcl 20.3454 Hz, Average Delay: -0.17089 Max Delay: 0
Node: /base_laser_tf 10.1956 Hz, Average Delay: -0.099723 Max Delay: 0
Node: /we_base_odom 44.4666 Hz, Average Delay: 0.000288508 Max Delay: 0.00262595

and this is the output of view_frames:

image description

AMCL:

<launch>
    <node name="amcl" pkg="amcl" type="amcl" output="screen" >
        <remap from="scan" to="scan" />

        <!-- Overall filter parameters -->
        <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="update_min_d" value="0.2"/>
        <param name="update_min_a" value="0.2"/>
        <param name="resample_interval" value="1"/>
        <param name="transform_tolerance" value="0.2"/>
        <param name="recovery_alpha_slow" value="0.0"/>
        <param name="recovery_alpha_fast" value="0.0"/>
        <param name="gui_publish_rate" value="10.0"/>

        <!-- Laser model parameters -->
        <param name="laser_max_beams" value="30"/>
        <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_model_type" value="likelihood_field"/>
        <param name="laser_likelihood_max_dist" value="2.0"/>

        <!-- Odometery model parameters -->
        <param name="odom_model_type" value="diff"/>
        <param name="odom_alpha1" value="0.2"/>
        <param name="odom_alpha2" value="0.2"/>
        <param name="odom_alpha3" value="0.8"/>
        <param name="odom_alpha4" value="0.2"/>

    <!--param name="odom_model_type" value="omni"/>
    <param name="odom_alpha1" value="0.2"/>
    <param name="odom_alpha2" value="0.2"/>
    <param name="odom_alpha3" value="0.8"/>
    <param name="odom_alpha4" value="0.2"/>
    <param name="odom_alpha5" value="0.1"/-->

        <param name="odom_frame_id" value="odom"/>
        <param name="base_frame_id" value="base_link"/>
        <param name="global_frame_id" value="map"/>

        <param name="initial_pose_x" value="1.6"/>
        <param name="initial_pose_y" value="7.5"/>
    </node>
</launch>

costmap_common:

map_type: costmap
transform_tolerance: 0.5
obstacle_range: 2.5
raytrace_range: 3.0
inflation_radius: 0.55

observation_sources: base_scan

base_scan: {sensor_frame: laser_link,
            data_type: LaserScan,
            topic: /scan,
            expected_update_rate: 0.4,
            observation_persistence: 0.0,
            marking: true,
            clearing: true,
            min_obstacle_height: -0.10,
            max_obstacle_height: 2.0}

local_costmap:

#Independent settings for the local costmap
local_costmap:
    publish_voxel_map: true
    global_frame: odom
    robot_base_frame: base_link
    update_frequency: 5.0
    publish_frequency: 2.0
    static_map: false
    rolling_window: true
    width: 10.0
    height: 10.0
    resolution: 0.025
    origin_x: 0.0
    origin_y ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by kwc
close date 2012-02-29 07:46:50

Comments

What kind of robot and laser are you using?
Brian Gerkey gravatar imageBrian Gerkey ( 2011-11-20 03:29:45 -0500 )edit
Hokuyo UTM-30LX
Charles gravatar imageCharles ( 2011-11-23 18:19:23 -0500 )edit

4 Answers

Sort by » oldest newest most voted
0

answered 2012-01-17 00:37:39 -0500

raahlb gravatar image

I'm no expert on AMCL and even less on the laser model parameters, but you seem to have set them quite differently from the defaults. I'm not 100% sure how to interpret it, but is z_hit really supposed to be as low as 0.5? Maybe this could be the cause of the bad performance? What happens if you switch them back to the default values?

Calling the global_localization just puts particles all over the map. As you manually set the initial pose it is not needed.

You'll have to look up the equations for the different laser models. I didn't find much on google, but there's a book mentioned on the AMCL page. I've ordered it myself, hoping to learn how to properly set the parameters.

"Diff" and "omni" is whether your robot can move sideways. First is if not, second is if it can.

edit flag offensive delete link more
0

answered 2011-11-23 18:15:22 -0500

Charles gravatar image

updated 2011-11-23 18:20:39 -0500

Brian Gerkey:

Thank you for answering my questions.

I did the sanity check as you said, I think the odometry is reasonable. I put the video here: http://youtu.be/nNgkgiUnA3M

I also did the sanity check as the Navigation Tuning Guide said. The video is here:http://youtu.be/cAbMLa1msEU

I found that the AMCL worked better with my robot when I drove my robot with a high speed than a low speed. I made two video for a comparison. The slow speed one.The high speed one.

I got two questions after I read the navigation tutorials again and again:

1.The AMCL node provide a service named "global_localization". Is it necessary to call this service before testing the AMCL node?

2.How can I determine to set the "odom_model_type" to "diff" or "omni"? And the "laser_model_type".

edit flag offensive delete link more
0

answered 2011-11-20 03:30:39 -0500

Brian Gerkey gravatar image

It looks like your robot may have an under-reporting bias in its odometry.

Try this sanity check to get an idea of how just odometry + laser looks.

edit flag offensive delete link more

Comments

Thank you! I did the sanity check. It seems the odomtry is reasonable.
Charles gravatar imageCharles ( 2011-11-23 18:16:32 -0500 )edit
0

answered 2012-01-17 00:12:26 -0500

Hououin Kyouma gravatar image

Hi, when I started using amcl it also didn't work correctly for me, but ignoring all paramaters in the launch file helped for me. The only thing I have in my launch file to start amcl is this:

<node pkg="amcl" type="amcl" name="amcl"/>

This works fine for me, so maybe it's a good idea to give this a shot... Good luck!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2011-11-19 13:26:12 -0500

Seen: 3,388 times

Last updated: Jan 17 '12