Skip to content

Use relative imports in UAV CV helpers#209

Closed
ethayu wants to merge 1 commit into
mainfrom
user/ethayu/workspace-pylance-cv-imports
Closed

Use relative imports in UAV CV helpers#209
ethayu wants to merge 1 commit into
mainfrom
user/ethayu/workspace-pylance-cv-imports

Conversation

@ethayu

@ethayu ethayu commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Convert legacy UAV CV helper imports to package-relative imports.
  • Guard failed video reads in the legacy tracker helper.
  • Skip contour conversion/confidence when the helper does not find a contour, and pass image dimensions via frame.shape.

Verification

  • source /opt/ros/humble/setup.bash && export PYTHONPATH=$PWD/controls/sae_2025_ws/src/uav:$PYTHONPATH && npx --yes pyright controls/sae_2025_ws/src/uav/uav/cv/calibrate.py controls/sae_2025_ws/src/uav/uav/cv/track.py --outputjson
  • python3 -m compileall controls/sae_2025_ws/src/uav/uav/cv/calibrate.py controls/sae_2025_ws/src/uav/uav/cv/track.py
  • ruff check controls/sae_2025_ws/src/uav/uav/cv/calibrate.py controls/sae_2025_ws/src/uav/uav/cv/track.py
  • ruff format --check controls/sae_2025_ws/src/uav/uav/cv/calibrate.py controls/sae_2025_ws/src/uav/uav/cv/track.py

Refs #208
Part of #201

@ethayu

ethayu commented May 27, 2026

Copy link
Copy Markdown
Collaborator Author

Folded into #237 as a separate commit; closing to keep CV/vision typing in one PR.

@ethayu ethayu closed this May 27, 2026
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.

1 participant