How Xiaomi’s Robot Vacuum Built a Map: Setup and Correct Errors

Modern models of Xiaomi’s robot vacuum cleaners and their sub-brands (e.g., Roborock, Viomi) have an intelligent navigation system that allows them to not just randomly rush around the apartment, but to build an accurate digital model of the room. This process, known as SLAM (simultaneous localization and mapping), requires the correct interaction of sensors, a gyroscope and a laser rangefinder (LiDAR).

Understanding how a navigation system works will help you avoid common mistakes, such as getting stuck in a robot or skipping entire rooms. In this article, we will look in detail at how a robot vacuum cleaner scans the space, what conditions are needed to create a stable map, and what to do if the device loses orientation.

Importantly, the construction algorithms may vary depending on the firmware installed and the specific sensor model. For example, gyroscope devices build a map more slowly and less accurately than laser scanner models. However, the basic principles of indoor preparation and the Mi Home application remain similar to the entire smart home ecosystem of the Chinese giant.

Principles of operation of laser navigation and gyroscope

The basis for precise positioning in top models is the laser rangefinder, or LiDAR. This rotating element on the top of the housing emits laser beams and measures the time they return from objects. This data builds a point cloud that the software converts into a two-dimensional plan. If your model does not have a turret at the top, then gyroscopic navigation is used, which relies on the wheel counter and the accelerometer, which often leads to an accumulation of errors.

The scanning process takes place in several stages. First, the robot explores the perimeter of the room, moving along the walls. Then it fills the interior space, laying parallel tracks. The critical point is that the robot must complete a full circle or a significant part of the route, so that the algorithm "closes" the map and realizes that it returned to the starting point. Without this stage, the map can break into several unrelated islands.

The visualization of the process is real-time in the app, you can watch the gray or white lines gradually fill the room, the system dynamically updates the position of the robot, adjusting its coordinates every turn, and if you use a model with a camera (visual navigation vSLAM), it additionally analyzes the textures of the ceiling and floor to be anchored to the terrain.

⚠️ Attention: LiDAR laser sensor is very sensitive to mechanical shocks, and if you drop a robot or hit its turret hard, the laser calibration can get lost, and the map will become curved or disappear altogether, which will require service calibration.

The stability of the card depends on the quality of the signal and the processor inside the device. When processing large amounts of data about the geometry of the room, the device can temporarily slow down, which is why older models with a weak processor can build the map longer or do it in less detail, skipping small objects like a chair leg.

Preparation of the premises before the first launch

The quality of the final map of the room depends 90% on how you prepared the space before the first launch. The robot has no human intelligence and can perceive black carpets as cliffs (due to the lack of reflection of infrared sensors), and shiny surfaces as transparent, so the initial cleaning should take place in ideal conditions.

You need to get the floor free of foreign objects as much as possible. The wires on the floor are the main enemy of navigation β€” they can get entangled in the brushes and move the robot off the trajectory, which will knock off the map construction. You also need to raise the curtains if they hang to the floor, because the robot may try to get under them and get stuck.

Lighting is a special consideration. Although the laser rangefinder works in the dark, visual sensors (if any) and drop sensors require at least minimal lighting. In total darkness, some models may behave incorrectly or refuse to start cleaning, considering conditions unsuitable for navigation.

β˜‘οΈ Preparations for first launch

Done: 0 / 4

Wet cleaning is recommended before the robot is first launched, and dust and small debris can distort the optical motion sensors that track the body relative to the surface, and clean flooring is the key to an accurate track.

Step-by-step instructions: creating and saving a map

The process of creating a map in the Mi Home or Roborock app looks standardized, but requires a sequence of actions. First, make sure that the robot is fully charged and stands on the base in the intended center of the apartment or in the corridor, from which there is access to all rooms. Launch from a deaf corner can lead to the fact that the robot will not be able to go out and explore the rest of the space.

Open the app and select Quiet Cleaning or Standard Mode, but be sure to make sure that the Mop function is turned off if you're building a map for the first time.This will allow the robot to move faster and not waste time returning to the base to wet the cloth. Press the "Build a map" button or simply start a full cleaning if there is no separate button.

During the process, don't interfere with the device. If the robot is stuck, gently release it and return it to the trajectory, but try not to carry it on your hands across the apartment, as this will knock down the gyroscope. Once you finish cleaning, the robot will automatically return to base and offer to save the map.

PhaseUser actionRobot reaction
StartInstallation to the base, launch through the applicationDeparture, perimeter scan.
Scanning.Control of the process (do not touch)Zigzag movement, contours construction
CompletionConfirmation of conservationBack to base, data fixation
EditingSeparation of rooms, setting of namesUpdating the navigation grid

Once saved, you'll be able to edit the map, divide rooms, merge zones, and assign names, so that in the future you can send a robot to clean only the kitchen or living room on a voice command or schedule.

πŸ“Š How often do you get a robot map knocked off?
Never, everything is perfect.
Once a month
After every cleaning.
Only when changing furniture
I don't have a robot.

Configuring virtual walls and forbidden areas

One of the key features of smart navigation is the ability to create virtual barriers. Unlike physical magnetic tapes that need to be glued to the floor, virtual walls are drawn with a finger on a smartphone screen, which allows you to flexibly control the robot's access to certain areas, such as an animal bowl or complex furniture.

There are two main types of constraints: the No-Go Zone and the Virtual Wall. The no-go zone is a square or rectangle where a robot won't even go on the edge. The virtual wall is a line that can't be crossed. The use of these tools is critical to protecting the robot's electronics from water if you have a flood in your home, or to protecting long-pile carpets that can wind on a brush.

To set up, go to map editing mode in the app. Select Zones or Walls. With precise finger movements, map the perimeter of the danger zone. The system automatically links these coordinates to the map you saved. If you decide to rearrange furniture, these areas can be easily removed or moved without any physical changes to the interior.

⚠️ Warning: Virtual walls only work if you have a saved card. If you reset the map or the robot loses orientation, all the restrictions will disappear and you will have to reconfigure them. Don't rely on them as the only barrier to dangerous items.

Some advanced models allow you to create invisible walls for the Mop mode, so that the robot does not come with a wet cloth on the carpets, this is implemented through the setting of scenarios where the wet cleaning mode activates a set of forbidden areas.

Typical problems and methods of their elimination

Despite the perfect algorithms, users often experience a situation where the map gets knocked down, splits up, or the robot starts to get lost. The most common reason is a change in the landscape.