Skip to content

vyomnaut/ros2-opencv-camera-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– ROS 2 + OpenCV Camera Stream (Humble)

This project demonstrates a minimal ROS 2 (Humble) camera pipeline using Python and OpenCV to publish and subscribe to real-time webcam image streams. It can be extended to perform tasks like object detection, face recognition, and computer vision applications in robotics.


πŸ“Έ Features

  • Live camera feed using OpenCV
  • Publishes sensor_msgs/msg/Image to /image_raw topic
  • Subscribes and visualizes camera stream using OpenCV window
  • ROS 2 (Humble) compatible
  • Lightweight and beginner-friendly

πŸ›  Requirements

  • Ubuntu 22.04
  • ROS 2 Humble
  • Python 3.10+
  • cv_bridge, opencv-python, numpy

Install dependencies:

sudo apt install ros-humble-cv-bridge ros-humble-perception
pip install opencv-python numpy==1.24.4


project structure
ros2_cv_ws/
└── src/
    └── ros2_opencv_pkg/
        β”œβ”€β”€ ros2_opencv_pkg/
        β”‚   β”œβ”€β”€ camera_publisher.py
        β”‚   └── camera_subscriber.py
        β”œβ”€β”€ package.xml
        β”œβ”€β”€ setup.py
        └── ...

About

A ROS 2 Humble + OpenCV project to stream live camera feed using publisher and subscriber nodes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages