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

robot_localization with GPS causes big drifts

asked 2022-11-28 11:37:39 -0500

MrOCW gravatar image

updated 2022-11-29 08:06:44 -0500

Hi, I am attempting localization with GPS. Currently, my odom->base_link is working well and accurate. but map->base_link causes big jumps in rotations whenever GPS messages come in and it worsens during rotations. My IMU returns 0 when facing east. Magnetic declination radius is also close to 0 in my testing area

https://drive.google.com/file/d/1I7eX...

UPDATE 1: reducing the global ekf's process noise covariance seems to reduce the speed in which the orientation changes to accomodate the direction of travel according to the GPS but still seem to have some misalignment in the overall orientation

ekf_filter_node_odom:
  ros__parameters:
    use_sim_time: true
    frequency: 30.0
    sensor_timeout: 0.1
    two_d_mode: true
    transform_time_offset: 0.0
    transform_timeout: 0.0
    print_diagnostics: false
    debug: false

    map_frame: map
    odom_frame: odom
    base_link_frame: base_link
    world_frame: odom

    odom0: /lidar_odometry
    odom0_config: [true, true, true,
                  true, true, true,
                  false,  false,  false,
                  false, false, false,
                  false, false, false]
    odom0_queue_size: 1
    odom0_nodelay: false
    odom0_differential: false
    odom0_relative: false

    twist0: /gyro_twist_with_covariance
    twist0_config: [false, false, false,
                  false, false, false,
                  true,  true,  false,
                  false, false, true,
                  false, false, false]
    twist0_queue_size: 1
    twist0_nodelay: false
    twist0_differential: false
    twist0_relative: false

    use_control: false
    dynamic_process_noise_covariance: true
    smooth_lagged_data: true
    process_noise_covariance: 1.0 for diagonal
    initial_estimate_covariance: 1.0 for diagonal

ekf_filter_node_map:
  ros__parameters:
    use_sim_time: true
    frequency: 30.0
    sensor_timeout: 0.1
    two_d_mode: true
    transform_time_offset: 0.15
    transform_timeout: 0.0
    print_diagnostics: false
    debug: false

    map_frame: map
    odom_frame: odom
    base_link_frame: base_link
    world_frame: map

    odom0: /lidar_odometry
    odom0_config: [true, true, true,
                  true, true, true,
                  false,  false,  false,
                  false, false, false,
                  false, false, false]
    odom0_queue_size: 1
    odom0_nodelay: false
    odom0_differential: true
    odom0_relative: false

    twist0: /gyro_twist_with_covariance
    twist0_config: [false, false, false,
                  false, false, false,
                  true,  true,  false,
                  false, false, true,
                  false, false, false]
    twist0_queue_size: 1
    twist0_nodelay: false
    twist0_differential: false
    twist0_relative: false

    odom1: /odometry/gps
    odom1_config: [true,  true,  false,
                  false, false, false,
                  false, false, false,
                  false, false, false,
                  false, false, false]
    odom1_queue_size: 1
    odom1_nodelay: false
    odom1_differential: false
    odom1_relative: false

    use_control: false
    dynamic_process_noise_covariance: true
    smooth_lagged_data: true
    process_noise_covariance: [x=1.0 | y=1.0 | z=1e-3 | r=0.3 | p=0.3 | yaw=0.01 | vx=0.5 | vy=0.5 | vz=0.1 | vr=0.3 | vp=0.3 | vyaw=0.3 | ax=0.3 | ay=0.3 | az=0.3]

    initial_estimate_covariance: default

navsat_transform:
  ros__parameters:
    use_sim_time: true
    frequency: 10.0
    delay: 1.0
    magnetic_declination_radians: 0.0 
    yaw_offset: 0.0
    zero_altitude: false
    broadcast_cartesian_transform: true
    broadcast_utm_transform_as_parent_frame: true
    publish_filtered_gps: true
    use_odometry_yaw: false
    wait_for_datum: false

wheel odometry + imu:

header:
  stamp:
    sec: 1669631155
    nanosec: 43059495
  frame_id: base_link
twist:
  twist:
    linear:
      x: 1.160753966440119
      y: 0.0
      z: 0.0
    angular:
      x: -0.01817941665649414
      y: 0.03200844302773476
      z: -0.14795809984207153
  covariance:
  - 0.001
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 10000.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 10000.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0009
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0009
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0
  - 0.0009
---

lidar odometry:

pose:
  position:
    x: 45.02977878252862 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-11-29 17:10:48 -0500

chased11 gravatar image

I am using robot_pose_ekf but am going to use a similar implementation. Does your GPS have an internal kalman filter? What NMEA message is it using? Are you using RTK? Not using these will result in large jumps in fix data. For the robot_pose_ekf, you need to set a very high covariance for some GPS data so it isn't used in the EKF, and it appears you did that as well.

edit flag offensive delete link more

Comments

using https://github.com/KumarRobotics/ublox ZEDF9-R

Yes there is RTK

There is no internal kalman filter in use

MrOCW gravatar image MrOCW  ( 2022-11-29 23:02:01 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-11-28 11:37:39 -0500

Seen: 136 times

Last updated: Nov 29 '22