improve robot_pose_ekf estimate
I am using robot_pose_ekf to fuse wheel odom with imu. I believe the basic framework is set up correctly but I am not getting a very good result.
I have tested in rviz by plotting both the wheel odom path and the ekf path. They follow a similar path for a while but then diverge, which is to be expected, however when I return the robot to the starting point the path for the wheel odom is closer to 0,0 than the ekf odom.
It seems as if the IMU is leading it astray so I calibrated the IMU as best as I can and it seems to work well. Although it is hard to tell if linear acceleration and angular velocity are accurate. Again they seem so. I have also altered the IMU firmware to make sure that the coordinates are correct (ENU). I believe the tf dimensions are correct but I am worried that the orientation of the IMU may not be. I am using a Razor IMU and I have read that the axes printed on the board are not correct. I have compensated for this as best as I can, but confidence is not high for this. How to be sure?
Based on this is there anything obvious I could tune?
UPDATE:
I ran a more controlled test where I manually pushed the robot along a square path (1.5m square) and again plotted the paths to compare. This time the ekf odom did better and the wheel odom performed worse that usual! Perhaps there is wheel slippage due to it being pushed by hand (motor resistance).
Bellow you can compare the 2 scenarios. The square path is pushed by hand the other is by teleop. Blue is wheel odom, red is ekf odom:
I've also just noticed that the robot starts facing 'east' by default when I look at it in the top down orth preset view in rviz. Does this matter?
What other information should I provide? Is it useful to post messages from the odom and imu? Is there some way to prove if the imu is set up according to ENU /REP 103?
Please let me know what would be useful for debugging.
I have used the robot_pose_ekf package to fuse the data from wheel odometry and imu.. But the data after fusion is so unbelievable. When the robot goes around a circle. The result of wheel odome is like a circle.But the result of fusion is like a curve. How to use robot_pose_ekf.