How accurate does the earth referenced heading need to be for robot_localization

asked 2021-11-05 16:22:03 -0500

rajs gravatar image

updated 2021-11-05 16:30:08 -0500

Hello, I am using two instances of ekf_node and trying to perform outdoor localization. I am having issues with my odom frame, the odom frame keeps drifting by a small amount from the map frame, either towards left or right even after moving just 2m straight forward. I am pretty sure that my odom->base_link (ekf_local) is accurate enough for a 2m distance. I am guessing that little drift is due to the small error in the earth referenced heading. I am using two GPS modules displaced horizontally within the robot, providing RTK fix's to calculate the earth referenced heading (0 pointing east). Is there a way to fix this? @TomMoore Thank You

ekf_local config

# Wheeled Odometry
odom0: /odom/data
odom0_config: [false,  false,  false,
               false, false, false,
               true, true, false,
               false, false, true,
               false, false, false]
odom0_queue_size: 1
odom0_nodelay: false
odom0_differential: false
odom0_relative: false
# odom0_pose_rejection_threshold: 2
# odom0_twist_rejection_threshold: 2


# IMU
imu0: /imu/data
imu0_config: [false, false, false,
              false, false, true,
              false, false, false,
              false, false,  true,
              true,  false, false]
imu0_nodelay: false
imu0_differential: false
imu0_relative: true
imu0_queue_size: 1
imu0_remove_gravitational_acceleration: true

# Pose Scan Matching
odom1: /odometry/scanmatching/data
odom1_config: [true,  true,  false,
              false, false, true,
              false, false, false,
              false, false, false,
              false, false, false]
odom1_queue_size: 1
odom1_nodelay: false
odom1_differential: false
odom1_relative: true

ekf_global config

# Wheeled Odometry
odom0: /odom/data
odom0_config: [false,  false,  false,
               false, false, false,
               true, true, false,
               false, false, true,
               false, false, false]
odom0_queue_size: 1
odom0_nodelay: false
odom0_differential: false
odom0_relative: false
# odom0_pose_rejection_threshold: 2
# odom0_twist_rejection_threshold: 2


# IMU
imu0: /imu/data
imu0_config: [false, false, false,
              false, false, true,
              false, false, false,
              false, false,  true,
              true,  false, false]
imu0_nodelay: false
imu0_differential: false
imu0_relative: true
imu0_queue_size: 1
imu0_remove_gravitational_acceleration: true


# Pose GPS1
odom1: /odometry/gps1
odom1_config: [true,  true,  true,
              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


# Pose GPS2
odom2: /odometry/gps2
odom2_config: [true,  true,  true,
              false, false, false,
              false, false, false,
              false, false, false,
              false, false, false]
odom2_queue_size: 1
odom2_nodelay: false
odom2_differential: false
odom2_relative: false

# Pose Scan Matching
odom3: /odometry/scanmatching/data
odom3_config: [true,  true,  false,
              false, false, true,
              false, false, false,
              false, false, false,
              false, false, false]
odom3_queue_size: 1
odom3_nodelay: false
odom3_differential: true
odom3_relative: false

navsat transform

frequency: 1
delay: 0
magnetic_declination_radians: 0
yaw_offset: 0
zero_altitude: true
broadcast_cartesian_transform: false
broadcast_cartesian_transform_as_parent_frame: false
publish_filtered_gps: false
use_odometry_yaw: false
wait_for_datum: false
edit retag flag offensive close merge delete

Comments

Test your theory by putting a large error in the earth reference and see if the issue follows the error. How stable are GPS readings? GPS will make you age quickly if you expect good results anywhere near a building (or a person standing over a robot).

billy gravatar image billy  ( 2021-11-06 01:48:09 -0500 )edit

@rajs Please tell us what accuracy you think GPS+RTK is able to provide.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-11-06 13:01:21 -0500 )edit

@Mike Scheutzow I am getting around 2-3 cm level accuracy.

rajs gravatar image rajs  ( 2021-11-15 21:29:16 -0500 )edit

@billy I used your method to check if the cause of issue is earth referenced heading, and yes it is!

rajs gravatar image rajs  ( 2021-11-15 21:31:18 -0500 )edit

How far apart are the two GPS modules? And what is accuracy when they are moving? If both have 3 cm of noise that could be a huge angle depending on how close they are to eachother. Do you have a gyro or compass to integrate heading as well?

billy gravatar image billy  ( 2021-11-15 21:50:45 -0500 )edit

Which GPS System are you using? Which GPS receiver?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-11-17 06:21:35 -0500 )edit

@Mike Scheutzow I am using the 3 F9P Receivers in moving base configuration. @billy Receivers are displaced horizontally by 78cm. I don't have a Magnetometer, Also Having it won't be helpful because there are a lot of moving metal parts in the robot (apart from the driving motors).

rajs gravatar image rajs  ( 2021-11-17 15:08:46 -0500 )edit

With 3cm GPS accuracy, if you ignore statistics gives you max 30cm inaccuracy over 2 meters distance. Is that more or less than you're seeing? If it's more than 30 cm, either you're not getting 3cm from the GPS or your error is coming from something else.

billy gravatar image billy  ( 2021-11-17 16:49:20 -0500 )edit