Add image and streaming from USB camera
Plus a little freshen up of the readme's
This commit is contained in:
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user