ros2cv is an open-source, modular ROS 2 package written in Python that enables real-time computer vision capabilities using OpenCV, CvZone, and MediaPipe. It's designed for simplicity, performance, and seamless ROS 2 integration.
π§ No classes required β just clean, functional Python nodes for each vision task!
This package provides multiple ROS 2 nodes, each performing a specific CV task:
- β Hand and Finger Detection
- β Pose Estimation
- β Face Mesh Landmark Tracking
- β Classic Face Detection (Haar Cascade)
- β Object Detection (YOLO-ready)
- β Camera Publisher & Viewer Nodes
Each node is:
- π§΅ Lightweight and real-time except (YOLO as it requires GPU and other settings)
- π Subscribes to
/camera/image/compressed - π€ Publishes:
- Annotated images
- Processed data (landmarks, positions, etc.)
- π§© Easy to modify or extend
- ROS 2 (Humble or later recommended)
- Python 3.8+
opencv-python,cvzone,mediapipe, 'ultralytics'
Install dependencies:
pip install opencv-python mediapipe cvzone ultralyticsExample:
ros2 run ros2cv face_detection- Robotics developers
- CV research prototypes
- ROS 2 learners
- Anyone building real-time vision systems
Pull requests are welcome! Feel free to suggest new modules or features.
- π MediaPipe Documentation
- π§° CvZone GitHub
- πΈ OpenCV
βοΈ Star this repo to follow updates and support the project!
This project is licensed under the MIT License.