Main Content


Create a likelihood field range sensor model


The likelihoodFieldSensor object creates a likelihood field sensor model object for range sensors. This object contains specific sensor model parameters. You can use this object to specify the model parameters in a monteCarloLocalization object.



lf = likelihoodFieldSensorModel creates a likelihood field sensor model object for range sensors.


expand all

Occupancy grid representing the map, specified as a binaryOccupancyMap object. This object represents the environment of the vehicle as a grid with binary values indicating obstacles as true (1) and free locations as false (0).

Pose of the range sensor relative to the coordinate frame of the vehicle, specified as a three-element vector, [x y theta].

Minimum and maximum range of sensor, specified as a two-element vector in meters.

Number of beams used for likelihood computation, specified as a scalar. The computation efficiency can be improved by specifying a smaller number of beams than the actual number available from the sensor.

Standard deviation for measurement noise, specified as a scalar.

Weight for probability of random measurement, specified as a scalar. This scalar is the probability that the measurement is not accurate due to random interference.

Weight for probability of expected measurement, specified as a scalar. The weight is the probability of getting a correct range measurement within the noise limits specified in MeasurementNoise property.

Maximum distance to find nearest obstacles, specified as a scalar in meters.


If you change your sensor model after using it with the monteCarloLocalization object, call release on that object beforehand. For example:

mcl = monteCarloLocalization; 
[isUpdated,pose,covariance] = mcl(ranges,angles); 
mcl.SensorModel.NumBeams = 120;
Introduced in R2019b