Skip to content

sssarana/lmdm

Repository files navigation

LiDAR Mirror Detection Model Development and Deployment on Low-resource Platform

LiDAR is widely used in robotics for mapping and obstacle avoidance, but reflective surfaces like mirrors can distort measurements and reduce reliability. To compensate, systems often rely on additional sensors and sensor fusion, which increases cost and computational load, especially on small robots. This project proposes using a lightweight machine-learning model to detect mirrors directly from LiDAR data, enabling more accurate maps while reducing the need for extra sensors and complex handcrafted algorithms.

Development process

You can view my report for this project in this repository:

Click here for PDF

This project was part of my university program and therefore required all development steps to be documented.

Hardware

  • LiDAR: RPLiDAR S2
  • Target platform: STM32F429 Discovery board

Note there is also a more general version, see in the section below

  • Development Host: Ubuntu 25.04 virtual machine on ARM64 chip (Apple M4 Max)

Training data

I colleted training data myself, from the objects and environments in my house. For two classes of data I used the following:

  • Class “normal” To collect normal data, I recorded scans when pointing the sensor at walls, hallways, furniture, people, open doorways, and areas with no mirrors in general. This was captured in several different rooms to avoid overfitting.
  • Class “mirror” To collect mirror data, I recorded scans when pointing the sensor at bathroom mirrors, wardrobe mirrors, glass mirror panels, small cosmetic mirror, window, and my reading glasses as they are also a reflective surface.

General Linux C++ version

Before deploying the model on STM32F429 discovery board, I deployed it in Linux virtual environment. This is a much simpler process and may be suitbale for those running this model on an embedded system that runs Linux (for example, RB3 Gen2). The library, ROS2 nodes, and collection script can be found on the Linux branch here.

Integration with mapping

The main use case for this model is integration of it with mapping algorithms, to obtain more accurate and defined map from LiDAR sensor only. Below you can see the difference between:

    

Raw LiDAR data map is shown on the left, while on the right we can see much more defined map because mirror filtering was used.

Once mirrors are detected, some kind of smoothing has to be applied based on the data obtained from LiDAR. In this example I use very simple way of filtering based on the data around distortion. You can implement a better algorithm. Integration with mapping is described in more detail in the PDF provided. Note that the mirror detection and filtering node for ROS2 is on this branch, since I was testing it on my host machine.

Future Work

Future work will include a few aspects. First of all, it would be better to modify the model such that for each beam (0-360) it is classified as faulty or normal. This can depend on the beams around it, distance, and other metrics. When all 360 values are classified, it will be possible to implement a better smoothing algorithm, so that values in the map are not distorted when the mirror is seen at all. Because this is slightly more complex, it is crucial to verify if such a model will run on platforms such as STM32F429. In addition, properly integrating such an ML model with mapping will aid the testing process and can be a great contribution to open source overall.

Contributions

Any contributions are welcome through pull requests. Please also raise any issues or questions via GitHub issues. Thank you!

About

LiDAR Mirror Detection Model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published