Skip to main content

Autonomous Maze Navigator

Engineering a Python-based control system for autonomous robots in dynamic environments.

  • Python
  • LEGO EV3Dev
  • MQTT
  • Git
EV3 Linux
Platform
100% Passed
Final Exam

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 Approach

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.

The Impact

The robot successfully passed the final examination under tight time pressure, correctly receiving the server's payload, mapping the maze, and navigating to the destination without error or memory leaks.

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 Engineering 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 Lifecycle

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.