Mobile Robot Localisation and Navigation Using LEGO NXT and Ultrasonic Sensor

Yanan Liu, Bin Yu, Rui Fan, Ming Liu, Mohammud Junaid Bocus, Hepeng Ni, Jiahe Fan, Shixin Mao

Abstract

This paper presents a low-cost approach to mobile robot autonomy using a LEGO NXT kit and a single ultrasonic sensor. By implementing custom data-processing techniques to clean noisy sensor readings and combining a particle filter with a sampling-based path planner, the researchers achieved localization accuracy within 1–3 cm in indoor environments. The study demonstrates that high-fidelity navigation is possible without expensive LiDAR or depth cameras.

Introduction

High-fidelity autonomous navigation typically relies on expensive sensors, which can be prohibitive for hobbyists and low-budget applications. While the LEGO MINDSTORMS NXT platform offers an affordable alternative, its ultrasonic sensor is notoriously difficult to use for precise tasks due to wide-cone sound wave emission, multi-path reflections, and signal distortions. This research addresses the challenge of extracting reliable positioning data from these high-noise sensors to enable precise navigation.

System Architecture and Methodology

The developed system bridges MATLAB with LEGO hardware via the RWTH Mindstorms NXT Toolbox. The architecture is divided into three primary modules: data acquisition/processing, localization, and navigation.

System architecture showing the flow from sensor data and map input to target position.

Smart Data Processing

To overcome the limitations of raw ultrasonic data, the system performs an "Ultrascan." It identifies the minimum distance—typically representing the perpendicular wall—and filters the data to retain only readings within a ±15° range of the cardinal directions (0°, 90°, 180°, and 270°). This "less is more" approach significantly reduces errors caused by the ultrasonic beam's wide opening angle.

Particle Filter Localisation

Localization is handled by a particle filter that estimates the robot's position $(x, y, \theta)$. The filter distributes "virtual" robots across a digital map and compares their simulated sensor readings to the actual filtered data. Through an iterative Bayesian "survival of the fittest" process, the particles converge on the robot's most likely real-world location.

Sampling-Based Path Planning

The authors proposed a sampling-based method that randomly distributes waypoints in the configuration space and connects them with straight lines. This approach prioritizes minimizing the number of turns over finding the mathematically shortest path, which is critical for low-cost motors that accumulate mechanical error during rotation.

Experimental Results

The system was evaluated using simulated environments and a physical arena made of cardboard.

Localization visualization (left) showing particles converging on the map, and the corresponding filtered ultrasonic scan (right).

Key results include:

  • High Accuracy: Average distance error from the target was between 1.79 cm and 2.11 cm in simulations.
  • Efficiency: Navigation tasks were completed in 15 to 23 seconds with zero collisions.
  • Real-World Validation: Physical experiments mirrored simulation results, proving the effectiveness of the data-processing method against real-world acoustic noise.

Conclusion

The study successfully demonstrates that a single, noisy ultrasonic sensor can provide sufficient data for precise localization and navigation when paired with robust filtering and probabilistic algorithms. Future work will focus on increasing robustness in cluttered or dynamic environments and improving re-localization features.

Summary updated

BibTeX
@inproceedings{liu2018mobile,
  author = {Yanan Liu and Bin Yu and Rui Fan and Ming Liu and Mohammud Junaid Bocus and Hepeng Ni and Jiahe Fan and Shixin Mao},
  title = {{Mobile Robot Localisation and Navigation Using LEGO NXT and Ultrasonic Sensor}},
  booktitle = {ROBIO},
  year = {2018},
  url = {https://openreview.net/forum?id=gQuTWn1tAZy},
}
Figure