ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hi @Masoum, the following are definitions from the robot_localization package

The estimate covariance, commonly denoted P or R, defines the error in the current state estimate. The parameter allows users to set the initial value for the matrix, which will affect how quickly the filter converges. For example, if users set the value at position [0,0] to a very small value, e.g., 1e-12, and then attempt to fuse measurements of X position with a high variance value for X, then the filter will be very slow to “trust” those measurements, and the time required for convergence will increase. Again, users should take care with this parameter. When only fusing velocity data (e.g., no absolute pose information), users will likely not want to set the initial covariance values for the absolute pose variables to large numbers. This is because those errors are going to grow without bound (owing to the lack of absolute pose measurements to reduce the error), and starting them with large values will not benefit the state estimate.

The process noise covariance, commonly denoted Q, is used to model uncertainty in the prediction stage of the filtering algorithms. It can be difficult to tune, and has been exposed as a parameter for easier customization. This parameter can be left alone, but you will achieve superior results by tuning it. In general, the larger the value for Q relative to the variance for a given variable in an input message, the faster the filter will converge to the value in the measurement.

There are many methods to initialize the covariances. As stated in the robot_localization package, one approach is to using trial and error, others call it engineer's intuition. You can start by defining with very small values and measure the results based on time to converge. For the process noise covariance, you can tune by starting 'high' and lowering until you are satisfied. The disadvantage of this method is that is time consuming and there are many combinations possible.

If you are looking for a systematic approach, you can use the proposed method in this paper: https://arxiv.org/ftp/arxiv/papers/1702/1702.00884.pdf. The paper proposes for example to use the ratio of Q/R looking for smallest SME (square mean error) to find the best performance, rather than optimizing one parameter at the time. But it's not only proposed approach in this paper, there are other proposals. It's highly recommended to read.

Another approach I have seen is to use PSO (Particle Swarm Optimization) for EKF tuning with great results: https://www.naun.org/main/NAUN/circuitssystemssignal/cssp-101.pdf. This is a more consistent approach to finding parameters, however is more complex to implement.

Hi @Masoum, the following are definitions from the robot_localization package

The estimate covariance, commonly denoted P or R, defines the error in the current state estimate. The parameter allows users to set the initial value for the matrix, which will affect how quickly the filter converges. For example, if users set the value at position [0,0] to a very small value, e.g., 1e-12, and then attempt to fuse measurements of X position with a high variance value for X, then the filter will be very slow to “trust” those measurements, and the time required for convergence will increase. Again, users should take care with this parameter. When only fusing velocity data (e.g., no absolute pose information), users will likely not want to set the initial covariance values for the absolute pose variables to large numbers. This is because those errors are going to grow without bound (owing to the lack of absolute pose measurements to reduce the error), and starting them with large values will not benefit the state estimate.

The process noise covariance, commonly denoted Q, is used to model uncertainty in the prediction stage of the filtering algorithms. It can be difficult to tune, and has been exposed as a parameter for easier customization. This parameter can be left alone, but you will achieve superior results by tuning it. In general, the larger the value for Q relative to the variance for a given variable in an input message, the faster the filter will converge to the value in the measurement.

There are many methods to initialize the covariances. As stated in the robot_localization package, one approach is to using use trial and error, others call it engineer's intuition. You can start by defining working with very small values and measure the results based on time to converge. For the process noise covariance, you can tune by starting 'high' and lowering until you are satisfied. The disadvantage of this method is that is time consuming and there are many combinations possible.possible. You will be optimizing one parameter at the time.

If you are looking for a systematic approach, you can use the proposed method in this paper: https://arxiv.org/ftp/arxiv/papers/1702/1702.00884.pdf. The paper proposes for example to use the ratio of Q/R looking for smallest SME (square mean error) to find the best performance, rather than optimizing one parameter at the time. But it's not only proposed approach in this paper, there are other proposals. It's highly recommended to read.

Another approach I have seen is to use PSO (Particle Swarm Optimization) for EKF tuning with great results: https://www.naun.org/main/NAUN/circuitssystemssignal/cssp-101.pdf. This is a more consistent approach to finding parameters, however is more complex to implement.

Hi @Masoum, the following are definitions from the robot_localization package

The estimate covariance, commonly denoted P or R, defines the error in the current state estimate. The parameter allows users to set the initial value for the matrix, which will affect how quickly the filter converges. For example, if users set the value at position [0,0] to a very small value, e.g., 1e-12, and then attempt to fuse measurements of X position with a high variance value for X, then the filter will be very slow to “trust” those measurements, and the time required for convergence will increase. Again, users should take care with this parameter. When only fusing velocity data (e.g., no absolute pose information), users will likely not want to set the initial covariance values for the absolute pose variables to large numbers. This is because those errors are going to grow without bound (owing to the lack of absolute pose measurements to reduce the error), and starting them with large values will not benefit the state estimate.

The process noise covariance, commonly denoted Q, is used to model uncertainty in the prediction stage of the filtering algorithms. It can be difficult to tune, and has been exposed as a parameter for easier customization. This parameter can be left alone, but you will achieve superior results by tuning it. In general, the larger the value for Q relative to the variance for a given variable in an input message, the faster the filter will converge to the value in the measurement.

There are many methods to initialize the covariances. As stated in the robot_localization package, one approach is to use trial and error, others call it engineer's intuition. You can start by working with very small values and measure the results based on time to converge. For the process noise covariance, you can tune by starting 'high' and lowering until you are satisfied. The disadvantage of this method is that is time consuming and there are many combinations possible. You will be optimizing one parameter at the time.

If you are looking for a systematic approach, you can use the proposed method in this paper: https://arxiv.org/ftp/arxiv/papers/1702/1702.00884.pdf. The paper proposes for example to use the ratio of Q/R looking for smallest SME (square mean error) to find the best performance, rather than optimizing one parameter at the time. But it's not the only proposed approach in this paper, there are other proposals. It's more. I'd highly recommended to read. recommend reading it.

Another approach I have seen is to use PSO (Particle Swarm Optimization) for EKF tuning with great results: https://www.naun.org/main/NAUN/circuitssystemssignal/cssp-101.pdf. This is a more consistent approach to finding parameters, however is more complex to implement.