← All posts

Warehouse Robot Navigation With ROS 2 and SLAM

A TurtleBot 4 maps a simulated warehouse, then uses that map to reach five destinations.

We built a warehouse robot that makes its own map and uses it to get where we send it. The demonstration runs in ROS 2 and Gazebo, with a simulated TurtleBot 4 navigating around stacks of crates and through the warehouse aisles. It gives us a working navigation foundation for developing mobile robots around a particular place and job.

I wanted the robot’s movement and its map visible together. You can watch the warehouse take shape in the map, then see the robot use that same space to reach five destinations. AI agents carried out the specialist development, bringing the mapping and navigation into a running application.

Mapping the warehouse, then navigating itThe complete simulated run, accelerated: mapping at 20× and navigation at 12×.

Warehouse: Depot v6 by OpenRobotics, CC BY 4.0. Roof and fan visuals removed for visibility.

A map the application can use

The useful design boundary is between deciding where the robot should go and working out how to get there. A warehouse application can supply a destination while the navigation system handles the route and the movement. That leaves room to develop the robot’s job around a navigation capability that already works.

Here, lidar SLAM builds the map with slam_toolbox. SLAM means simultaneous localization and mapping: the robot estimates its position while assembling a map from what its sensor sees. ROS 2 connects the mapping and navigation components to the simulated robot in Gazebo.

The navigation run starts with the map saved from that tour. AMCL, the localization component, estimates where the robot is within it. Nav2 uses that position and the requested destination to plan and follow a route through the mapped space. The map gives the application a stable way to specify places: a destination refers to the same part of the warehouse as the robot moves. The five goals in this demonstration all use that shared reference.

A saved SLAM map outlines the warehouse walls and stacks of crates. A blue planned route leads toward a destination on the left; the green line traces the robot’s previous movement around the warehouse.
The saved map during navigation. Blue is the planned route; green is the path already travelled.

Building on working navigation

I’m using established robotics components so the application can grow around a working robot. A task such as visiting a sequence of stations can be expressed in terms of the work at each stop, while Nav2 handles the travel between them.

For that application, we could add rules for choosing the next station and deciding when the work there is complete. It could wait for a station to finish before sending another destination to Nav2. Changing the order of the stops would then be an application decision, with the navigation system handling the route between them. We can develop those rules against the robot’s behaviour in the warehouse, with the map and its movement visible together.

Warehouse Robot Navigation With ROS 2 and SLAM
0:00
2:13