Navigator Test Suite — pytest
<!--
Work info
-->
Client:
Personal Project
Role:
Robotics Test
Year:
2026
Project Overview
A standalone pytest test suite for the LiDAR reactive navigator state machine deployed on
Raspberry Pi 5. Tests run on any machine without ROS2 installation on physical robot —
ROS2 dependencies are fully mocked using Python's unit test.mock framework.
Our Approach
The navigator logic was extracted into a pure Python NavigatorLogic class that mirrors
the deployed state machine exactly. Tests are structured with pytest fixtures for clean
state isolation, parameterised scenarios for boundary conditions, and clear docstrings
explaining what each test validates and why.
Key Features
19 test cases across 6 test classes
TestAlignState — heading threshold transitions
TestObstacleDetection — 0.55m front, 0.40m diagonal threshold validation
TestEmergencyStop — velocity zeroing
TestGoalReaching — goal priority logic
TestWallRecovery — obstacle clearance
TestBackupState — reverse velocity validation
Runs in CI without ROS2 or hardware







