Skip to content

Latest commit

 

History

History
170 lines (128 loc) · 10.2 KB

File metadata and controls

170 lines (128 loc) · 10.2 KB

Project 2: Localization

CS6963: Algorithmic Foundations of Robotics, 2025 Fall, University of Utah

  • Name: Seongil Heo
  • UID: u1527760
  • Date: September 27th, 2025

Note:

In this writeup, figures from the questions are cited as Figure #, while figures from my experiments are cited as Figure #.

1. In the motion model plot, why are there more particles within a 10cm radius of the noise-free model prediction in Figure 2 than Figure 3?

Answer

In Figure 3, $v$, $\delta$, and $dt$ are all relatively larger than in Figure 2. Therefore, in Figure 2, the small heading error and short travel time prevent the error from accumulating significantly. In contrast, Figure 3 has a higher speed, a larger steering angle, and a longer travel time, so the error continues to accumulate. As a result, in Figure 2, more particles are located within 10 cm of the noise-free model prediction point compared with Figure 3.

2. Include mm1.png, mm2.png, and mm3.png, your three intermediate motion model plots for control $(v,\delta, dt) = (3.0, 0.4, 0.5)$. Use them to explain your motion model parameter tuning process. For each plot, explain how it differs from Figure 3, and how you changed the parameters in response to those differences. The last plot should reflect your final tuned parameters.

Answer


Figure 1: mm1.png (vel_std=0.05, delta_std=0.5, x_std=0.05, y_std=0.05, theta_std=0.05).

Figure 1 shows the spread of particles generated using the initial parameters provided by the assignment. Except for the delta_std, they have low standard deviations. The large delta_std introduces excessive steering angle noise, causing the distribution to become too curved and diffuse. This shows a difference that is too large to be compared with Figure 3. To correct this, delta_std was reduced from 0.5 to 0.05 in the next step.



Figure 2: mm2.png (vel_std=0.05, delta_std=0.05, x_std=0.05, y_std=0.05, theta_std=0.05).

After decreasing delta_std, the particles converged more closely around the noise-free model prediction. This reduction in the steering angle noise allowed the particles to track the mean trajectory more closely. However, the distribution does not reproduce the banana-shaped distribution seen in Figure 3. To achieve this, the particles need to stay tight in both horizontal and vertical directions around the noise-free state, while covering a wider portion of the curved. Therefore, in the next step, x_std, y_std and theta_std were reduced, and delta_std was slightly increased.



Figure 3: mm3.png (vel_std=0.05, delta_std=0.07, x_std=0.01, y_std=0.01, theta_std=0.03).

Finally, in Figure 3, the particles are tightly clustered around the noise-free model prediction while still covering a wide area along the curved path. This was achieved by slightly increasing delta_std to 0.07 to allow for more steering angle variability, while significantly reducing x_std, y_std, and theta_std to 0.01, 0.01, and 0.03 respectively. This tuning process resulted in a distribution that closely resembles the desired banana-shape seen in Figure 3.

3. What are the drawbacks of the sensor model’s conditional independence assumption? How does this implementation mitigate those drawbacks? (Hint: we discussed this in class, but you can look at LaserScanSensorModelROS for the details.)

Answer

Drawbacks of the conditional independence assumption:

  • Overconfident likelihood estimates:
    The assumption treats each laser beam as independent, which counts more independent pieces of evidence. This leads to overly sharp likelihood distributions and overconfident estimates.

  • Uncertainty underestimation:
    By ignoring correlations between neighboring beams, the model can both underestimate the true uncertainty in the environment and fail to accurately represent real sensor behavior. Adjacent beams are often affected similarly by noise or obstacles. For example, small map errors or environmental factors such as dust and fog can simultaneously affect multiple neighboring beams, producing correlated measurement errors.

  • Outlier sensitivity:
    Under the assumption, the likelihood is computed as a product of per-beam probabilities. As a result, a single beam with a very low probability can drive the entire likelihood close to zero, even if all other beams match well. This makes the model overly sensitive to outliers and may cause good particles to receive near-zero weight.

Implementation to mitigate these drawbacks:

  • Beam subsampling:
    In the downsample() function, laser beams are selected at fixed intervals using laser_ray_step. This controls the density of beams, thereby mitigating the effect of correlations between adjacent beams.

  • Ray filtering:
    In the downsample() function, rays are filtered or replaced depending on exclude_max_range_rays to remove invalid or extreme readings. This reduces the influence of outliers and ensures that the likelihood computation is based on more reliable measurements.

  • Weights squashing:
    In the apply_sensor_model() function, after computing the weights based on the sensor model, the weights are squashed using np.power(). This reduces the peakiness of the weight distribution, making it less sensitive to individual outlier beams and reducing overconfidence in the likelihood estimates.

  • Weights normalization:
    In the lidar_callback() function, after applying the sensor model, the weights are normalized to ensure they sum to 1. This ensures numerical stability and valid probability distribution.

  • Precomputed mixed Sensor Model:
    SingleBeamSensorModel.precompute_sensor_model() generates and normalizes the likelihood table that mixes z_hit, z_short, z_max, and z_rand. This ensures that per-beam likelihoods are normalized and physically plausible. By tuning the parameters appropriately, the model better approximates real sensor behavior, partially compensating for the independence assumption.

4. Include sm1.png, sm2.png, and sm3.png, your three intermediate conditional probability plots for $P(z_t^k \mid z_t^{k*})$. Document the sensor model parameters for each plot and explain the visual differences between them.

Answer

In the explanation below, (a) shows the sensor model probability distribution, and (b) and (c) show the likelihoods of the laser sensor measurements for the robot’s state at (4.25, 5.50, 0) and (9, 9, 0), respectively, on the shapes_world_small map.


(a)

(b)

(c)
Figure 4: sm1.png (hit_std: 1.0, z_hit: 0.5, z_short: 0.05, z_max: 0.05, z_rand: 0.5).

Figure 4 shows the initial sensor model parameters provided by the codebase. Comparing the staff solution’s Figure 4 and Figure 5 with Figure 4 (b) and (c), the yellow points appear more widely spread. Moreover, because this is a simulator with no unexpected moving obstacles, the effects of z_short and z_max are minimal. To match this, hit_std was increased from 1.0 to 2.0 to make the distribution slightly broader. z_short and z_max were reduced from 0.05 to 0.01.



(a)

(b)

(c)
Figure 5: sm2.png (hit_std: 2.0, z_hit: 0.5, z_short: 0.01, z_max: 0.01, z_rand: 0.5).

Comparing Figure 4 and Figure 5, in (a), the effects of z_short and z_max have been reduced, resulting in a higher probability distribution concentrated around $z_t^{k*}$, and the variance of the Gaussian distribution has increased. In (b), the faint yellow pixels that were previously present on the rectangular shape have disappeared, indicating a more confident prediction. In (c), the yellow marks have become wider, with a reduced vertical spread.

In RViz, rays occasionally appear at random locations, though their frequency is low. When compared to the staff solution's results, the distribution is more spread out, with a higher likelihood around the hits. Therefore, z_hit was increased from 0.5 to 0.8, z_rand was slightly decreased from 0.5 to 0.25, and hit_std was increased from 2.0 to 2.5.



(a)

(b)

(c)
Figure 6: sm3.png (hit_std: 2.5, z_hit: 0.8, z_short: 0.01, z_max: 0.01, z_rand: 0.25).

Comparing Figure 5 and Figure 6, in (a), the overall distribution appears similar, but the maximum value along the y-axis has increased, indicating a stronger influence of z_hit. In (b) and (c), the yellow points are more concentrated and appear brighter, and due to the increased variance, the yellow regions cover a wider area.

Overall, the results in Figure 6 are very similar to those of the staff solution.

5. Include your tuned sensor model likelihood plot for the robot positioned at state $(-9.6,0.0, -2.5)$ in the maze_0 map.

Answer


Figure 7: maze_0.png (hit_std: 2.5, z_hit: 0.8, z_short: 0.01, z_max: 0.01, z_rand: 0.25).