Confused with setup for robot_localization
Hello,
I've just recently started trying to implemented the robot_localization node, and I'm having trouble understanding what all to enable, and what I should be expecting back. Here is my current setup:
- I have a robot which reports its odometry as (x, y, yaw) based on ticks from the wheel's encoder. It also has an IMU that is reporting (roll, pitch, yaw).
- I am attempting to fuse the (x, y, yaw) odometry information with the (yaw) information from the IMU.
- I haven't really tweaked covariances or anything yet, I am mostly using the default values from the template.
What I am not understanding:
- The wheel odometry is inherently going to be incorrect due to wheel slippage, so while the distance the robot traveled is still pretty accurate, the odometry value for yaw is not to be trusted after a long time. But x, y for odometry are calculated using yaw, so I guess those would be wrong as well. Am I supposed to be taking the result of the robot_localization output and "resetting" the state of the odometry (specifically yaw) of the wheels? I'm not sure if this is something the node handles internally or not.
- My main concern is that odometry reports being at (5, 5, 45 degrees) after a bit of movement, and the IMU reports yaw is actually 180. Then the X, Y that the odometry reported would also be wrong. How does this node handle a situation like that? Would it somehow understand to adjust the X, Y values based on the IMU yaw reading being the correct one?
- Should I be passing more information to the node? I am only passing x, y, yaw (odometry), and yaw (IMU). I can't really understand how it can take that information and correct the x, y position relative to what the IMU is saying. If the IMU and odometry disagree entirely on the yaw value, what happens? I.e. what happens to the X and Y values when my odometry says I'm turned 45 degrees and the IMU says I'm at 180 degrees?
- I saw somewhere that I shouldn't be fusing X, Y of the odometry, instead I should fuse veloicty_x, velocity_y. But in regards to my first bullet point in this list, wouldn't the velocities be subject to the same issues as position? The yaw known by odometrty would be used to calculate the velocities as well, thus giving the same error as the position if the yaw is wrong.
- When I look at the transform in rviz, I notice that if I lift the robot up off the floor and turn it 180 degrees, the transform does not change. It's almost as if it's completely ignoring the IMU yaw position and setting itself purely with the odometry information. Why would I not see a change in the transform if I pick up the robot and rotate it to change the IMU value?
I don ...
have you figured out how to configure robot_localization for odometry + imu? i am currently stuck on this issue (See my latest question)