Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional PI Camera support #1683

Open
nlbutts opened this issue Jan 5, 2025 · 3 comments
Open

Additional PI Camera support #1683

nlbutts opened this issue Jan 5, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@nlbutts
Copy link

nlbutts commented Jan 5, 2025

Is your feature request related to a problem? Please describe.
I'm trying to add the V3, HQ, and V3 Wide camera support to PhotonVision. I'm a professional C/C++ and Python programmer, but my Java knowledge is pretty poor. How can I build photon-libcamera-gl-driver code and integrated it into the PhotonVision build?

If I understand things correctly, when PhotonVision builds, it pulls the photon-libcamera-gl-driver code from Maven. ChatGPT has failed me. It seems like I should be able to modify to a local repo, but I have yet to figure that out. So if anyone could point me in the right direction, I would be grateful.

The second question is more of an architecture question. PhotonVision asks the photon-libcamera-gl-driver for a enum and friendly name for the camera. Why have to keep two Enum in sync in the two projects. Would it be better to integrate the sysfs path to camera name in PhotonVision and remove that from the photon-libcamera-gl-driver?

Thanks in Advance.

@nlbutts nlbutts added the enhancement New feature or request label Jan 5, 2025
@Juniormunk
Copy link
Contributor

No code specifically blocks certain cameras all it does is give warnings that they are not supported. Except for specific camera features such as autofocus or setting the focus, those cameras should "work" (but are not supported) with photonvision.

@mcm001
Copy link
Contributor

mcm001 commented Jan 5, 2025

(Although we do choose video modes based on friendly name)

The general workflow for using a local build of our libcamera driver (from memory, fact check me against our GitHub actions workflow):

  • use a pi or chroot into a pi image
  • build with cmake
  • use gradle to package the .so + Java code into a JAR (JARs? Not sure if Java and native code are seperate artifacts)
  • you can use gradlew publishToMavenLocal to publish to a maven repository at ~/.m2/repository
  • update the libcamera driver version in photon. We should already be configured to search that local maven repository

@nlbutts
Copy link
Author

nlbutts commented Jan 6, 2025

Any thoughts on the Pi AI camera. I have YOLOV8-Nano running on it at 30 FPS. Eventually I want to try and add support for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants