Projects / Portfolio

ROS2 Warehouse Robot System

Undergraduate final-year project

Developed and validated a ROS2 robot system for small and medium warehouses, integrating autonomous navigation, visual recognition and robotic-arm grasping.

Rendered robot platform in the simulation environment
Success rate over 300 trials
96.7%
Recognition success over 100 trials
100%
Reduction in localisation variance
63.7%~80.8%
Target classes
3
Consecutive trials
300

Why I built it

Sorting and inspection in smaller warehouses often rely on repetitive manual work. This project tests whether an autonomous mobile robot can complete the full navigation, recognition and grasping workflow, creating a foundation for additional sensors and capabilities.

System architecture

The system has three layers: physical simulation (Gazebo, modelling the robot and sensor data), middleware (ROS2 Nav2 and AMCL for localisation and path planning), and applications (a Python controller and YOLOv5 for task scheduling and recognition). ROS2 topics, services and actions provide asynchronous communication between them.

Architecture diagram showing simulation, middleware and application layers communicating through ROS2 topics, services and actions
ROS2 system architecture and data flow

Simulation and mapping

The simulation uses the open-source wpr_simulation2 project. The warehouse contains three target points—nails, boards and paint—and a wireless charging station. SLAM produces a 2D occupancy grid for navigation and path planning.

Gazebo warehouse scene with three target points and a wireless charging station
3D simulated warehouse layout
Black, white and grey 2D occupancy grid produced by SLAM
Final 2D occupancy map

Navigation and obstacle avoidance

Nav2 receives target coordinates, plans global and local paths, and produces velocity commands. At startup, the robot rotates once to initialise localisation. Six repeated trials showed reductions of approximately 63.7% and 80.8% in X- and Y-axis localisation variance. An additional distance check addresses occasional premature arrival reports from Nav2; if it fails, navigation restarts rather than stopping early or skipping a target.

RViz visualisation of planned paths and the costmap
Path planning and target navigation
RViz local costmap and obstacle detection with an inset Gazebo view
Local costmap and obstacle detection

Visual recognition

After arriving at a target, the robot waits three seconds for the camera image to stabilise before running YOLOv5. The optimised model achieved a 100% recognition success rate for nails, boards and paint across 100 consecutive trials, with average confidence above 0.89. Each result—trial number, target, duration, success state and confidence—is recorded in a local log.

Raw camera image alongside YOLOv5 detection boxes and confidence scores
Camera image (left) and YOLO detections (right)

System stability

The controller repeatedly completes the navigation → recognition → return-to-charging-station cycle. Across 300 consecutive trials, the overall success rate was 96.7%. The ten failures were spread across different trials without a concentrated pattern.

Scatter plot of completion times across 300 trials, with failures marked in red
Completion times across 300 trials; red dots indicate failures
Pie chart of successful and failed task trials
Task success rate

Robotic-arm grasping

An open-source grasping example was adapted to the project’s warehouse map to validate grasping and transport within the framework. The gripper occasionally slipped because it lacked real-time force feedback. Grasping stability remains an area for improvement, while the proof of concept met its intended goal.

Gazebo rendering of the robotic arm grasping and transporting an object, with a human model for scale
Grasping and transport in the custom warehouse

Future directions

Two main improvements are planned: combine Kinect visual odometry with chassis IMU data to improve localisation through sensor fusion, and connect YOLOv5 output to real-time arm control. An RGB-D camera could provide live 3D target coordinates for dynamic grasp trajectories instead of preset coordinates.

← Explore other projects