Within a particle filter, the samples are propagated at each time step using some given proposal distribution. A common approach
for mobile robots is taking the probabilistic motion model directly as this proposal.
In the MRPT there are two models for probabilistic 2D motion, implemented in mrpt::slam::CActionRobotMovement2D. To use them just fill out the option structure “motionModelConfiguration” and select the method in “CActionRobotMovement2D::TMotionModelOptions::modelSelection”.
An example of usage would be like:
using namespace mrpt::slam;
using namespace mrpt::poses;
CPose2D actualOdometryReading(0.20f, 0.05f, DEG2RAD(1.2f) );
// Prepare the "options" structure:
opts.modelSelection = CActionRobotMovement2D::mmThrun;
opts.thrunModel.alfa3_trans_trans = 0.10f;
// Create the probability density distribution (PDF) from a 2D odometry reading:
actMov.computeFromOdometry( actualOdometryReading, opts );
// For example, draw one sample from the PDF:
actMov.drawSingleSample( sample );
This page provides a description of the internal workings of these methods.
2. Gaussian probabilistic motion model
Assume the odometry is read as incremental changes in the 2D robot pose. The odometry readings are denoted as
The model for these variables is:
The equations that relate the prior robot pose and the new pose after the incremental change are: (based on the proposal in )
Our aim here is to obtain a multivariate Gaussian distribution of the new pose, given that the prior pose has a known value (it is the particle being propragated). In this case we can just model how to draw samples from a prior pose of , and then the samples can be composed using the actual prior pose.
Using this simplification:
The mean of the Gaussian can be simply computed from the composition of the prior and the odometry increment. For the covariance, we need to estimate the variances of the three variables of the odometry increment. We model them as having independent, zero-mean Gaussian errors. The errors will be composed of terms that capture imperfect odometry and potential drift effects.
We denote as the diagonal matrix having the three variances of the odometry variables, modeled as:
The default parameters (loaded in the constructor and available in RawLogViewer) are:
And finally, the covariance of the new pose after the odometry increment () is computed by means of:
The following is an example of samples obtained using this model with the RawLogViewer application:
3. Thrun, Fox & Burgard’s book particle motion model
Like above, denote the odometry readings as , and let’s assume that the prior robot pose is , which means that we want to draw samples of the robot increment, not the final robot pose (to simplify the equations without loss of generality). Then, the new robot pose, which we want to draw samples from is:
Where the variables correspond to the robot pose increment as is shown in the figure:
Here, the variables , and are the result of adding a Gaussian, zero-mean random noise to the actual odometry readings:
The model described in  employs the following approximations for the values of the standard deviations required for the equations above:
This is the model implemented in CActionRobotMovement2D when setting “CActionRobotMovement2D::TMotionModelOptions::modelSelection” to “mmThrun”. Actually, a small additional error is summed to each pose component () to avoid that for a null odometry increment the movement for all the particles become exactly zero, which may lead a particle filter to degenerate.
Below it is shown an example of samples generated using this model, for an excessively large value of (a very large “slippage”), generated by RawLogViewer: