Lab 3 — LiDAR / ToF Distance Sensing¶
Practical focus¶
Mount the distance sensor; measure known distances; determine useful range and field of view; implement basic obstacle detection.
Class 1 laser product
The scanners are Class 1 and safe in normal use. Do not open a housing or run a unit with a cracked case — report it instead.
Objectives¶
- Mount a distance sensor rigidly to the chassis.
- Calibrate readings against known distances.
- Determine the sensor's useful range and field of view experimentally.
- Write a dependable
obstacleDetected()function.
Procedure outline¶
TODO — expand.
- Mount the sensor. Height and tilt matter more than students expect — a sensor aimed slightly down will see the floor as an obstacle.
-
Place a target at known distances and record readings.
True distance Reading 1 Reading 2 Reading 3 Mean Error 10 cm 25 cm 50 cm 100 cm 200 cm -
Find the near limit and far limit where readings become unreliable.
- Sweep a target sideways to map the field of view.
- Implement and test
obstacleDetected().
Make the threshold a named constant
You will change this value in Labs 5, 9, and 10. Give it one home now.Deliverable¶
Reliable obstacleDetected() function + sensor test data.
Include the distance and field-of-view tables, and state the range over which you trust the sensor.