
Autonomous Maze Navigator
Engineering a Python-based control system for autonomous robots in dynamic environments.
Overview
Participated in the "Robolab" systems engineering challenge. My team developed a Python control stack for an EV3 rover designed to navigate unknown mazes autonomously. The system features a custom state machine for decision making, PID controllers for precise line following, and MQTT communication for real-time telemetry. We successfully implemented graph-based pathfinding to optimize exploration and retrieval tasks.
Tech Stack
The Challenge
The challenge was to program a robot to explore a randomly generated maze until it received a specific destination coordinate from a central server. The robot then had to navigate to this server-assigned target efficiently while adhering to strict memory and timing constraints.
The Solution
We engineered a modular Python codebase centered around a finite state machine. We implemented a robust communication layer that handled MQTT messages to parse the target coordinates. We used a mapping algorithm (DFS) to explore the maze and a pathfinding algorithm to calculate the route to the server's target once received.
System Architecture
The software runs on the ev3dev Linux kernel. It utilizes a main event loop that polls sensors (color, distance, gyro) and feeds data into a central logic controller. An asynchronous MQTT client handles the negotiation with the server to receive the "Target" payload.
Key Features
Server-Guided Navigation
Logic to request, parse, and validate target coordinates received from the central server via MQTT.
PID Control Loop
Implemented Proportional-Integral-Derivative logic for smooth line tracing and wall alignment.
State Machine Architecture
Robust logic handling for switching between "Exploration Mode" and "Target Navigation Mode".
Pathfinding
Algorithms to map the maze structure in memory and calculate the shortest path to the assigned goal.
Development Timeline
Sensor & Comms Setup
Calibrated sensors and established the MQTT handshake with the game server.
Algorithm Development
Implemented the exploration logic and the target-parsing state.
Optimization
Refined the pathfinding to handle the server-assigned targets faster.
Final Examination
Robot successfully received the target from the server and navigated to the destination.