robot_localization jumping unexpectedly with GPS+IMU

asked 2023-04-15 16:13:14 -0500

Divyanshu gravatar image

Hi,

I am currently using the robot_localization package to fuse GPS+IMU readings of an autonomous go-kart project. The setup and all drivers/code are in ROS 2 Foxy on Ubuntu 20.04. I have been using a septentrio GNSS receivers with correction data as well and a BNUO055 adafruit 9DOF IMU sensors which are giving yaw orientation of the robot in the ENU frame along with other accel and gyro data. The GPS we are working with has random jumps in the lat long it is giving us (ideally this is due to the weather and we are trying to debug why this is happening so often). These jumps as you can see in the figure below take huge values in lat long as well its covariance values given to me.

C:\fakepath\latjump.png

The IMU data from the BNUO055 driver is not outputting a covariance value. So to tackle this simple issue and also take care of high negative values of the GPS covariance and lat long, I wrote a simple script to pre-process the data before giving it to the robot_localization package. The pre-processing script (and package) can be found here. The pre-processing essentially adds covariance to IMU readings and if the GPS jumps, it keeps publishing the old GPS value until the GPS fixes itself again. I am giving this processed data to the robot_localization package (using EKF).

Finally, coming to the issue I am facing. The new GPS and IMU data (coming out of the package mentioned above) has no GPS jumps but has a high covariance value (when the raw data jumps). What I expected out of this is that with these high covariance values, the EKF would only use the IMU for dead-reckoning. However, the value of /odometry/filtered blows up to high values unexpectedly. I cannot understand why this is given that the processed GPS values don't jump as can be seen below and the IMU also gives acceleration values consistently in the window where the GPS jumps.

C:\fakepath\use_navsat.png

The launch file is here and the params file is here. I am aware that I am using the GPS data with an instance of EKF where I have put the world_frame as odom but I do not have any other sensor to fuse as of now (we are thinking of including the wheel speed sensor soon). Please let me know what I can improve in my overall setup and why is the robot_localization jumping so much randomly (see fig below).

C:\fakepath\last_jump.png

The raw data bag (without the pre-processing) is here. Please let me know if I can provide any more information about my setup or data and any help would be very much appreciated. Thanks in advance.

edit retag flag offensive close merge delete