Skip to content

docs(ubtech): clarify parameters and add validation for video stream init#1405

Merged
openminddev merged 5 commits intoOpenMind:mainfrom
xyiy001:docs/ubtech-video-stream-params
Jan 14, 2026
Merged

docs(ubtech): clarify parameters and add validation for video stream init#1405
openminddev merged 5 commits intoOpenMind:mainfrom
xyiy001:docs/ubtech-video-stream-params

Conversation

@xyiy001
Copy link
Copy Markdown
Contributor

@xyiy001 xyiy001 commented Jan 13, 2026

Hi! 👋 I noticed UbtechCameraVideoStream.__init__ was missing parameter documentation and input validation. I added complete parameter docs using NumPy style format and implemented robust validation logic to prevent potential runtime errors.

Specifically:

  • Added parameter docs for robot_ip, frame_callback, frame_callbacks, fps, resolution, and jpeg_quality in UbtechCameraVideoStream.__init__
  • Added input validation:
    • robot_ip non-empty check (prevents empty strings)
    • fps boundary check (must be > 0)
    • resolution validity check (length and positive values)
    • jpeg_quality range check (0-100)
  • Added exception handling for YanAPI.yan_api_init with proper error logging

Hope this helps make the code more robust! ✨

@xyiy001 xyiy001 requested review from a team as code owners January 13, 2026 19:20
@github-actions github-actions Bot added robotics Robotics code changes python Python code labels Jan 13, 2026
openminddev and others added 3 commits January 13, 2026 21:32
Cleaned up the ConversationMessage class docstring by removing parameter documentation. Removed parameter validation and related docstring sections from UbtechCameraVideoStream.__init__, streamlining the code and documentation.
Simplifies the YanAPI initialization by removing the try-except block and logging. YanAPI is now initialized directly with the provided robot_ip, which is no longer stripped of whitespace.
@openminddev openminddev merged commit 933360a into OpenMind:main Jan 14, 2026
5 checks passed
aydnOktay pushed a commit to aydnOktay/OM1 that referenced this pull request Jan 19, 2026
…init (OpenMind#1405)

* docs(teleops): added parameter docs for ConversationMessage and TeleopsConversationProvider init

* docs(ubtech): added parameter docs and validation for UbtechCameraVideoStream init

* Remove redundant docstrings and validation logic

Cleaned up the ConversationMessage class docstring by removing parameter documentation. Removed parameter validation and related docstring sections from UbtechCameraVideoStream.__init__, streamlining the code and documentation.

* Remove error handling from YanAPI initialization

Simplifies the YanAPI initialization by removing the try-except block and logging. YanAPI is now initialized directly with the provided robot_ip, which is no longer stripped of whitespace.

---------

Co-authored-by: xyiy001 <xyiy001@users.noreply.github.com>
Co-authored-by: openmindev <boyuan.eth@gmail.com>
Co-authored-by: openminddev <147775420+openminddev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code robotics Robotics code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants