5.4 USB camera no image
Typical symptoms
After launching hobot_usb_cam (or similar) the node shows running, but:
- Web preview stays black
- Logs repeat
did not receive image data - The node exits with
code -6,SIGABRT, orterminate called after throwing …
Quick check
On the board:
v4l2-ctl -d /dev/video0 --list-formats-ext
Look for [0]: 'MJPG' (Motion-JPEG) in the output:
- No MJPG → camera may be YUYV-only; try low resolutions such as
320x240 - Has MJPG → set launch
pixel_format=MJPEG, pick resolution/fps the camera lists as supported
Checklist
-
Identify the
/dev/videonodels -l /dev/video*Multiple devices:
for d in /dev/video*; do
echo "=== $d ==="
v4l2-ctl -d $d --list-formats-ext 2>/dev/null | head -20
done -
Switch pixel format
UVC often defaults to YUYV—on tight USB bandwidth the stream stalls. Prefer MJPEG—e.g. in launch:
pixel_format='MJPEG'
image_width=640
image_height=480
framerate=30 -
Match reported modes
Width, height, and fps should match a line from v4l2-ctl. Drop to 320x240@15 if needed.
-
Try another device node
If
/dev/video0crashes, try/dev/video1, etc. -
Paste logs
Drop the full traceback into AI Dock—Moss can suggest RDK‑specific fixes.
Why this works
Defaults that force YUYV move large payloads; extras on the same USB bus worsen drops. MJPEG squeezes bandwidth and is usually stabler.
Permanent fix workflow
Proceed stepwise:
- Characterize modes via
v4l2-ctl(formats, sizes, fps) - Edit launch with
pixel_format='MJPEG'matching a supported combo - Verify topics—RViz2 or
ros2 topic echoshould show steady frames - Then stack detection/other nodes
For ROS / TROS details see official RDK documentation.