showNoiseDistribution

Display noise parameter effects

Description

example

showNoiseDistribution(ommObj) shows the noise distribution for a default odometry pose update, number of samples and the current noise parameters on the input object.

axes = showNoiseDistribution(ommObj) shows the noise distribution and returns the axes handle.

showNoiseDistribution(ommObj,Name,Value) provides additional options specified by one or more Name,Value pairs. Name is the property name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name-value pair arguments in any order as Name1,Value1,...,NameN,ValueN. Properties not specified retain their default values.

Examples

collapse all

This example shows how to visualize the effect of different noise parameters on the odometryMotionModel class. An odometryMotionModel object contains the motion model noise parameters for a differential drive vehicle. Use showNoiseDistribution to visualize how changing these values affect the distribution of predicted poses.

Create a motion model object.

motionModel = odometryMotionModel;

Show the distribution of particles with the existing noise parameters. Each particle is a hypothesis for the predicted pose.

showNoiseDistribution(motionModel);

Show the distribution with a specified odometry pose change and number of samples. The change in odometry is used as the final pose with hypotheses distributed around based on the Noise parameters.

showNoiseDistribution(motionModel, ...
            'OdometryPoseChange', [0.5 0.1 0.25], ...
            'NumSamples', 1000);

Change the Noise parameters and visualize the effects. Use the same odometry pose change and number of samples.

 motionModel.Noise = [0.2 1 0.2 1];
 
 showNoiseDistribution(motionModel, ...
            'OdometryPoseChange', [0.5 0.1 0.25], ...
            'NumSamples', 1000);

Input Arguments

collapse all

odometryMotionModel object, specified as a handle. Create this object using odometryMotionModel.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'OdometryPoseChange',[1 1 pi]

Change in odometry of the robot, specified as a comma-separated pair consisting of 'OdometryPoseChange' and a three-element vector, [x y theta].

Number of particles to display, specified as a specified as a comma-separated pair consisting of 'NumSamples' and a scalar.

Axes to plot the map specified as a comma-separated pair consisting of 'Parent' and either an Axes or UIAxes object. See axes or uiaxes.

Introduced in R2019b