// OVERVIEW
About this project
A navigation system for an autonomous delivery robot. Plans optimized multi-stop routes using A* pathfinding, steers smoothly via Pure Pursuit control, and integrates with a WebSocket server and REST API to receive live orders, update delivery statuses, and log trajectory data — all visualized in a real-time animated simulation.
// FEATURES
Key features
A* Pathfinding
Finds the shortest route between each stop using the A* search algorithm with 8-directional movement, including diagonal paths for more natural navigation.
Pure Pursuit Steering
A real-time steering controller that picks a target point ahead on the path and smoothly drives toward it — the same approach used in real self-driving vehicles.
Multi-Stop Delivery Route
The robot autonomously completes a full delivery mission — Home to Restaurant, Drop-off, and back — handling multiple orders in sequence with automatic leg-by-leg replanning.
WebSocket Server
A real-time WebSocket server that accepts navigation commands, quick routes, and status requests — enabling a frontend or mobile app to control the robot remotely.
REST API Integration
Pulls live orders from a Base44 app API, updates order statuses (pending → in_transit → delivered) at each stop, and posts full trajectory data after each delivery.
GPS-to-Grid Projection
Converts real-world GPS coordinates (lat/lon) to grid cells using a local reference origin, enabling the simulator to work with actual delivery addresses.
Live Animated Simulation
A real-time Matplotlib visualization showing the planned path, robot trajectory, labeled restaurant and drop-off markers, a meter-scale overlay, progress bars, and a name tag following the robot.
Bluetooth Support
Optional serial Bluetooth link to send velocity and steering commands to physical hardware, bridging the simulation to a real robot.
// ROADMAP
Development roadmap
- DONEGrid World & Environment Setup
- DONEA* Pathfinding Engine
- DONEPath Densification & Smoothing
- DONEPure Pursuit Steering Controller
- DONEMulti-Leg Route Planning
- DONEStop Detection & Dwell Timer
- DONEZone Enter/Leave Logging
- DONEReal-Time Matplotlib Animation
- DONEWebSocket Server for Remote Control
- DONEREST API Order Management
- DONEGPS-to-Grid Coordinate Projection
- DONEBluetooth Hardware Bridge
- DONEPer-Order Trajectory Tracking & Upload
// CHALLENGES
Challenges and solutions
Smooth Steering at Stops
PROBLEM
The robot would overshoot or oscillate around destination points instead of cleanly arriving and stopping.
SOLUTION
Implemented a two-speed system — full speed while cruising and a slower approach speed within a close radius — combined with direct aiming at the exact stop coordinates instead of the path's lookahead point.
Natural-Looking Movement
PROBLEM
Following raw A* grid paths produced sharp, robotic-looking turns at every cell boundary.
SOLUTION
Added path densification that interpolates extra waypoints between grid cells, combined with the Pure Pursuit algorithm's curved steering, resulting in smooth and natural motion.
Real-World Coordinate Mapping
PROBLEM
The simulation works in grid cells, but real delivery addresses come as GPS lat/lon coordinates.
SOLUTION
Built a GeoProjector class that uses a local origin point and meters-per-degree calculations to convert GPS coordinates to grid cells, allowing the simulator to work with actual addresses.