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

EKF start to predict after amcl stop sending pose

asked 2021-08-27 03:45:29 -0500

xingjl6280 gravatar image

Hello,

I'm trying to use robot_localization to fuse amcl_pose with encoder odom, and latter GPS. The experiment is basing on Turtlebot3, gazebo and ros2-foxy.

It's working well if the robot is moving. The problem is, amcl will stop sending amcl_pose if there's no movement, and then EKF will start to predict, causing map->odom TF drift to a fixed direction continuously.
If remove the amcl_pose from map ekf, the issue will not happen.

I know set the amcl param "update_min_a" and "update_min_d" will let it send amcl_pose continuously, but I believe it's a bad workaround. So is there a better way to fuse such kind of pose? e.g. amcl pose, or pose calculated by landmark like QR code on the ground.

AMCL config:

 amcl:
  ros__parameters:
    use_sim_time: False
    alpha1: 0.2
    alpha2: 0.2
    alpha3: 0.2
    alpha4: 0.2
    alpha5: 0.2
    base_frame_id: "base_link"
    beam_skip_distance: 0.5
    beam_skip_error_threshold: 0.9
    beam_skip_threshold: 0.3
    do_beamskip: false
    global_frame_id: "map"
    lambda_short: 0.1
    laser_likelihood_max_dist: 2.0
    laser_max_range: 100.0
    laser_min_range: -1.0
    laser_model_type: "likelihood_field"
    max_beams: 60
    max_particles: 2000
    min_particles: 500
    odom_frame_id: "odom"
    pf_err: 0.05
    pf_z: 0.99
    recovery_alpha_fast: 0.0
    recovery_alpha_slow: 0.0
    resample_interval: 1
    robot_model_type: "differential"
    save_pose_rate: 0.5
    sigma_hit: 0.2
    tf_broadcast: false
    transform_tolerance: 1.0
    update_min_a: 0.2
    update_min_d: 0.25
    z_hit: 0.5
    z_max: 0.05
    z_rand: 0.5
    z_short: 0.05

Global EKF config:

global_ekf:
  ros__parameters:
    frequency: 30.0
    use_sim_time: true
    two_d_mode: true
    publish_tf: true
    map_frame: map
    odom_frame: odom
    base_link_frame: base_link
    world_frame: map

    pose0: /amcl_pose
    pose0_config: [true,  true, false,
                   false, false, true,
                   false, false, false,
                   false, false, false,
                   false, false, false]

    odom0: /odom_raw
    odom0_config: [false, false, false,
                   false, false, false,
                   true, false, false,
                   false, false, true,
                   false, false, false]

Odom EKF config: (Gazebo will not update odom->base_link tf, as I close it in the diff_drive_plugin )

odom_ekf:
  ros__parameters:
    frequency: 30.0
    use_sim_time: true
    two_d_mode: true
    publish_tf: true
    map_frame: map
    odom_frame: odom
    base_link_frame: base_link
    world_frame: odom


    odom0: /odom_raw
    odom0_config: [false, false, false,
                   false, false, false,
                   true, false, false,
                   false, false, true,
                   false, false, false]
edit retag flag offensive close merge delete

Comments

hey, i'm having some similar issues with my college work, do you have a github with your work? could you send me? my email: angellomello1@gmail.com

angello gravatar image angello  ( 2022-05-27 08:03:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-01 22:41:06 -0500

xingjl6280 gravatar image

it is because I didn't give Y linear velocity in odom0. Issue resolved

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-08-27 03:45:29 -0500

Seen: 150 times

Last updated: Sep 01 '21