A ROS 2 and Gazebo-based warehouse simulation for mapping, localization, and autonomous navigation using the Nav2 stack with a Scuttle robot.
This repository demonstrates a complete autonomous mobile robot workflow inside a simulated warehouse environment.
The project includes:
- 🏭 Warehouse simulation in Gazebo
- 🗺️ SLAM-based map generation
- 📍 Localization using AMCL
- 🧭 Autonomous navigation using Nav2
- 🚧 Keepout mask support for restricted zones
- 🎯 Waypoint-based navigation
- 🖥️ RViz visualization
- 🎮 Keyboard teleoperation
- 🤖 Scuttle robot simulation
- 🗺️ Real-time warehouse mapping
- 📡 Nav2 navigation stack integration
- 🚧 Keepout zone filtering
- 🎯 Autonomous waypoint navigation
- 🖥️ Preconfigured RViz setup
- 🎮 Manual teleoperation support
- 🧩 Modular ROS 2 workspace structure
| Tool / Framework | Purpose |
|---|---|
| ROS 2 Humble | Robot middleware |
| Gazebo | Warehouse simulation |
| Nav2 | Autonomous navigation |
| SLAM Toolbox | Mapping |
| RViz2 | Visualization |
| Python | Helper scripts and waypoint navigation |
| Colcon | ROS 2 workspace build tool |
Warehouse_Simulation/
├── maps/
│ ├── scuttle_slam_map.yaml
│ └── keepout_mask.yaml
│
├── src/
│ ├── scuttle_description_ros2/
│ ├── scuttle_gazebo_ros2/
│ └── scuttle_navigation2/
│
├── build/
├── install/
└── log/- Ubuntu 22.04
- ROS 2 Humble
- Gazebo Classic
- RViz2
- Python 3.10+
Install the required packages:
sudo apt update
sudo apt install -y \
ros-humble-navigation2 \
ros-humble-nav2-bringup \
ros-humble-gazebo-ros-pkgs \
ros-humble-teleop-twist-keyboard \
ros-humble-slam-toolbox \
python3-colcon-common-extensionscd ~
git clone https://github.com/Saigirish23/Warehouse_Simulation
cd Warehouse_Simulation
source /opt/ros/humble/setup.bash
colcon build --symlink-install
source install/setup.bashUse this phase to generate the warehouse map using SLAM.
cd ~/Warehouse_Simulation
source install/setup.bash
ros2 launch scuttle_gazebo_ros2 warehouse_launch.pycd ~/Warehouse_Simulation
source install/setup.bash
ros2 launch scuttle_navigation2 online_async_launch.pycd ~/Warehouse_Simulation
source install/setup.bash
ros2 run teleop_twist_keyboard teleop_twist_keyboardUse the keyboard to move the robot and explore the warehouse.
cd ~/Warehouse_Simulation
source install/setup.bash
python3 src/scuttle_navigation2/launch/geotag_recorder.pycd ~/Warehouse_Simulation
source install/setup.bash
rviz2 -d src/scuttle_navigation2/config/nav2_scuttle.rvizAfter mapping the warehouse, save the generated map:
ros2 run nav2_map_server map_saver_cli -f ~/Warehouse_Simulation/maps/scuttle_slam_mapThe map files will be saved inside the maps/ directory.
Use this phase to run localization and autonomous navigation.
cd ~/Warehouse_Simulation
source install/setup.bash
ros2 launch scuttle_gazebo_ros2 warehouse_launch.pycd ~/Warehouse_Simulation
source install/setup.bash
ros2 launch scuttle_navigation2 localization_keepout_launch.py \
map:=~/Warehouse_Simulation/maps/scuttle_slam_map.yaml \
keepout_mask:=~/Warehouse_Simulation/maps/keepout_mask.yamlIf lifecycle activation is required:
ros2 lifecycle set /keepout_filter_mask_server activatecd ~/Warehouse_Simulation
source install/setup.bash
rviz2 -d src/scuttle_navigation2/config/nav2_scuttle.rvizUse the 2D Pose Estimate tool in RViz to set the robot’s initial pose before starting navigation.
cd ~/Warehouse_Simulation
source install/setup.bash
ros2 launch scuttle_navigation2 navigation_launch.pycd ~/Warehouse_Simulation
source install/setup.bash
python3 ~/Warehouse_Simulation/src/scuttle_navigation2/launch/waypoint_navigator.pyThe robot will follow predefined waypoints inside the warehouse.
The RViz configuration includes:
- 🤖 Robot model
- 🗺️ Occupancy grid map
- 📡 Laser scan data
- 🧭 Planned path
- 🚧 Local and global costmaps
- 🔗 TF frames 🔗 TF frames