Transient odometry rotation error (robot_localization)
TLDR:
I'm working on a differential drive base with encoders for odometry and an IMU. I'm working on fusing these data sources using robot_localization in an effort to get a more accurate odometry estimate so that our localization will perform better. Outside of some reasonable noise, all of our data tracks desired yaw velocity pretty well:
However, we are experiencing a significant transient yaw error when starting or stopping a turn. There is not a corresponding error in linear motion.
The long version:
I'm working on a differential drive base with encoders for odometry and an IMU. I'm working on fusing these data sources using robot_localization in an effort to get a more accurate odometry estimate so that our localization will perform better. Outside of some reasonable noise, all of our data tracks desired yaw velocity pretty well:
However, we are experiencing a significant transient yaw error when starting or stopping a turn. There is not a corresponding error in linear motion.
Assuming that everything is functioning as it should be, we should be able to rotate the robot with laser scan persistence set to a couple of seconds in rviz, and see the environment remain static relative to the robot.
Ideally, when rotating, the lidar scan (with persistence) should look similar to this static lidar scan:
When rotating and at steady state, the rotating lidar scan looks like this (which is pretty close to desired):
When we start or stop rotation, however, it looks like this:
Which is significantly worse than desired. Ultimately, this leads to localization error when turning around corners and the like, which then ultimately messes up our navigation.
Here's a bagfile for your perusal:
Topic names are namespaced by robot name (in this case, p1_001), so:
/p1_001/mobile_base_controller/cmd_vel is commanded velocity
/p1_001/scan is the lidar scan
/p1_001/mobile_base_controller/odom is the raw odometry
/p1_001/mobile_base_controller/imu is the raw imu data
/p1_001/odom is the fused output from robot_localization
I would appreciate it greatly to hear your thoughts on the matter!
EDIT:
Here are launch and config files for relevant nodes.
ROS control launchfile, launches hardware interface, Diff drive and IMU controller
Any conclusion on this?