A ROS 2-powered project that enables real-time object detection and localization using YOLOv8 and a TurtleBot4 robot. Ideal for autonomous navigation, exploration, and interaction tasks in indoor environments.
- π¦ Real-time object detection using YOLOv8
- π§ ROS 2 integration with TurtleBot4
- π Object position localization in map frame
- πΌοΈ Live camera feed with bounding boxes
- πΊοΈ Optional SLAM or Navigation2 integration
Working.Video.mp4
| Component | Technology |
|---|---|
| Robot | TurtleBot4 |
| Framework | ROS 2 (Humble/Foxy) |
| Perception | YOLOv8, OpenCV, PyTorch |
| Visualization | RViz2 |
| OS | Ubuntu 22.04 + ROS 2 |
turtlebot4-object-detection/
βββ src/ # ROS 2 packages
β βββ object\_detection/ # Main node
βββ launch/ # Launch files
βββ models/ # YOLO weights
βββ scripts/ # Utility scripts
βββ README.md
-
Clone Repository
git clone https://github.com/yashgolani28/turtlebot4-object-detection.git cd turtlebot4-object-detection -
Install Dependencies
sudo apt update sudo apt install ros-humble-cv-bridge ros-humble-image-transport pip install ultralytics
-
Download YOLOv8 Weights
cd models/ wget https://path/to/yolov8n.pt -
Build the Workspace
colcon build source install/setup.bash
ros2 launch object_detection detection.launch.pyUse
RViz2to visualize detections or subscribe to/detectionstopic.
/camera/image_rawβ raw video feed/detectionsβ detected object class & bounding boxes/tfβ for object localization
- Yash Golani
For queries, contact via LinkedIn or open an issue on this repo.

