Hello,
I very recently posted a question about the robot_localization package, and received some very good insight. I managed to fuse my wheel odometry with my IMU readings, but the result is not what I was expecting. I'm noticing a very significant bit of lag in updating the filtered transform. My initial approach was to start out trying to fuse all the data at once, but I quickly learned I needed to try this with individual data (i.e. just velocity of odometry). Hopefully showing my setup and some example videos will help explain the problem I'm having.
In the following example, I'm attempting the simplest setup possible. I only want the EKF to use my odometry's forward velocity value. Here's the setup & config file I'm using for this:
On ros-kinetic:
frequency: 30
sensor_timeout: 0.1
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
publish_tf: true
publish_acceleration: false
use_control: false
#map_frame: map # Defaults to "map" if unspecified
#odom_frame: odom_raw # Defaults to "odom" if unspecified
#base_link_frame: base_link_raw # Defaults to "base_link" if unspecified
#world_frame: odom # Defaults to the value of odom_frame if unspecified
odom0: odom
#x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az
odom0_config: [false, false, false,
false, false, false,
true , false, false,
false, false, false,
false, false, false]
odom0_queue_size: 10
odom0_nodelay: false
odom0_differential: false
odom0_relative: false
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1
process_noise_covariance: [0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0.025, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0.025, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.04, 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, 1e-9]
When I use this config, and move the robot forward and backward about 3 meters, I'm getting very unstable results from the EKF. I'm aware there's noise added to each measurement, so no two runs should be exactly the same, but the results I'm seeing imply there's a differently problem, because there's way too much variation between each time I run the node and run a bag file of odometry data.
Here is the bag file: https://drive.google.com/open?id=1qRLqguLdRAeyw2bFAf5Oqm7Ld6nu7-VP
Here is the config file for convenience: https://drive.google.com/open?id=1EDMMsNDVhrHEbWVt54QPb1E47eJ3-TSQ
This (https://drive.google.com/open?id=1ZwiPXWEPunMa995JTfYKNci_ipliAVxa) is a video of how the odometry transform would look without the EKF node running. It's stable enough for what I'm looking for, and I verified integrating the velocity data gives the same output as the original odometry calculation.
This (https://drive.google.com/open?id=1kAMzJfIboZbXN-XQi6lFgqe324qQ3lmS) is a video of the EKF node running the first time on the bag file. You'll notice at the beginning it is slow to respond to the velocity changes, and jumps into position. I've been unable to understand why there's so much jumping. This still happens when I increase the "frequency" parameter to about 100Hz.
This (https://drive.google.com/open?id=12HbN_7vwyj5BASEJeNO2yKO0TKOBAPgO) is a second video of the EKF node running on the bag file. Now I expect some different results, but these are wildly different than the last run. It's far too unstable for me to use this in any sort of real-time path planning environment. At the end of the video, the bag file ends, and the EKF node keeps running, so that's why it continues to fly off the screen.
My initial guess as to why this would be occurring would be this package doesn't handle the fusing of one data point very well, but that would surprise me. I have noticed that the acceleration values in the state matrix are non-zero, and this was pretty confusing to me, considering I never introduced acceleration values. Wouldn't integrating my velocity values cause more instability? If anyone has any insight into why I am experiencing these issues, I would greatly appreciate the advice. Thank you!
Edit: Just as a note, I just tried inputing all my data into robot_pose_ekf, and I got a much more realistic result. I'd really like to use robot_localization, so any help is much appreciated!
Originally posted by nprof50 on ROS Answers with karma: 26 on 2018-08-21
Post score: 1