Add image and streaming from USB camera

Plus a little freshen up of the readme's
This commit is contained in:
2026-05-07 16:38:36 +00:00
parent 59a019ed7b
commit ef78f19e72
18 changed files with 1080 additions and 327 deletions
+43
View File
@@ -0,0 +1,43 @@
# Camera Publisher
ROS 2 node that captures frames from a V4L2 USB camera using GStreamer and publishes them as `sensor_msgs/Image` messages.
---
## Architecture
```
USB Camera → v4l2src (GStreamer) → sensor_msgs/Image → /camera/image_raw
```
No OpenCV or cv_bridge required. Frames are captured via `v4l2src` and passed directly into the ROS 2 message.
---
## Published topics
| Topic | Type | Description |
|---|---|---|
| `/<CAMERA_NAMESPACE>/image_raw` | `sensor_msgs/Image` | Raw camera frames |
---
## Environment variables
| Variable | Default | Description |
|---|---|---|
| `VIDEO_DEVICE` | `/dev/video0` | V4L2 device path |
| `WIDTH` | `640` | Capture width in pixels |
| `HEIGHT` | `480` | Capture height in pixels |
| `FPS` | `30` | Capture frame rate |
| `CAMERA_FORMAT` | `raw` | Capture format (`raw` or `mjpeg`) |
| `CAMERA_NAMESPACE` | `/camera` | ROS 2 namespace (topic becomes `/<ns>/image_raw`) |
---
## Finding your camera device
```bash
v4l2-ctl --list-devices
v4l2-ctl -d /dev/video0 --list-formats-ext
```