Hi Vinh K! As @jayess said, the best place to start is the wiki page. If you want to get something up and running quickly I suggest you look at the example launch files and their corresponding configuration files
If you want to know how robot_localization
produces a position estimate, it follows the standard process for the Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF). You're best to read the relevant literature on those topics, and read the associated paper here.
If you are using a GPS outdoors, then the output you care about will be topic labelled /odometry/filtered_map
. This is a ROS odometry message and is the position of your robot relative to the reference frame /map
, which will be created when you launch the localization nodes, and will be placed at the current position of your robot. Essentially /odometry/filtered_map
is the position and orientation of your robot relative to its starting point.
Regarding performance, this will depend on your sensors. I'm using a high-accuracy GPS and I can get the position of my robot to within +/- 2 cm if its moving, less if it's stationary. If accuracy is important to you, I've found that the UKF is more accurate than the EKF.
ROS and robot_localization
The way to learn how robot_localization works is to thoroughly read the wiki, and (because you're using GPS) specifically this page here. But I'll give you a short(ish) overview. I won't make any assumptions about how much you or anyone reading this later knows, so apologises if this repeats stuff you already understand:
ROS navigation/localization packages revolve around three key frames:
/base_link
This frame is rigidly attached to your robot, and basically represents the robot's position and orientation in 3D space. /odom
This represents your local frame of reference. Motion of /base_link
relative to this frame is expected to be continuous (i.e. no discrete jumps) and localization packages that fuse data in this reference frame generally only fuse wheel odometry and IMU data, hence why the robot's position relative to /odom
drifts over time. /map
This represents your global reference frame. Motion of /base_link
relative to this frame will generally be more accurate and won't drift over time.
The purpose of robot_localization is to create the /odom
and /map
reference frames, and create an odometry message that gives the position of /base_link
(i.e. your robot) relative to these frames. To do this, robot_localization uses three separate nodes which can be created by running the template launch files, as described in the template launch file:
This launch file provides an example of how to work with GPS data using robot_localization. It runs three nodes:
(1) An EKF instance that fuses odometry and IMU data and outputs an odom-frame state estimate
(2) A second EKF instance that fuses the same data, but also fuses the transformed GPS data from (3)
(3) An instance of navsat_transform_node, which takes in ...
(more)
Have you read its wiki?