An end-to-end Autonomous Mobile Robot (AMR) system for warehouse navigation, mapping, and active vision rack inventory scanning developed using ROS2 Humble.
- π¬ Watch Complete Project Demonstration Playlist on YouTube β Includes full autonomous navigation tours, SLAM mapping, active vision pan-tilt QR scanning, and hardware testing demonstrations.
The repository is structured for a multi-device deployment between the onboard Raspberry Pi 4 (robot hardware control & navigation) and the Local Computer (operator station, active vision processing, teleoperation, and visualization).
+---------------------------------------------------+
| Wi-Fi / Network Subnet |
+-------------------------+-------------------------+
|
+----------------------------+----------------------------+
| |
v v
+-----------------------+ +-----------------------+
| π€ RASPBERRY PI 4 | | π» LOCAL COMPUTER |
| (Robot Controller) | | (Operator Station) |
+-----------------------+ +-----------------------+
| β’ pi_bot | | β’ active_vision_scanner|
| β’ serial | | β’ joy_teleop |
| β’ diffdrive_arduino | | β’ rviz |
+-----------+-----------+ | β’ Motors |
| +-----------------------+
v |
+-----------------------+ |
| βοΈ Hardware | v
| β’ Arduino Nano |<============================================+
| β’ RPLidar A1M8 | (ESP32-CAM MJPEG Stream & WiFi Servo HTTP)
| β’ Motor Drivers |
+-----------------------+
| Package | Description |
|---|---|
pi_bot |
Core robot ROS2 bringup, URDF/Xacro models, RPLidar launch, SLAM Toolbox configurations, and Navigation2 launch stack. |
serial |
C++ serial library required by diffdrive_arduino to communicate over USB with the Arduino motor controller. |
diffdrive_arduino |
ros2_control hardware interface C++ plugin interfacing with Arduino Nano for differential drive wheel odometry and motor commands. |
| Package | Description |
|---|---|
active_vision_scanner |
Python ROS2 node for OpenCV active rack alignment, pan-tilt servo tracking, QR code scanner, database lookup (warehouse_database.xlsx), and CSV inventory logging. |
joy_teleop |
ROS2 node mapping USB joystick / gamepad input to /cmd_vel velocity commands for manual robot control. |
rviz |
Pre-configured RViz2 display profiles (rviz_config.rviz, rviz_config_nav2.rviz) for live map, costmap, TF, and LiDAR visualization. |
Motors |
Arduino Nano firmware (ROSArduinoBridge) sketch and driver headers for motor control, PID tuning, and encoder processing. |
Both machines must run Ubuntu 22.04 LTS with ROS2 Humble installed.
On Raspberry Pi:
sudo apt update
sudo apt install -y \
ros-humble-ros2-control \
ros-humble-ros2-controllers \
ros-humble-slam-toolbox \
ros-humble-navigation2 \
ros-humble-nav2-bringup \
ros-humble-rplidar-rosOn Local Computer:
sudo apt update
sudo apt install -y \
ros-humble-rviz2 \
ros-humble-joy \
python3-opencv \
python3-pandas \
python3-openpyxl
pip install pyzbar "numpy<2"-
Create a ROS2 workspace and clone the Pi packages:
mkdir -p ~/ros2_ws/src cd ~/ros2_ws/src # Copy or git clone pi_bot, serial, diffdrive_arduino into src/
-
Build and source:
cd ~/ros2_ws colcon build --symlink-install source install/setup.bash
-
Export ROS Domain ID (must match Local PC):
echo "export ROS_DOMAIN_ID=0" >> ~/.bashrc source ~/.bashrc
-
Create a ROS2 workspace and clone the Local PC packages:
mkdir -p ~/ros2_ws/src cd ~/ros2_ws/src # Copy or git clone active_vision_scanner, joy_teleop, rviz, Motors into src/
-
Build and source:
cd ~/ros2_ws colcon build --symlink-install source install/setup.bash
-
Export ROS Domain ID (must match Raspberry Pi):
echo "export ROS_DOMAIN_ID=0" >> ~/.bashrc source ~/.bashrc
# 1. Bring up robot state publisher and diffdrive hardware interface
ros2 launch pi_bot launch_robot.launch.py
# 2. Launch SLAM Toolbox for mapping (or navigation for autonomous drive)
ros2 launch pi_bot slam_map.launch.py
# 3. Launch Nav2_bringup (navigation for autonomous drive with delayed initial pose setup)
ros2 launch pi_bot navigation.launch.py map:=/path/to/my_map.yaml
# 4. Optional: Run autonomous rack navigation script or full tour manager
python3 scripts/go_to_rack_r4_a3.py
python3 scripts/full_tour.py# 1. Run Joystick Teleop for manual navigation
ros2 launch joy_teleop teleop.launch.py
# 2. Launch RViz2 for visualization
rviz2 -d src/rviz/rviz_config_nav2.rviz
# 3. Launch Active Vision Scanner System
ros2 launch active_vision_scanner scanner_system.launch.py \
esp32_ip:=192.168.43.XXX \
esp32_cam_url:=http://192.168.43.YYY:81/streamsrc/
βββ active_vision_scanner/ # [Local PC] ESP32 WiFi bridge & OpenCV QR scanner state machine
βββ Chassis_step_file/ # 3D CAD step model file of the WareOps robot chassis
βββ diffdrive_arduino/ # [Raspberry Pi] ros2_control C++ hardware interface plugin
βββ Images/ # High-resolution hardware and assembly gallery with README.md
βββ joy_teleop/ # [Local PC] Joystick teleoperation node
βββ Motors/ # [Local PC] Arduino Nano motor firmware (ROSArduinoBridge)
βββ pi_bot/ # [Raspberry Pi] URDF, RPLidar driver, SLAM, & Nav2 launch configs
βββ rviz/ # [Local PC] RViz2 display configuration files
βββ scripts/ # Autonomous navigation waypoint & full tour sequence scripts
β βββ initialise.py # Delayed initial pose setup script for Nav2
β βββ full_tour.py # Multi-rack automated inspection sequence manager
β βββ go_to_rack_r3_b3.py # Waypoint navigation script for Rack R3_B3
β βββ go_to_rack_r4_a2.py # Waypoint navigation script for Rack R4_A2
β βββ go_to_rack_r4_a3.py # Waypoint navigation script for Rack R4_A3
βββ serial/ # [Raspberry Pi] Serial communication C++ library
βββ HARDWARE.md # Complete hardware specification sheet
βββ system_overview.md # Detailed active vision system flow documentation
βββ warehouse_database.xlsx # Master warehouse inventory Excel database
βββ warehouse_database.ods # Excel/ODS master inventory database file
- HARDWARE.md: Detailed hardware connections, pinouts, and power distribution specs.
- system_overview.md: Complete breakdown of network architecture, ESP32 pan-tilt trajectory, and vision state machine flow.