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.py
Use
RViz2
to visualize detections or subscribe to/detections
topic.
/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.