Skip to content

Conversation

@charlesmadjeri
Copy link

External USB Camera Streaming with Client-Based Control

Overview

This PR adds refactored support for external USB webcam streaming with automatic load reduction when no clients are connected to the control panel.

Features

  • External USB Webcam Support: Added ext_camera node with robust device detection using v4l2-ctl
  • Service-Based Control: Implemented start/stop streaming services for manual and automatic control
  • Client Count Monitoring: Automatic streaming control based on web panel client connections
  • Optimized Streaming: GStreamer pipeline optimized for 1920x1080@30fps
  • Unit Tests: Comprehensive pytest unit tests with mocking for hardware-independent testing
  • CI/CD Pipeline: GitHub Actions workflow for automated linting and testing
  • Code Coverage: Test coverage reporting with pytest-cov

Changes

  • Renamed camera from mobius to ext_camera for consistency
  • Moved to camera_stream_controller.py automatic client count monitoring
  • Improved camera detection with vendor/product ID matching
  • (re)Integrated camera launch into lucy.launch.py
  • Updated system scripts for camera management
  • Fixed all linting errors across Python and launch files

Related

  • Frontend changes in web_control_panel repository

@charlesmadjeri charlesmadjeri self-assigned this Dec 26, 2025
@sentience-jetson sentience-jetson force-pushed the cma/feat-external-camera-streaming-with-tests branch 3 times, most recently from 85397d3 to 34147ae Compare December 26, 2025 07:34
Signed-off-by: charlesmadjeri <studies@madjeri.com>
@sentience-jetson sentience-jetson force-pushed the cma/feat-external-camera-streaming-with-tests branch from 34147ae to 4e95f0f Compare December 26, 2025 07:39
Copy link
Contributor

@Arcod7 Arcod7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
This PR is too big for me to test everything in details but it seems right

def __init__(self):
super().__init__('sensor_interface')
super().__init__('camera_publisher')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember having a discussion about having a node "sensor interface" that would group everything but I don't think we made a doc for this. Does that remind you something?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep but actually the sensors are including the microphone and realsense that are handled in external node so it makes no sense to keep the camera publisher node named as sensor interface. But we can use sensor interface maybe to talk about the groups of nodes exposing sensors or maybe see if we can use a node to group several nodes (it it makes sense). But for now this change makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants