how do robots map indoor environments

How Robots Build Maps of Indoor Spaces

Phase What happens Planning use
Explore The robot moves through the space while a range sensor such as lidar streams data, often as a point cloud or a laser scan derived from it. Decide which areas the map must cover and which sensor feeds it before the first run.
Build A SLAM algorithm estimates the robot’s position and extends the map at the same time. Check that the environment has enough distinctive features for the robot to localize.
Save The map is exported as a YAML parameters file with an image saved in the same directory. Keep both files together, because the YAML file describes the image.
Reuse Navigation loads the saved map, which Nav2 consumes on the /map topic as an occupancy grid message. Set or correct the robot’s starting pose before sending goals.
Extend Rooms and objects can be added as labels, or the map can be reduced to a graph of places. Add semantic or topological layers only when the task needs more than free and blocked space.

The phases above follow the Isaac Sim Nav2 tutorial and the IntechOpen chapter on indoor robot navigation.

How do robots map indoor environments? They drive through a space while a range sensor such as lidar feeds a SLAM algorithm, which builds a map, saves it to files, and loads it again for navigation.

Mapping is one capability within indoor autonomous robots, and it depends heavily on the sensors used in indoor autonomous robots. The sections below follow a mapping project from first run to reuse.

Exploring the space

A mapping run starts with data collection. The robot has to travel through every area the finished map should include, because it can only record what its sensors have seen.

The textbook framing of navigation explains why the map matters. According to the IntechOpen chapter, navigation is traditionally split into three questions: localization, path planning and trajectory execution. A map supplies the answers to “Where am I?” and “Where are other places related to me?” that the first two depend on.

On the sensing side, the Nav2 sample setup in the Isaac Sim tutorial lists a point cloud topic (/point_cloud, sensor_msgs/PointCloud) and a laser scan topic (/scan, sensor_msgs/LaserScan). The sample Carter robot uses an RTX lidar by default.

  1. Choose the coverage. List the rooms and corridors the robot must navigate later.
  2. Confirm the sensor stream. Check that the point cloud or scan topic is publishing before moving the robot.
  3. Drive the route. Move the robot through each area so the mapping software receives data from all of them.

Building the map with SLAM

SLAM, short for simultaneous localization and mapping, is the best-known algorithm for building metric maps, according to the IntechOpen chapter. It solves a circular problem: the robot needs a map to know where it is, and needs to know where it is to extend the map.

Two conditions shape the quality of the result. The first is the sensor’s height. In the Isaac Sim tutorial, the occupancy map’s upper Z bound is set to 0.62 m to match the vertical position of the lidar. A flat map therefore represents a slice of the building at the sensor’s height, not everything in it.

The second is how recognizable the places are. The same chapter notes that the same place may look different, or different places may look similar. That ambiguity is the main reason robot-built maps can contain errors, and it is why accuracy depends on the environment more than on any single figure.

Choosing a map type

The IntechOpen chapter describes three main ways to represent an environment for indoor navigation: geometric, topological and semantic. They answer different questions, so the choice depends on what the robot has to do with the map.

Map type What it stores Planning use
Occupancy grid (geometric) A grid of points covering the environment. Geometric representation is the closest to the sensor and actuator world. The default for local navigation and path planning on a single floor.
Point cloud (geometric) Range returns from a lidar, passed to Nav2 as a point cloud message. Use when the robot needs spatial detail beyond one scan height.
Topological map A graph that models places and the connections between them. Suits large navigation tasks where a full metric map becomes expensive.
Semantic map Rooms classified by abstract data such as their utility, plus the objects they contain. Use when goals are phrased as places or things, not coordinates.

The descriptions come from the IntechOpen chapter, and the point cloud topic comes from the Isaac Sim tutorial.

For most indoor wheeled robots, the occupancy grid is where to start. The grid itself, including how its cells are valued, is covered in a separate explainer: what is an occupancy grid map.

Saving the map

A saved map is a small set of files. In the Isaac Sim workflow, the occupancy map is generated from the scene using bounds selected in the Occupancy Map extension, and the result is exported as a YAML parameters file in ROS coordinate format plus a PNG image. The tutorial advises saving the image in the same directory as the parameters file.

That pairing is the practical rule for any ROS map: the YAML file carries the parameters and points to the image, so moving one without the other breaks the map. Keep both under version control or in one folder, and name them for the building or floor they describe.

Reusing a saved map

In ROS terms, the map server makes the saved files available, and Nav2 consumes the result on the /map topic as a nav_msgs/OccupancyGrid message, as listed in the Isaac Sim tutorial. The same tutorial loads the saved occupancy map into RViz2 when Nav2 launches.

A wall-mounted map display. A saved robot map is likewise viewed on a screen before the robot is sent to a goal.

Loading the map is not enough, because the robot also needs to know where it stands on it. The tutorial sets the robot’s starting position in a parameter file (carter_navigation_params.yaml) and notes that the 2D Pose Estimate button can reset the position of the robot. Treat that step as part of every session: confirm the start pose before sending the first goal.

Semantic labels for rooms and objects

A semantic map adds meaning to geometry. The IntechOpen chapter describes classifying rooms by more abstract data such as their utility, along with the objects they contain. A Colorado School of Mines undergraduate research project states that semantics such as objects associated with the map help the robot understand its surroundings.

A meeting room of the kind a semantic map would label by purpose, so that a goal can be given as a room name.

This layer pays off when instructions are written for people, such as going to the meeting room, instead of for coordinates. It adds effort, since rooms and objects must be identified and labelled, so skip it for a robot that only follows fixed routes.

When a map needs height information

A 2D grid is enough when the robot’s lidar plane captures the obstacles that matter. The height bound in the Isaac Sim tutorial shows the limit: the flat map is tied to the sensor’s vertical position, so anything outside that band is not what the grid describes.

A building drawing on a CAD screen next to a photo of a house.

For very large sites, a topological graph is the textbook response to that cost.

Troubleshooting a map that misbehaves

  • The map does not appear in RViz2. The tutorial’s advice is to repeat the launch step that loads the map.
  • The robot appears in the wrong place. Reset the pose with the 2D Pose Estimate tool, or correct the start pose in the parameter file.
  • Localization is weak in open spaces. The tutorial suggests adding more objects to introduce more features. In a real building, the equivalent is giving the robot distinctive structure to match against.
  • Two places look alike. Similar-looking places are a known place recognition problem, so expect more errors in repetitive corridors than in varied rooms.

Frequently asked questions

Can a finished map be used for something other than navigation?

Yes. The Colorado School of Mines project notes that a constructed indoor map can also serve as a virtual environment for robot simulation.

Does a topological map replace a grid map?

Not necessarily. The IntechOpen chapter presents topological representation as a response to the cost of metric maps in large environments, and it describes a four-level hierarchy that includes both topological and metric mapping.

Why is the map image rotated before export in the Isaac Sim workflow?

The ROS camera and the Isaac Sim camera use different coordinates, so the tutorial rotates the image 180 degrees before it is exported.