## 3 Sensor Selection
### Indoor and Outdoor Fixed Distance Tests  
To determine the compatibility of the sensors with our project's specific needs, we executed a comprehensive set of tests. Our benchmarks necessitated the precise measurement of distances up to 3 m in outdoor daylight and the capability to detect high-speed vehicular movements. Table 4 delineates a comparative analysis of various sensors tested, all of which exhibit notable accuracy in detecting vehicles within a maximum distance of 3 m. Despite their evident precision and sufficiently high frequency to execute the task, it is crucial to note that the performance of laser and LiDAR sensors may be compromised under daylight conditions. We tested each sensor at fixed intervals of 0.5 m, spanning a range from 0 to 5 m. These tests took place in both internal and external environments to assess sensor performance under varying conditions. At every interval, around 500 distance data points were gathered. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **JRT BB2X Laser** & **LiDAR** & **A02 YUW (DFRobot,** **Shenzhen, China)** \\ \hline Sensor type & Laser & Laser & LiDAR & Ultrasonic \\ Max. range & 5 m & 100 m & 10 m & 4.5 m \\ Frequency & 10 Hz & 10–20 Hz & 200 Hz & 10 Hz \\ \multirow{2}{*}{Accuracy} & \(\pm 1\) cm short/medium distance & \(\pm 3\) mm & \(\pm 2\) cm to 4 m & \(\pm 1\) cm \\  & \(\pm 1.5\) cm long distance & & \(\pm 5\) cm to 10 m & \\ \cline{1-1} Affected by light & Yes & Yes & Yes & No \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparative specifications of select distance sensors tested. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **LiDAR** & **Laser** & **Ultrasonic** \\ \hline Working principle & Uses laser beams to measure distances & Uses a laser beam to measure distance & Uses sound waves to measure \\  & & based on reflection & distances based on echo timing \\ \hline Range & Typically 100–300 m, but can go up to & Shorter, often less than 100 m & Typically 2–5 m, though specialized \\  & 1 km for some models & & models can go further \\ \hline Accuracy & \(\pm 2\) cm to \(\pm 10\) cm depending on & \(\pm 1\) mm to \(\pm 5\) mm & \(\pm 1\) cm for close range but can vary \\  & model and conditions & \(\pm 1\) mm to \(\pm 5\) mm & based on conditions \\ \hline Resolution & Fine; can be sub-cm in some models & Fine, often sub-mm & Coarser, often in the cm range \\ \hline Pros & High resolution, long-range, works in various lighting conditions & High precision, works in many lighting conditions & Simple, cheap, works in the dark and through many materials \\ \hline Cons & Expensive, can be affected by & Range limited, can be affected by & Affected by sound-absorbent \\  & atmospheric conditions and reflective surfaces & reflective surfaces or ambient light & materials, less accurate at longer \\  & & & distances \\ \hline \hline \end{tabular}
\end{table} 
Table 3: General comparison between different types of sensors. The sensors were either operated using their default software or integrated with a Raspberry Pi for control. The graphs and tables presented in the findings utilize various visual elements to depict sensor performance. Solid dots on each graph represent the average distance recorded by the sensor at specified intervals, while red bars indicate standard deviations. Focusing initially on the WaveShare TOF sensor (Figure 1 and Table 5), it demonstrated reliable performance up to 4.5 m in indoor settings. However, a noticeable decline in accuracy and consistency was observed outdoors, where the standard deviation surged from 0.34 m at a distance of 2.5 m to 1.22 m at 5.0 m.  
In contrast, both the JRT BB2X Laser and LiDAR Lite V4 sensors maintained accuracy across all tested environments.