Add OV9782 support, optional support for libcamera 0.6+, and add arm64 sysroot JNI build helper#30
Add OV9782 support, optional support for libcamera 0.6+, and add arm64 sysroot JNI build helper#30SoZ0 wants to merge 5 commits intoPhotonVision:masterfrom
Conversation
| # by default to avoid breaking existing environments. | ||
| option(REQUIRE_LIBCAMERA_0_6 "Require libcamera >= 0.6 (enforced via pkg-config)" OFF) | ||
| set(LIBCAMERA_MIN_VERSION "0.6" CACHE STRING "Minimum libcamera version when REQUIRE_LIBCAMERA_0_6 is ON") | ||
| if (REQUIRE_LIBCAMERA_0_6) |
There was a problem hiding this comment.
I think for 2027+, we should force everyone to use a new libcamera?
There was a problem hiding this comment.
Not sure what the over arching goals are, so I did not want to force 0.6 if there was other issues with other platforms. I would recommend it as 0.6+ is stable now to my knowledge
There was a problem hiding this comment.
Hopefully this fixes (unofficial) Debian/RPiOS Trixie support again. I don't have the time to check this today, but maybe tomorrow.
There was a problem hiding this comment.
Looks like we currently install libcamera 0.5.2 -> https://github.com/PhotonVision/photon-image-modifier/actions/runs/22130709321/job/64030036864?pr=126#step:5:1477
I think @Gold856 was partially through compiling libcamera from source as part of this driver build, which would release us from our dependence on random rpi apt repos.
There was a problem hiding this comment.
The RPiOS Trixie image has libcamera 0.6 preinstalled. While libcamera 0.5 is available, sufficiently removing 0.6 to install 0.5 is nontrivial.
There was a problem hiding this comment.
Yeah, I got libcamera 0.6 building completely independently. That's what I want to switch to for 2027. Still trying to work out how to ship the IPA files and stuff.
| @@ -0,0 +1,134 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Can you remind me why we should upstream this script, rather than the existing cross build setup? (Which granted only really works in CI or a real Pi)
There was a problem hiding this comment.
Makes local dev much quicker and possible without access to direct hardware. I can swap it out with a full docker container so other environments can build easier or if its not wanted can be removed all together.
There was a problem hiding this comment.
I do think that the current cross-compiling story kinda sucks/isn't there, so I do see value in having a blessed way to build outside of the pipeline. I'll think a bit harder on it but that broadly makes sense to me
Summary
This PR adds OV9782 support (C++ + Java), makes control-setting behave better across mono sensors and cameras that don’t expose certain controls, and includes a helper script for building/publishing an arm64 JNI against a sysroot (Docker by default). It also makes the
libcamera>=0.6requirement optional so we don’t break existing build environments.What changed
OV9782camera model support in C++ and Java.stringToModel) and treatOV7251as grayscale.CameraGrabber::setControlscheck what controls the camera actually supports before setting them; handle mono sensors more cleanly.REQUIRE_LIBCAMERA_0_6(default OFF) to optionally enforcelibcamera>=0.6.libcamera_memeoptional (BUILD_CAMERA_MEME) and addtools/build_arm64_jni.shfor sysroot-based arm64 JNI builds..gitignoreadditions for local build/sysroot artifacts.How to use
Enforce libcamera 0.6+ (only if you want it):
cmake -B cmake_build -S . -DREQUIRE_LIBCAMERA_0_6=ONArm64 sysroot JNI build: