Commit Graph

47 Commits

Author SHA1 Message Date
Matt
b3436765e1 3d, camera calibration, backend settings hookup (#80)
* Implement new UI backend stuff

* Kinda partially add resolution accuracy list

* camera calibration go brrrrrrrr

* ayyyy calibration works

* Maybe fix grouping

* Reorganize camera view

* Fix settings not getting sent

* Make pretty (#4)

* Reorganize camera view

* Apply some cosmetic layout changes to the cameras page

* Fix pipeline rollback bug when starting on non-dashboard pages

Co-authored-by: Matt <matthew.morley.ca@gmail.com>

* Fix naming mismatch

* Mostly make stuff work

* rename robot-relative pose to camera-relative pose

* SolvePNP memes, fix isFovConfigurable

* Change config path to photonvision_config

* netmask go poof, fix zip download?

* Update index.js

* Fix multi cam stuff?

* Use LinearFilter instead

* Fix multicam

* aaa

* start adding restart device and restart program, fix square size bug

* Add some debug stuff

* oop

* Start fixing tests

* Fix tests

* Make target box proportinal

* run spotless

* Make crosshair h o t p i n k

* Address review comments

* Address review 2 electric booaloo

* Possibly implement vendor FOV?

* Make centroid crosshair gren

* actually use FOV

* Fix tests

* actually fix tests

Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com>
2020-08-14 12:39:21 -07:00
Banks T
86ea661ed9 Fix camera matching (#87)
* Add name matching

* Remove index matching

* Add name-only matching fallback

* Fix debug log location, fix name matching

* Apply LessSpot
2020-08-08 21:30:39 -04:00
Banks T
ff58381056 WPI Image Test Mode (#81)
* 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
2020-08-08 14:21:38 -04:00
Banks T
10fb1619ea Add CLI options (#74)
* Added CLI options

* Wording fix
2020-08-06 01:42:53 -04:00
Banks T
7b457efc55 Add FileVisionSource (#71) 2020-08-05 18:43:56 -04:00
Xzibit
dea68041fb Calibration and metrics clean up. (#68)
* Add more calibration metrics
* Cleanup metrics
* Rename PWM fields to match convention
2020-08-04 13:19:40 -07:00
Xzibit
0b98dc3c9f Hardware Management, Metrics, PWM/GPIO support. (#12)
* [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>
2020-07-31 15:43:58 -04:00
Banks T
3f5898e73d Camera gain (#62)
* Add default QuirkyCamera, make quirks public in USBCameraSource

* Add gain send, fix PS3Eye VID/PID

* Fix ps3eye test
2020-07-28 20:18:04 -07:00
Banks T
429241f838 Stream FPS Cap (#64) 2020-07-28 21:24:36 -04:00
Banks T
48851470ae Various logging cleanups (#65)
* Various logging cleanups

* Move device info to string, apply spotless
2020-07-28 21:20:54 -04:00
Banks T
a6dc41f4da Fix VisionSource device filtering (#60)
* Fix VisionSource filtering

* Apply spotless

* Change method ordering

* change one single character
2020-07-28 02:54:42 -04:00
Banks T
37a6d4e424 Catch VideoException when setting camera properties (#58)
* Catch VideoException when setting camera properties

* Fix test settables, add log message
2020-07-24 16:46:33 -04:00
Banks T
91c1f8000e TimedTaskManager Exception Handling (#56)
* Refactor of TimedTaskManager to use custom Executor

* Apply spotless

* Fix exception logging

* Apply spotless

* Fix bad reference
2020-07-24 12:05:48 -07:00
Banks T
77fd6a84c8 Logging additions 2 (#55)
* 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
2020-07-24 09:06:54 -07:00
Banks T
22d7ccc74d Add camera name blacklist for bad devices (#54) 2020-07-23 22:37:25 -07:00
Banks T
0ca6fcc744 Task scheduling (#53)
* Add TimedTaskManager

* Remove LoopingRunnable, refactor ScriptManager

Refactored ScriptRunner as a runnable to be used with TimedTaskManager

* Add task cancellation

* Apply Spotless

* Fix scriptmanager call
2020-07-23 21:44:55 -07:00
Matt
c5be2941e8 Point config test to testconfigdir instead of default config dir (#49) 2020-07-19 19:43:02 -07:00
Prateek Machiraju
a6b5112faf Improve data flow to NetworkTables (#52)
Adds Packet class to represent byte-packed data.
2020-07-19 19:42:45 -07:00
Matt
82bb8c6e3c Add date to version (#46)
* Add date to version

* Include build date, use new format

* Use version string in main

* Fix hours/mins/secs
2020-07-19 13:41:41 -04:00
Banks T
ffec3ac4eb Pipe profiling (#50)
This class helps profile pipelines by measuring individual pipe processing times
2020-07-19 10:04:52 -07:00
Matt
9f18467a08 Covert to BGR before drawing on output (#48) 2020-07-18 20:27:07 -04:00
Matt
dde5674ac9 Change user list to CopyOnWriteArrayList (#47)
Prevents concurrent modification exceptions
2020-07-18 20:25:24 -04:00
Banks T
1b7ece994a Add MutatingPipe (#44)
* Add MutatingPipe, use references in MutatingPipes

* Apply spotless

* Fix NPE in ColoredShapePipeline
2020-07-18 17:15:58 -07:00
Banks T
7c35f3b975 OutputMatPipe fixes (#43)
* Fix OutputMatPipe, 3d target list

* Cleanup and reordering, re-add colorspace conversion
2020-07-18 02:28:08 -04:00
Matt
1c5712aa39 Draw contour index, fix frame provider static properties (#41)
* Fix frame provider's static properties not updating

* Draw contour index on stream

* Refactor magic numbers into params
2020-07-17 23:00:21 -07:00
Matt
768964c8fc Misc bugfixes (#39)
* Selectively send pipeline changes

* Make input and output both rotated

* Notify UI of driver mode change over NT

* Fix "show multiple"

* Rename extent to fullness, fix area filtering

This is a breaking change to docs (make sure we note area is out of 100 and is percentage)

* Apply stream divisor to both streams

Co-authored-by: Banks T <btrout.dhrs@gmail.com>
2020-07-17 20:05:03 -07:00
Matt
0d155d9c6a Add skew to NT API (#38)
* Add skew to NT API

* Delete old entries

* Fix NPE
2020-07-17 14:03:34 -07:00
Banks T
bac09bf430 Fix PSC causing lag via selective update broadcasting (#28)
* Fix PSC causing lag via selective update broadcasting

* add logging, update key

* Fix current pipeline setting selective send

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2020-07-16 22:37:18 -07:00
Banks T
53783d88d7 Fix NT driver mode set/get (#37) 2020-07-16 22:43:29 -04:00
Matt
061385f0b6 Add skew calculation support (#36)
This is a breaking change to PhotonLib.
2020-07-16 20:50:40 -04:00
Matt
264fb1570d Add default reflective pipeline (#35) 2020-07-16 19:18:01 -04:00
Declan Freeman-Gleason
8b46ad1cab UI Redesign (#22)
* Rework UI into a new, responsive layout

* Send two streams (only one is currently downscaled)
2020-07-13 19:34:31 -07:00
Matt
aed92e7132 [backend] Check file existance, use underscores in camera unique name (#33)
* Add more comments and logging, fix configManager barf, add underscores

* apply spotless

* Add more verbose logging

* Update VisionSourceManager.java
2020-07-13 19:41:36 -04:00
Xzibit
7a7f2ff91c ColourShape benchmark and moar docs (#11)
* Added benchmark

* Rebase

* [Server] ColouredShapePipeline Benchmarks and Documentation

* [Server] ColouredShapePipeline Benchmarks and Documentation

* Added benchmark

* Rebase

* [Server] ColouredShapePipeline Benchmarks and Documentation

* [Server] ColouredShapePipeline Benchmarks and Documentation

* [Server] ColouredShapePipeline Benchmarks and Documentation

* [CSP] Rebase off master

* [CSP] Remove unused variables

* [CSP] Make circles Mat private and final
2020-07-12 14:36:45 -04:00
Matt
54445dad35 [backend] Fix FPS calculation, display latency in UI (#31) 2020-07-12 13:37:04 -04:00
Banks T
30b4b8d111 Add keyed NT Data and listeners (#27)
* 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
2020-07-12 12:29:30 -04:00
Banks T
0763e36b81 Pipe cleanups (#29)
* Pipe cleanups

* Remove redundant this qualifier
2020-07-12 11:58:01 -04:00
Banks T
b69ac3af2f Filter undesired video modes (#30) 2020-07-12 11:47:59 -04:00
Xzibit
03b2a66ecd [backend] Camera calibration (#10)
* Fleshed out pipeline

* Fixed pipeline empty mat

* Remove orig pipeline

* Remove gradle changes

* Added docs

* [Server] Camera Calibration

* [Server] Camera Calibration

* [Server] Camera Calibration

* [Server] Camera Calibration w/ PerViewErrors

* [Server] Camera Calibration w/ PerViewErrors

* [Server] Camera Calibration w/ PerViewErrors

* [Server] Camera Calibration w/ PerViewErrors

* [Server] Camera Calibration

* [Server] Camera Calibration

* [Server] Added logging to Camera Calibration
2020-07-11 19:44:22 -07:00
Banks T
9f1899b081 [backend] Logging additions (#24)
* Remove de_pest log level, add instanced shouldLog

* Rename Server, VisionProcess LogGroup to WebServer, VisionModule

* Rename Level to LogLevel

* Added lambda logger methods

* Updated Platform util class, added bootup logging

* Naming fix

* Fix errors, apply spotless

* Apply spotless
2020-07-11 19:43:19 -07:00
Banks T
93a7c96131 Update CSCore to fix linux cam dupes/BCM devices (#20) 2020-07-07 17:42:46 -04:00
Vatan Aksoy Tezer
1bbeed7d3d Add offline docs and respective CI tasks (#19)
* Add gradle javadocs task

* Add task for copying resources

* Add docs tab

* Add online docs

* Add offline docs

* Change gitignore

* Remove web resources

* Fix .gitignore

* Fix lint error

* Fix lint error

* Add CI tasks for offline docs

* Hoepfully fix CI

* Hoepfully fix CI

* Fix lint checker

* Checking on CI

* Fix CI fetch

* Fix EOF and CI repo

Co-authored-by: Vatan <vatan.tezer@polonom.com>
2020-07-07 15:10:28 -04:00
Matt
4cd2262acc Bootup sprint (#18)
* Did some stuff

* Fix gradle, start implementing mjpeg frame consumer

* Did some stuff

* bade changes

* rename camera config to USBCameraConfiguration, add name

* unrename cameraconfiguration

* Add pub/sub framework

* Add setResolution to mjpeg frame consumer

* add NTDataConsumer

* Add some totally broken hsv hacks

* Start refactoring UI data

* Update index.js

* Commit and push, he says

* Fix up some errors

* Fix input tab

* Fix fps

* Update index.js

* Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables

* Change v-model to point to data()

* update hsv to use mutations

* Work on saving, fix hsv

* Rename shouldErode/shouldDilate to erode and dilate

* Hook all the tabs up to the Store

* Change handleData to handlePipelineData

* camera quirk redo, add ICCSub to SocketHandler

* Fix some property names

* Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums

* change pipeline type to an int in store

* Fix mutation naming

* Attempt threshold fix

* Update SocketHandler.java

* Add truthy data sending

* Start adding logging support

* [UI] Add delay to slider input boxes (#1)

* [UI] [Backend] potentially fix camera settings, various logging tweaks

* Don't release raw input mat

* add setVideoModeIndex to vision settables

* Implement pipeline index in socket handler, add framework for renaming/changing pipes

* (ish) get pipeline change working

* Create index.html

* Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused)

* Refactor UI to use mutatePipeline, send pipeline results

* Update NetworkConfig.java

* Change double to number

* Run spotless

* Fix reversal of large/small comparators

* Fix left/right

* Fix pitch/yaw calculation bug, fix area bug

* Use Vue.set instead of assignment

This fixes {{ }}

* Update App.vue

* run spotless

* Actually add pipelines and reassign indecies

* Delete old pipeline configs

Fixes duplication on renaming pipeline

* Start working on deleting pipes

* Fix camera nickname change

* run spotless

* Fix some test stuff

* Update VisionModuleManagerTest.java

* vision source manager test is still broken

* Fix VisionSourceManager test

* Apply spotless 2 electric boogaloo

Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com>
Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com>
Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 04:01:58 -04:00
Prateek Machiraju
2e7cdf008b Add copyright header to sources (#14)
* Add License to top of each file

* Remove test folder

* Do not apply PhotonVision license to wpilib
2020-07-02 22:02:21 -04:00
Banks T
8fe5fa4cc2 Fix old naming in strings (#2) 2020-06-28 06:11:24 -04:00
Banks Troutman
f2fbe9dd6e Fix .gitignore, move vision package out of common 2020-06-28 04:40:43 -04:00
Matt
bdbd6b9d18 Rename to PhotonVision 2020-06-27 19:11:56 -07:00