How to use resulting map, odom frame data from ekf filter of robot_localization package
Hi,
I’m working on a custom built robot and I’m trying to position the robot in known map as well as control it in order to go from A to B. I found robot localization to be exactly what I need for my project but I have some issue with understanding how robot localization works (I read most of forums posts on ROS.org but cannot find explicit answer to my concerns). To be more precise I’m having trouble understanding which node instance output to use for localization in case of two EKF instance example (odom or map)?
I am fusing wheel encoder and IMU in odom frame, and also in another instance of robot localization EKF node I am fusing wheel encoder, IMU and UWB in the map frame. I’m using UWB instead of GPS - I have this with guaranteed 3Hz update rate and it supplies x and y coordinates in world frame. As a result, I have two estimates of the robot’s position in two resulting frames (map and odom). As I understand, the map -> odom transformation is constantly being computed and published and is not constant due to a drift in odom frame, and discrete jumps in map frame. I also understand (from forum posts) that odom frame output is continuous and thus better suited for control. Is there any example of how to integrate robot localization in control loop?
The question is which data to use for localization? Are the two frames in any way connected/communicating in the background (except for transform update)? Due to 3Hz update rate could I get away only with odom frame output (other sensors have 25Hz update rate) which would also include UWB readings?
I would greatly appreciate any help of pointers in the right direction. Thank you in advance.
Best regards,