Skip to main content
Module 5 · Dijkstra's Algorithm

Lesson 7 · Obstacle Detection with the Rangefinder — Knowledge Checks

Name Date
  1. How does an ultrasonic rangefinder measure distance?

    1. A.It uses a camera to estimate size
    2. B.It sends a sound pulse and times how long the echo takes to return
    3. C.It counts wheel rotations
    4. D.It reads a GPS signal

    Answer Why?

  2. Why use a threshold instead of checking for an exact distance?

    1. A.Exact distances are illegal
    2. B.Sensor readings vary slightly (noise), so a cutoff is more reliable than an exact match
    3. C.To make the robot slower
    4. D.Thresholds use less memory

    Answer Why?

  3. The robot is at (2,1) facing NORTH and the rangefinder reads 8 cm (threshold 15). Which node is blocked?

    1. A.(2,1) — where the robot is
    2. B.(1,1) — the node directly ahead (north is row − 1)
    3. C.(3,1)
    4. D.(2,2)

    Answer Why?

  4. When the robot detects a new obstacle, what does it do to reroute?

    1. A.Stops permanently
    2. B.Creates a fresh Dijkstra with the updated blocked list and current position, then recomputes the path
    3. C.Reverses back to the start
    4. D.Ignores it and drives through

    Answer Why?

  5. Why test with a simulated rangefinder before using the real one?

    1. A.The real sensor never works
    2. B.To verify the detect-update-recompute logic in software first, separating code bugs from hardware bugs
    3. C.Simulation is required by Python
    4. D.To avoid writing the loop

    Answer Why?