Uses logic in https://github.com/PhotonVision/photon-libcamera-gl-driver/pull/16 to push the ov9281 down to its true minimum exposure. Updates UI to list the exposure settings in ~~microseconds.~~ Native units - not everyone works in microseconds. Does its darndest to actually try to set the exposure in ~~microseconds.~~ Native Units. To do this... Lifecam is funky when doing this - [cscore limits the exposure settings to certain quantized values](https://github.com/wpilibsuite/allwpilib/blob/main/cscore/src/main/native/linux/UsbCameraImpl.cpp#L129). Add a new camera quirk to allow that. ~~Updated camera quirks to re-evaluate every camera load (rather than recalling from settings - this shouldn't be necessary)~~ This should be rolled back, needed for arducam type selection. Updated camera quirk matching logic to make PID/VID optional, and basename optional (and only match trailing characters). This enables mirroring CSCore's logic for identifying lifecams by name. Updated the USBCamera to primarily use cscore's exposed property names. Since camera manufacturers use a potpourri of names for the same thing.... For nice-to-have settings: new soft-set logic to try all possible names, but gracefully pass if the property isn't there. For required settings: Search a list for the first setting that's supported, fail if none are supported. More logging of camera properties to help debug. Note: most of this work is because cscore doesn't directly expose a massaged exposure-setting-absolute API (and, given what we've seen, probably _shouldn't_, this struggle is not for the faint of heart). --------- Co-authored-by: Matt <matthew.morley.ca@gmail.com>
PhotonVision
PhotonVision is the free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition. You can read an overview of our features on our website. You can find our comprehensive documentation here.
The latest release of platform-specific jars and images is found here.
If you are interested in contributing code or documentation to the project, please read our getting started page for contributors and join the Discord to introduce yourself! We hope to provide a welcoming community to anyone who is interested in helping.
Authors
Documentation
- Our main documentation page: docs.photonvision.org
- Photon UI demo: demo.photonvision.org (or manual link)
- Javadocs: javadocs.photonvision.org (or manual link)
- C++ Doxygen cppdocs.photonvision.org (or manual link)
Building
Gradle is used for all C++ and Java code, and NPM is used for the web UI. Instructions to compile PhotonVision yourself can be found in our docs.
You can run one of the many built in examples straight from the command line, too! They contain a fully featured robot project, and some include simulation support. The projects can be found inside the photonlib-java-examples and photonlib-cpp-examples subdirectories, respectively. Instructions for running these examples directly from the repo are found in the docs.
Gradle Arguments
Note that these are case sensitive!
-PArchOverride=foobar: builds for a target system other than your current architecture. Valid overrides are:- linuxathena
- linuxarm64
- arm64
- x86-64
- x86
-PtgtIp: Specifies where./gradlew deployshould try to copy the fat JAR to-Pprofile: enables JVM profiling
Out-of-Source Dependencies
PhotonVision uses the following additonal out-of-source repositories for building code.
- Base system images for Raspberry Pi & Orange Pi: https://github.com/PhotonVision/photon-image-modifier
- C++ driver for Raspberry Pi CSI cameras: https://github.com/PhotonVision/photon-libcamera-gl-driver
- JNI code for mrcal: https://github.com/PhotonVision/mrcal-java
- Custom build of OpenCV with GStreamer/Protobuf/other custom flags: https://github.com/PhotonVision/thirdparty-opencv
- JNI code for aruco-nano: https://github.com/PhotonVision/aruconano-jni
Additional packages
For now, using mrcal requires installing these additional packages on Linux systems:
sudo apt install libcholmod3 liblapack3 libsuitesparseconfig5
Acknowledgments
PhotonVision was forked from Chameleon Vision. Thank you to everyone who worked on the original project.
-
WPILib - Specifically cscore, CameraServer, NTCore, and OpenCV.
-
Apache Commons - Specifically Commons Math, and Commons Lang
License
PhotonVision is licensed under the GNU General Public License.
Meeting Notes
Our meeting notes can be found in the wiki section of this repository.