Tested on Orange Pi 5 and Cool Pi 4B. Merge with parts of the OpenCV DNN PR.
Adds support for YOLOv5s models for Rockchip CPUs with a NPU. Right now hard coded to a note model from alex_idk. Very much still incubating and largely untested.
Continuation of #802
Support RGB status LED to indicate:
Running/no-running
NT connected
At least one target visible
Configured by manually uploading hardware config JSON
- 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>
Serializes settings using a sqlite database instead of just putting them on the filesystem. Ideally since sqlite deals with filesystem robustness stuff this should work a lot better
Merging this now so we have lots of time to stabilize pre-beta
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.
* Revised isRaspian() call to look in multiple spots to check if we're a Pi or not
* wpiformat
* linefeed fixup
* whoops
* WIP updating platform
* More platform fixups WIP
* Condensed metrics classes, but expanded the configuration to default to file, but fall back on hardcoded commands for certain platforms
* Migrate unixSupported to isLinux
* applied spotless
* wpiformat
* Linux metrics (#641)
* Move generic commands from PiCmds to LinuxCmds; have PiCmds inherit from LinuxCmds
* Better names for variables to save the total memory values
* Remove "Bionic" from the architecture; that is not actually determined.
* Trigger PhotonVision CI
* Dummy change to trigger CI
* Run format
Update index.html
Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com>
Co-authored-by: Paul Rensing <prensing@gmail.com>
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
* Move test images out of resources folder
* Limit workers in CI
* Fix image area filtering bug in colored shape
* Add missing picam settings
* Swap to make blank/empty Mat when a picam doesn't supply a color image.
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
* Fixup colored shape backend code
* More colored shape stuff
* Start adding shape change to drawing
* Mostly works!
* Add powercell image for shape test mode
* Make super-duper-sure to release stuff
Fixes colored shape leak
* Move approx poly dp into Contour
* Adjust epsilon threshold
* Add dialog to change pipeline type
* Run spotless
* Make yes red :>
* Move "no" button
* Fix duplication/deletion name logic and switching
* Fix compilation errors from rebase
* Update VisionSourceManager.java
* Update type dialog, remove duplicate popup
The dropdown still switches even if the user says "no" tho
Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com>
* Cherry-pick the extra debug info from Bank's patches.
* Updated Calibrate3d pipeline to release all unnedded mat's prior to returning.
Update a few raw mat operations to use CVMat for better traceability.
* spotless cleanup
* Added check to shouldPrint for optimization on cvmat deallocate
* Reworked stack trace printing to use lambdas for efficiency
* Missed an unneeded logger.trace
* Formatting improvements
* Add native stuff
* use runtimeloader
* add more native methods
* more stuff
* Switch JNI methods to static
* Remove non-java classes from the picam jni
* Add gradle task for JNI generation
* Migrate my previous GPU accel work
* Initial work on defining JNI interface
* Change libpicam to a symlink for now
* Initial work on adding no-copy OMX GPU accel on the pi
* Make DIRECT_OMX GPU accel mode not crash
* Clean up OMX changes (still not getting valid data back)
* Re-add GPU unit test
* A couple debugging tweaks/notes
* Add temporary special cases to get RGB out of ProcessingMode.NONE
* Code clarity improvements; fix possible VBO bug
* Get DIRECT_OMX working
* Remove some debugging switches in GPUAccelerator
* Pipe in VCSM stuff to read out pixels FAST
* Apply Spotless
* Revert versioningHelper changes
* Add missing import
* Convert to MMAL and move everything to native
* Re-add shared object
* Rework to use MMAL and do everything natively
* Condense pipeline settings classes
* Add OutputStreamPipeline
* Apply spotless
* Fix duplicate variable inits and add more video modes
* Integrate color frames and latency measurements for GPU
* Fix camera detection on pi and other platforms
* Add proper color copy disabling and camera settings calls
* Fix things that were broken by rebase
* Fix spotless issues and remove uneeded prints
* Remove libpicam symlink
* Fix stream resolution limiting
* Remove testing code in GPUAcceleratedHSVPipe
* Make profiling options general to all computers
* Make PicamJNI load from resources
* run spotlessApply
* Address review comments
* Update Maven repo for JOGL
* Fix release race condition
* Only run GPU accel test on the pi
* Lint fix and merge conflict accident fixes
* Make Jackson ignore extra fields when unmarshalling HardwareConfig
* Fix Mat releasing data race
* Spotless apply
* Remove broken header generation task
* Fix shared library loading typo
* Add a ZeroCopyPicam quirk to allow setting gain with the MMAL backend
* Make sure that exposure/brightness/gain get set after res changes
* Make rawInputMat properly local
* Remove bogus set of shouldRun flag
* Clean up small GPUHSVPipe print
* Add in some things that missed the ZeroCopyPiCameraSource rename
* Fix incorrect scoping introduced in past rebase
* Don't filter out too-low resolutions
* Only show latency when GPU accel is enabled
* Don't free Mats in stream thread before we use them
* Fix use-after-free and latency caluclation bugs on USB camera source
* Update libpicam
* Remove unwanted print
* Add libpicam forceLoad in unit test
* Fix streaming during camera calibration
* Fix zerocopy Picam calculation
* Use logger trace method instead of raw prints
* Fix calibration and driver mode pipes with the Picam
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com>
* Change chessboard size to be squares not interior corners
This reduces ambiguity
* Force users to select resolution
This forces the correct video mode index to be selected. Otherwise the 0th camera videomode index will be used, as it's zero-inited. This is undesirable.
* Make target model an enum
This will allow the UI to remember the currently selected target.
* Fix DriverMode settings
* Update FileVisionSource.java
* Sort modes by resolution
* Filter duplicated modes
* run spotless
* Fix calibration bug
* run format
* aaaaa
* Add hardware and platform support
* decrease timing sensitivity
* Better handle jvm exitg
* Make reboot happen immediately
* Cleanup restart
* Remove debug print
* Fix Jackson exploding when deserializing old versions of configs
* Add unit test for old config versions
* Run format
* Add a comment
* remove isvendorcam from pipeline manager
* oops
* Auto reconnect to unconnected cameras
* Refactor vision source manager to not suck
* Filter allowed video modes
* Run spotless
* Fix filtering
* Update VisionSourceManager.java
* Remove debug stuff
* Add unit tests, rebase
* run spotless
* Fix config test
* Fix settings not being saved
* run spotless
* oop
* kil debug prints if we have no usb cams to match
* whoooops
* add braudcast
* Actually save pipeline settings
* fix memes
* get right coeffs
* Run spotless
* run spotless
* rebase and add some prints
* Sorry min
* Oops reimpl matching
* Oops
This makes it so that settings are written to disk 1 second after settings have stopped being changed. This means that while dragging sliders in the UI, settings won't be written repeatedly. This reduces wear on system storage and improves performance, as saving is expensive.
* Add camera config for calibration to test mode
* Add 3D capabilities to test mode
* Add resources to main for jar testmode
* Refactor path utilities for test mode
* Apply spotless
* [Server] Hardware Management
* [Server] Hardware Management
* [Server] Hardware Management
* [Server] Hardware Management
* [Server] Hardware Management
* [Server] Hardware Management
* Added metricsPublisher
* [Server] Hardware Management
* [Server] Hardware Management
* Fill in HardwareConfig, allow JSON Comments
* Use hardware config
* [Hardware Management] Use Hardware Config
* [Hardware Management] Use softPWM for dimming
* [Hardware] Added HardwareConfig Test
* [Hardware] Started HardwareManager
* Start metrics thread in hardwareManager
* [Hardware] Added Hardware Manager Test
* [Hardware] Spotless
* [Hardware] Added logging, cleaned up HardwareConfig
* [Hardware] Added logging to PWM class
* [Hardware] Rebase off master, fix merge conflicts
* [Hardware] Ignore metrics commands if on pi
* [Hardware] Remove GPIO provision after shutdown
* [Hardware] Switch over to diozero
* [Hardware] Use broadcom pins
* [Hardware] Fix PWM port
* [Hardware] Use jpi instead of pigpio
* [Hardware] Use dizero-core
* [Hardware] No need to close LED
* [Hardware] Switch to jpigpio
* [Hardware] Initalize JPiGPIO in unit tests
* [Hardware] Use dutyCycle for LED dimming
* [Hardware] Add blink test to HardwareManager
* [Hardware] Fix PWM port
* [Hardware] Fix HardwareManagerTest
* [Hardware] Fix HardwareManagerTest
* [Hardware] Use waves for LED blinking
* [Hardware] Make blinking part of PWM
* [Hardware] Add API methods to hardware Manager
* [Hardware] Only start pigpio if on pi
* [Hardware] Merge PWM classes into GPIO
* [Hardware] Add Hardware stuff to VisionModules
* [Hardware] Remove random semicolon
Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com>
* Add overload to logger.error() for Throwable to print stack trace
* Replaced all e.printStackTrace() with logger.error()
* Log level dependent on dev or release
* Add most of the missing NT data to NTDataConsumer
* Clean up unused data classes, refactor DataConsumer to CVPipelineResultConsumer
* Fix root table name and reference
* Update NTDataPublisher and VisionModule for listeners
* NPE fix, attempt to remove old NT Table on name change
* Fix NT connected log spam
* Apply spotless
* Move NT flush, fix raw data name