Probabilistic Robotics
  • Introduction
  • Basics
    • Recursive State Estimation
      • Basic Concepts in Probability
      • Robot Environment Interaction
      • Bayes Filters
    • Gaussian Filters
      • Kalman Filter
      • Extended Kalman Filter
    • Nonparametric Filters
      • Histogram Filter
      • Particle Filter
    • Robot Perception
      • Beam Models of Range Finders
      • Likelihood Fields for Range Finders
  • Localization
    • Taxonomy of Localization Problems
    • Grid and Monte Carlo
      • Monte Carlo Localization
    • Markov and Gaussian
  • Projects
    • Mislocalization Heatmap
Powered by GitBook
On this page
  • Measurement Algorithm
  • 1. Correct range with local measurement noise
  • 2. Unexpected objects
  • 3. Failures
  • Beam Model Algorithm
  • Adjusting Parameters

Was this helpful?

  1. Basics
  2. Robot Perception

Beam Models of Range Finders

PreviousRobot PerceptionNextLikelihood Fields for Range Finders

Last updated 5 years ago

Was this helpful?

Ranger finders measure the range to nearby objects. Range may be measured along a beam, which is a good model of the workings of laser range finders, or within a cone, which is the preferable model of ultrasonic sensors.

Measurement Algorithm

Our model incorporates four types of measurement errors, all of which are essential to making this model work.

  1. Small measurement noise

  2. Errors due to unexpected objects

  3. Errors due to failures to detect objects

  4. Random unexplained noise

The desired model p(zt∣xt,m)p(z_t \mid x_t, m)p(zt​∣xt​,m)is a mixture of four densities, each of which corresponds to a particular type of error.

1. Correct range with local measurement noise

Let us use ztk∗z_t^{k*}ztk∗​ to denote the true range of the object measured by ztkz_t^{k}ztk​. In location-based maps, the true range can be determined using ray casting. In feature-based maps, it is usually obtained by searching for the closest feature within a measurement cone. The measurement noise is usually modeled by a Gaussian with mean ztk∗z_t^{k*}ztk∗​and standard deviation σhit\sigma_{hit}σhit​. We will denote the Gaussian by phitp_{hit}phit​.

The values measured by range sensor are limited to the interval [0,zmax][0, z_{max}][0,zmax​], where zmaxz_{max}zmax​ denotes the maximum sensor range. The measurement probability within the sensor range is given by the following.

phit(ztk∣xt,m)=η  N(ztk,mean=ztk∗,std=σhit2)p_{hit}(z_t^k \mid x_t, m) = \eta\; N(z_t^k, \text{mean}=z_t^{k*}, \text{std} = \sigma_{hit}^2)phit​(ztk​∣xt​,m)=ηN(ztk​,mean=ztk∗​,std=σhit2​)

For measurements outside of the sensor range, we can simply write,

The standard deviation is an intrinsic noise parameter of the measurement model. This varies from device to device.

2. Unexpected objects

Environments of mobile robots are dynamic, where as maps are static. As a result, objects not contained in the map can cause range finders to produce surprisingly short ranges. One way to deal with such objects is to treat them as part of the state vector and estimate their location. Another much simpler approach is to treat them as sensor noise. The object is that closer to the sensor is more likely to measure than the object that is further away. We can describe this situation with an exponential distribution.

Again, if the measurement is out of range, we can simply write,

If we take the integral and we will find the normalizer is given by the following.

3. Failures

4. Random measurements

Finally, range finders occasionally produce entirely unexplainable measurements. Keep things simple, we will use a uniform distribution spread over the entire sensor measurement range.

Beam Model Algorithm

The resulting density is a linear combination of the four different error density. The algorithm will be implemented as follows.

q = 1
for k = 1 to K:
    compute true_z[t][k] for measurement z[t][k] using ray casting
    p = z_hit * p_hit + z_short * p_short + z_max * p_max + z_rand * p_rand
    q = q * p

return q

Adjusting Parameters

We have a set of parameters, the four mixing parameters

and the other two parameters.

Our goal is to identify intrinsic parameters that maximize this likelihood.

until convergence:
    for i, z in Z:
        norm = p_hit(z) + p_short(z) + p_max(z) + p_rand(z)
        norm = 1/norm
        calculate true_z
        e_hit[i] = norm * p_hit(z)
        e_short[i] = norm * p_short(z)
        e_max[i] = norm * p_max(z)
        e_rand[i] = norm * p_rand(z)
    
    z_hit = norm(Z)^-1 * sum(e_hit)
    z_short = norm(Z)^-1 * sum(e_short)
    z_max = norm(Z)^-1 * sum(e_max)
    z_rand = norm(Z)^-1 * sum(e_rand)
    
    sigma = compute_sigma(e_hit, Z, true_Z)
    lambda = compute_lambda(e_short, Z)
phit(ztk∣xt,m)=0p_{hit}( z_t^k \mid x_t, m) = 0phit​(ztk​∣xt​,m)=0

The true value is calculated from xtx_txt​ and mmm via ray casting. The function NNN denotes the uni-variate normal distribution. The normalizer is evaluated to the following.

η−1=∫0zmaxN(ztk,mean=ztk∗,std=σhit2)  dztk\eta^{-1} = \int_0^{z_{max}} N(z_t^k, \text{mean} = z_t^{k*}, \text{std} = \sigma^2_{hit}) \; dz_t^k η−1=∫0zmax​​N(ztk​,mean=ztk∗​,std=σhit2​)dztk​
pshort(ztk∣xt,m)=η  λshorte−λshortztkp_{short}(z_t^k \mid x_t, m) = \eta \; \lambda_{short}e^{-\lambda_{short}z_t^k}pshort​(ztk​∣xt​,m)=ηλshort​e−λshort​ztk​
pshort(ztk∣x,m)=0p_{short}(z_t^k \mid x, m) = 0pshort​(ztk​∣x,m)=0
η=11−e−λshortztk∗\eta = \frac{1}{1 - e^{-\lambda_{short} z_t^{k*}}}η=1−e−λshort​ztk∗​1​

Sometimes, obstacles are missed altogether. A typical result of sensor failure is a max-range measurement. The sensor returns its maximum allowable value zmaxz_{max}zmax​ because there is material that absorbs laser light beams. We will model this failure with a point-mass distribution centered at zmaxz_{max}zmax​.

pmax(ztk∣xt,m)=1  if  z=zmaxp_{max}(z_t^k \mid x_t, m) = 1 \;\text{if}\; z = z_{max}pmax​(ztk​∣xt​,m)=1ifz=zmax​

Technically, pmaxp_{max}pmax​ does not possess a probability density function. It seems more like a Dirac-Delta function.

prand(ztk∣xt,m)=1zmaxp_{rand}(z_t^k \mid x_t, m) = \frac{1}{z_{max}}prand​(ztk​∣xt​,m)=zmax​1​

These four different distributions are now mixed by a weighted average, defined by the parameters zhitz_{hit}zhit​, zshortz_{short}zshort​, zmaxz_{max}zmax​, and zrandz_{rand}zrand​.

zhit+zshort+zmax+zrand=1z_{hit} + z_{short} + z_{max} + z_{rand} = 1zhit​+zshort​+zmax​+zrand​=1
p(ztk∣xt,m)=∣zhitzshortzmaxzrand∣−1∣phit(ztk∣xt,m)pshort(ztk∣xt,m)pmax(ztk∣xt,m)prand(ztk∣xt,m)∣p(z_t^k \mid x_t, m) = \begin{vmatrix} z_{hit} \\ z_{short} \\ z_{max} \\ z_{rand} \end{vmatrix}^{-1} \begin{vmatrix} p_{hit}(z_t^k \mid x_t, m) \\ p_{short}(z_t^k \mid x_t, m) \\ p_{max}(z_t^k \mid x_t, m) \\ p_{rand}(z_t^k \mid x_t, m) \end{vmatrix}p(ztk​∣xt​,m)=​zhit​zshort​zmax​zrand​​​−1​phit​(ztk​∣xt​,m)pshort​(ztk​∣xt​,m)pmax​(ztk​∣xt​,m)prand​(ztk​∣xt​,m)​​
{zhit,zshort,zmax,zrand}\{ z_{hit}, z_{short}, z_{max}, z_{rand} \}{zhit​,zshort​,zmax​,zrand​}
{σhit2,λshort}\{ \sigma_{hit}^2, \lambda_{short}\}{σhit2​,λshort​}

We will refer the whole set as Θ\ThetaΘ. We will learn these parameters from actual data. This is achieved by maximizing the likelihood of a reference data set Z={zi}Z = \{ z_i \}Z={zi​} with associated positions X={xi}X = \{ x_i \}X={xi​} and map mmm, where each ziz_izi​ is an actual measurement, xix_ixi​ is the pose at which the measurement was taken. The likelihood of data is given by the following.

p(Z∣X,m,Θ)p(Z \mid X, m, \Theta)p(Z∣X,m,Θ)

The σhit\sigma_{hit}σhit​ computation can be described as follows.

σhit=∑iei,hit(zi−zi∗)2∑iei,hit\sigma_{hit} = \sqrt{\frac {\sum_i e_{i, hit}(z_i - z_i^*)^2} {\sum_i e_{i, hit}} }σhit​=∑i​ei,hit​∑i​ei,hit​(zi​−zi∗​)2​​

The λshort\lambda_{short}λshort​ computation can be described as follows.

λshort=∑iei,short∑iei,shortzi\lambda_{short} = \frac{\sum_i e_{i, short}}{\sum_i e_{i, short} z_i}λshort​=∑i​ei,short​zi​∑i​ei,short​​