Force loads OpenCV before any OpenCV functions are used. `OpenCVLoader`
has all of its loading done in a static initializer field, so it's only
loaded once.
Also deprecates `OpenCVHelp.forceLoadOpenCV()`, since it's functionality
is the exact same.
Resolves#1803
* Make MultiTagPNPResult and PNPResult singular
* add java tests
* Formatting fixes
* bring in the rest of the little stuff
* final things
* Formatting fixes
* add multisubscriber back
* Formatting fixes
* make comments better about x and y relationship
- Aruco pipeline now infers tag width from tag family like the AprilTag pipeline
- Removes unused Aruco and 200mm AprilTag models
- `VisionEstimation.estimateCamPosePNP()` now requires a target model instead of assuming 16h5
- Multitarget pipeline similarly infers target model of tag family now
- `PhotonPoseEstimator` can have target model set for on-rio multitarget
---------
Co-authored-by: amquake <noleetarrr@gmail.com>
- `PNPResults` can now be empty (`isPresent` = false)
- solvePNP methods actually handle errors and return empty `PNPResults`
- This reveals an odd error where some inputs to `solvePNP_SQUARE()` resulted in an estimated transform with NaN values, and attempts to handle it
- Overwrites java changes from #817 since #742 had duplicate fixes
- Minor bugfixes
This adds a regex that ignores cameras if they match it, for if you have another piece of software running that needs a second camera, or if you have a webcam in your laptop that cscore hates.
- Made alternate constructor for ```PhotonPoseEstimator``` that doesn't need ```PhotonCamera```
- Changed ```update``` function to take in missing cameraMatrixData and coeffsData that were previously received from PhotonCamera.
- Changed the internal ```update``` and ```multiTagPNP``` function to take in cameraMatrixData & coeffsData
- If not needed for the specified strategy then the parameters are simply not used. Also if PhotonCamera is used in constructor it instead backs up to that.
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
* Add pose caching to Java
* Refactor strategy fallthrough
* Hopefully add pose caching to C++
* Make Java switch same order as enum and C++ switch
* C++ absolute value in timestamp check
* Fix Java NPE
* Use `units::second_t` in timestamp
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
* Expand Java unit test
* Copy comments into C++
* Add tests to C++
* Run format
* Update PhotonCamera.cpp
* Probably fix bad access exception
* a
* init timestamp
* Remove prints
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
Co-authored-by: Joseph Eng <joseng2358@gmail.com>
Allows teams with a mechanism that moves the camera's position (eg, a pan and tilt mechanism) to update the location of their camera for their pose calculations.
---------
Co-authored-by: Matthew Morley <matthew.morley.ca@gmail.com>
* update documentation
* add suggested changes
* rename April Tag to AprilTag
* Update RobotPoseEstimator.java
Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com>