Merging odometry with imu data
I have a node monitoring dual motor encoders and publishing odometry to the standard /odom. I also have an IMU with a compass providing true orientation about the z axis.
I'm currently calculating the effective z orientation just from the wheel velocities, as explained in this answer. Should I instead use the z orientation provided by the IMU, since that's absolute? Or should wheel odometry and IMU data be kept separate and merged later into a new topic?
May I ask, did you fuse IMU directly to odom? Would you mind sharing your odom code?