Migration from robot_pose_ekf is fairly straightforward. This page is meant to highlight relevant differences between the packages to facilitate rapid transitions.
For robot_pose_ekf, a common means of getting the filter to ignore measurements is to give it a massively inflated covariance, often on the order of 10^3. However, the state estimation nodes in robot_localization allow users to specify which variables from the measurement should be fused with the current state. If your sensor reports zero for a given variable and you don’t want to fuse that value with your filter, or if the sensor is known to produce poor data for that field, then simply set its xxxx_config parameter value to false for the variable in question (see the main page for a description of this parameter).
However, users should take care: sometimes platform constraints create implicit \(0\) measurements of variables. For example, a differential drive robot that cannot move instantaneously in the \(Y\) direction can safely fuse a \(0\) measurement for \(\dot{Y}\) with a small covariance value.
By default, robot_pose_ekf will take a pose measurement at time \(t\), determine the difference between it and the measurement at time \(t-1\), transform that difference into the current frame, and then integrate that measurement. This cleverly aids in cases where two sensors are measuring the same pose variable: as time progresses, the values reported by each sensor will start to diverge. If the covariances on at least one of these measurements do not grow appopriately, the filter will eventually start to oscillate between the measured values. By carrying out differential integration, this situation is avoided and measurements are always consistent with the current state.
This situation can be avoided using three different methods for the robot_localization state estimation nodes: