An autonomous, holonomic mobile robot engineered for real-time environment navigation, dynamic obstacle avoidance, optical flame localization, and target extinguishing. Developed as part of the MECHENG 706 (Mechatronics Systems) curriculum at the University of Auckland.
Developers:
- Abhijot Malhi — @tabyrocket
- Wayne Liang — @catxna
Achievement: This robot was the only entry in the cohort to achieve a 100% score across all benchmark evaluation runs, demonstrating complete reliability in flame detection speed, navigation accuracy, obstacle clearance, and target extinguishing.
Click to view the full autonomous run video: figures/RobotTestRun.mp4
graph TD
S1[State 1: Initialisation & Calibration] --> S2[State 2: 360° & Swept Flame Search]
S2 --> S3[State 3: MIMO Fuzzy Navigation & Flame Tracking]
S3 -->|Obstacle Trap / Wheel Stall| S6[State 6: IMU Stall Recovery & Escape]
S6 --> S3
S3 -->|Target Acquired & In Range| S4[State 4: Closed-Loop Aim & Extinguish]
S4 -->|Flame Verified Extinguished| S5[State 5: Safe Disengage & Reverse]
S5 -->|Fires Remaining > 0| S1
S4 -->|All Targets Extinguished| END[Mission Complete / Standby]
The chassis utilizes a 4-wheel omnidirectional configuration to achieve unconstrained 3-DOF planar motion (independent translation in
-
Inverse Kinematics Formulation:
Parameters: Wheel radius
$R_w = 30,\text{mm}$ , half-wheelbase length$L = 105,\text{mm}$ , half-track width$l = 90,\text{mm}$ . -
Decoupled Kinematics (
moveDirectionCapX): Preserves prioritized lateral avoidance ($y$ ) and angular correction ($\omega$ ) by dynamically recalculating forward velocity headrooms within$[\pm 500]$ motor PWM bounds. -
Dynamic Drift Compensation & Deadband Handling: Closed-loop non-linear friction break-away thresholds (
$\ge 85,\text{PWM}$ ) and heading cross-coupling compensators ensure straight-line fidelity.
Reactive obstacle avoidance and path planning are governed by a C++ fuzzy inference system (FuzzyLogic) calculating exact analytical centroids.
-
Fuzzification: 5 input linguistic variables across 17 membership sets:
- Ultrasonic Front Distance (
$Z, S, \text{Triangular}$ ) - Left / Right Short-Range IR (
$Z, S, \text{Triangular}$ ) - Front-Left / Front-Right Long-Range IR (
$Z, S, \text{Triangular}$ ) - Gyro Heading Error & Phototransistor Differential Corrections
- Ultrasonic Front Distance (
-
Analytical Defuzzification: Real-time geometric centroid computation
$\left(\frac{\sum u_i \cdot A_i}{\sum A_i}\right)$ evaluating exact trapezoid/triangle integration without discrete numerical lookup tables. - Rule Aggregation: Smoothly balances aggressive lateral wall bypassing against continuous optical flame attraction.
-
BNO08x 9-DOF Intelligent IMU: Tracks continuous 3D game rotation vectors (
SH2_GAME_ROTATION_VECTOR) with quaternion-to-Euler yaw extraction and phase unwrapping for drift-free heading reference. -
4-Channel Infrared Rangefinder Array: Combines analog GP2Y0A21YK0F and GP2Y0A41SK0F sensors calibrated with power-law voltage-to-distance transforms:
$$\text{Distance} = C \cdot V^{\gamma} - d_{\text{shift}}$$ - Phototransistor Target Array: 4-channel analog optical detector array configured for flame triangulation and differential tracking.
-
First-Order Recursive Low-Pass Filtering:
$$y_k = y_{k-1} + K \cdot (x_k - y_{k-1}), \quad K = \frac{P}{P + Q}$$ Mitigates noise and ambient light flicker across all high-speed telemetry channels.
The autonomous executive loop (FSM) provides deterministic state handling with built-in fault tolerance:
| State | Name | Functional Description |
|---|---|---|
| 1 | Initialisation | Sensor zeroing, digital filter seeding, and IMU baseline gyro calibration. |
| 2 | Search | Bidirectional |
| 3 | Move / Track | Fuses MIMO fuzzy avoidance with differential flame heading vectors. Includes a persistent lateral wall-bypass latch for escaping concavities. |
| 4 | Extinguish | Motion-locks the drive base, performs closed-loop pan servo alignment, conducts safety proximity confirmation, and activates the high-flow fan until optical feedback confirms extinction ( |
| 5 | Reverse | Controlled recoil and sensor re-sampling maneuver prior to searching for secondary targets. |
| 6 | Stall Recovery | Detects stationary IMU yaw patterns during commanded turns/translations; executes multi-axis un-wedging sequences (lateral strafe + reverse). |
| Subsystem | Component | Interface / Pin Mapping |
|---|---|---|
| MCU | Arduino Mega 2560 (ATmega2560) | Main On-Board Controller |
| Drive Motors | 4x Continuous DC Geared Motors | Pins 46 (FL), 51 (FR), 47 (RL), 50 (RR) |
| Extinguisher | High-RPM Centrifugal Fan + Servo Mount | Fan Pin 45 (PWM/Digital), Servo Pin 9 |
| IMU | BNO080 / BNO085 9-DOF Sensor | I2C (SDA / SCL, 100 Hz SH2 Reports) |
| Ranging (Sonar) | HC-SR04 Ultrasonic Sensor | Trigger: 48, Echo: 49 |
| Ranging (IR) | 4x Sharp Distance Sensors (Long/Short) | Pins A8 (FL), A9 (L), A10 (R), A11 (FR) |
| Optical Sensors | 4x Phototransistor Array | Pins A2 (Far-L), A3 (Mid-L), A6 (Mid-R), A5 (Far-R) |
| Diagnostics | RGB Status Indicator + Bluetooth UART | LEDs Pin 13 / Pin 12 / Pin 11, Serial Bluetooth |
├── fire-extinguishing-robot.ino # Main embedded setup and loop entry point
├── figures/ # Demonstration videos, photos, and performance plots
│ ├── RobotMainView.jpg # Isometric front photograph
│ ├── RobotBackView.jpg # Rear subsystem photograph
│ ├── RobotTestRun.mp4 # 100% benchmark evaluation run recording
│ └── fuzzy_membership_*.png # Generated fuzzy logic membership curves
└── src/
├── Actuators/ # Actuator drivers (Motors, Fan, FanServo)
├── Sensors/ # Sensor abstractions (BNO08x Gyro, IR, Sonar, Phototransistors)
├── Robot/
│ ├── Control/ # Kinematics, trajectory generation, and aiming routines
│ │ └── Fuzzy/ # Analytical MIMO Fuzzy Logic Inference Engine
│ ├── FSM/ # 6-State Autonomous Finite State Machine & Stall Watchdog
│ └── Robot.cpp # Hardware aggregation layer
└── Misc/ # Fast math helpers, digital filters, and telemetry tools
- Prerequisites:
- Arduino IDE or PlatformIO / Arduino-CLI
- Target Board: Arduino Mega 2560
- Libraries:
Adafruit BNO08x,Wire,Servo
- Compile and Upload:
# Using Arduino CLI: arduino-cli compile --fqbn arduino:avr:mega fire-extinguishing-robot.ino arduino-cli upload -p <PORT> --fqbn arduino:avr:mega fire-extinguishing-robot.ino
- Telemetry & Calibration:
Open the Bluetooth/Serial terminal at
115200 baudto view real-time state machine transitions, filtered IR/Sonar readings, and PID/Fuzzy output telemetry.
- Course: MECHENG 706 (Mechatronics Systems), Department of Mechanical & Mechatronics Engineering, The University of Auckland.
- Outcome: 100% Benchmark Completion Rate across all obstacle configurations and flame placement variations.
- Key Differentiator: The combination of true holonomic kinematics, custom continuous centroid fuzzy logic, and real-time optical closed-loop extinguishing eliminated blind spots and prevented deadlocks common in conventional differential-drive solutions.


