2020-03-18 01:51:30 -04:00
|
|
|
plugins {
|
|
|
|
|
id 'java'
|
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 01:01:58 -07:00
|
|
|
id 'application'
|
2020-03-18 01:51:30 -04:00
|
|
|
id 'com.github.johnrengelman.shadow' version '5.2.0'
|
2020-03-28 18:38:50 -07:00
|
|
|
id "com.diffplug.gradle.spotless" version "3.28.0"
|
2020-07-02 21:45:42 -07:00
|
|
|
id "jacoco"
|
2020-03-18 01:51:30 -04:00
|
|
|
}
|
|
|
|
|
|
2020-07-17 23:22:42 -07:00
|
|
|
apply from: 'versioningHelper.gradle'
|
|
|
|
|
|
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 01:01:58 -07:00
|
|
|
mainClassName = 'org.photonvision.Main'
|
|
|
|
|
|
2020-06-28 04:40:43 -04:00
|
|
|
group 'org.photonvision'
|
2020-07-19 10:41:41 -07:00
|
|
|
version versionString
|
2020-03-28 19:08:03 -04:00
|
|
|
|
2020-03-18 01:51:30 -04:00
|
|
|
sourceCompatibility = 11
|
|
|
|
|
|
|
|
|
|
repositories {
|
2020-06-17 11:12:19 -07:00
|
|
|
jcenter()
|
2020-03-18 01:51:30 -04:00
|
|
|
mavenCentral()
|
|
|
|
|
maven {
|
2020-06-17 11:12:19 -07:00
|
|
|
url = 'https://frcmaven.wpi.edu:443/artifactory/development'
|
2020-03-18 01:51:30 -04:00
|
|
|
}
|
|
|
|
|
}
|
2020-07-02 21:45:42 -07:00
|
|
|
|
2020-03-18 01:51:30 -04:00
|
|
|
ext {
|
2020-07-07 17:42:46 -04:00
|
|
|
wpilibVersion = '2020.3.2-99-g9f4de91'
|
2020-03-18 01:51:30 -04:00
|
|
|
openCVVersion = '3.4.7-2'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation "io.javalin:javalin:3.7.0"
|
2020-07-31 15:43:58 -04:00
|
|
|
compile group: 'eu.xeli', name: 'jpigpio_2.12', version: '0.1.0'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-18 01:51:30 -04:00
|
|
|
|
|
|
|
|
implementation "com.fasterxml.jackson.core:jackson-annotations:2.10.0"
|
|
|
|
|
implementation "com.fasterxml.jackson.core:jackson-core:2.10.0"
|
|
|
|
|
implementation "com.fasterxml.jackson.core:jackson-databind:2.10.0"
|
|
|
|
|
|
|
|
|
|
implementation "org.msgpack:msgpack-core:0.8.20"
|
|
|
|
|
implementation "org.msgpack:jackson-dataformat-msgpack:0.8.20"
|
|
|
|
|
|
|
|
|
|
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
|
|
|
|
|
implementation "org.apache.commons:commons-math3:3.6.1"
|
|
|
|
|
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
|
2020-08-06 01:42:53 -04:00
|
|
|
implementation group: 'commons-cli', name: 'commons-cli', version: '1.4'
|
2020-03-18 01:51:30 -04:00
|
|
|
implementation "org.apache.commons:commons-collections4:4.4"
|
|
|
|
|
implementation "org.apache.commons:commons-exec:1.3"
|
|
|
|
|
|
2020-03-28 18:35:34 -04:00
|
|
|
// wpilib stuff
|
|
|
|
|
implementation "edu.wpi.first.wpiutil:wpiutil-java:$wpilibVersion"
|
|
|
|
|
implementation "edu.wpi.first.cameraserver:cameraserver-java:$wpilibVersion"
|
|
|
|
|
|
|
|
|
|
implementation "edu.wpi.first.cscore:cscore-java:$wpilibVersion"
|
|
|
|
|
compile "edu.wpi.first.cscore:cscore-jni:$wpilibVersion:linuxaarch64bionic"
|
|
|
|
|
compile "edu.wpi.first.cscore:cscore-jni:$wpilibVersion:linuxraspbian"
|
|
|
|
|
compile "edu.wpi.first.cscore:cscore-jni:$wpilibVersion:linuxx86-64"
|
|
|
|
|
compile "edu.wpi.first.cscore:cscore-jni:$wpilibVersion:osxx86-64"
|
|
|
|
|
compile "edu.wpi.first.cscore:cscore-jni:$wpilibVersion:windowsx86-64"
|
|
|
|
|
|
|
|
|
|
implementation "edu.wpi.first.ntcore:ntcore-java:$wpilibVersion"
|
|
|
|
|
compile "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:linuxaarch64bionic"
|
|
|
|
|
compile "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:linuxraspbian"
|
|
|
|
|
compile "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:linuxx86-64"
|
|
|
|
|
compile "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:osxx86-64"
|
|
|
|
|
compile "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:windowsx86-64"
|
|
|
|
|
|
|
|
|
|
implementation "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:$openCVVersion"
|
|
|
|
|
compile "edu.wpi.first.thirdparty.frc2020.opencv:opencv-jni:$openCVVersion:linuxaarch64bionic"
|
|
|
|
|
compile "edu.wpi.first.thirdparty.frc2020.opencv:opencv-jni:$openCVVersion:linuxraspbian"
|
|
|
|
|
compile "edu.wpi.first.thirdparty.frc2020.opencv:opencv-jni:$openCVVersion:linuxx86-64"
|
|
|
|
|
compile "edu.wpi.first.thirdparty.frc2020.opencv:opencv-jni:$openCVVersion:osxx86-64"
|
|
|
|
|
compile "edu.wpi.first.thirdparty.frc2020.opencv:opencv-jni:$openCVVersion:windowsx86-64"
|
|
|
|
|
|
2020-06-28 10:39:14 -07:00
|
|
|
compile "org.slf4j:slf4j-simple:1.8.0-beta4"
|
Pipeline Bringup (#94)
* Refactor package structure, various cleanups
* Add pipeline classes, settings, separate enums
* updated Largest ContourSortMode and added centermost
* Add DriverPipeline classes, apply spotless
* Add crosshair to DriverMode, cleanups
* Add FrameStaticProperties as member in Frame
Add FrameStaticProperties as member in Frame
* Finish ReflectivePipeline, various tweaks
* Apply Spotless
* Move test images
* add Releasable interface, implement in classes
* add TestUtils class, move testimages
* Refactor CVPipeline, add ReflectivePipelineTest
* Fix ConcurrentModificationException bug in group contours pipe with potential targets
* Resolve memory leaks due to unnecessary instantiation of Points
* Apply spotless
* Add CVMat, ReflectionUtils to help track rogue Mats
* various cleanups, add DummyFrameConsumer
* Add logback
* Add slv4j logger to replace the current debugLogger
I'm waiting on stuff to be less skeletoned to add more
* Add perimeter, MatOfPoint2f getters to Contour
* Create CornerDetectionPipe based on old solvePNPPipe
* Add ContourShape class for approxPolyDp Start on ColoredShape tracking
* Add point detection, fix convex hull calculation in Contour
* Make Draw2dContours pipe respect showMultiple
* Update Contour.java
* Clean up draw 3d, fix convex hull bug in corner detection
* Update geometry classes
* Add lifecam calibration data
* Implement solvePNP, bounding box top and bottom
* Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing
* run spotless
* Refactor calibration into `common.calibration`
* Update .gitignore
* Add offset method to get2020Target
* Various cleanups, add PipelineType enum
* Apply spotless
Co-authored-by: ori agranat <oriagranat9@gmail.com>
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2020-04-12 18:37:14 -04:00
|
|
|
|
2020-08-14 12:39:21 -07:00
|
|
|
// Zip
|
|
|
|
|
compile "org.zeroturnaround:zt-zip:1.14"
|
|
|
|
|
|
2020-03-18 01:51:30 -04:00
|
|
|
// test stuff
|
|
|
|
|
testImplementation('org.junit.jupiter:junit-jupiter:5.6.0')
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-28 10:39:14 -07:00
|
|
|
shadowJar {
|
|
|
|
|
configurations = [project.configurations.runtimeClasspath]
|
|
|
|
|
|
|
|
|
|
archiveFileName.set("photonvision-${project.version}.jar")
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-18 01:51:30 -04:00
|
|
|
test {
|
2020-06-12 04:36:19 -04:00
|
|
|
useJUnitPlatform()
|
2020-06-12 19:58:58 -04:00
|
|
|
testLogging {
|
|
|
|
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
|
|
|
|
}
|
2020-03-28 18:38:50 -07:00
|
|
|
}
|
|
|
|
|
|
2020-06-12 04:36:19 -04:00
|
|
|
task testHeadless(type: Test) {
|
2020-06-12 04:22:44 -04:00
|
|
|
group = 'verification'
|
2020-06-12 04:36:19 -04:00
|
|
|
systemProperty("java.awt.headless", "true")
|
|
|
|
|
useJUnitPlatform()
|
2020-06-12 04:22:44 -04:00
|
|
|
}
|
|
|
|
|
|
2020-06-28 17:57:23 -04:00
|
|
|
task runNpmOnClient(type: Exec) {
|
|
|
|
|
workingDir "${projectDir}/../photon-client"
|
|
|
|
|
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
|
|
|
|
|
commandLine 'cmd', '/c', 'npm run build'
|
|
|
|
|
} else {
|
2020-07-03 11:49:08 -04:00
|
|
|
commandLine 'npm', 'run', 'build'
|
2020-06-28 17:57:23 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task copyClientUIToResources(type: Copy) {
|
|
|
|
|
from "${projectDir}/../photon-client/dist/"
|
|
|
|
|
into "${projectDir}/src/main/resources/web/"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task buildAndCopyUI {}
|
|
|
|
|
|
|
|
|
|
buildAndCopyUI.dependsOn copyClientUIToResources
|
|
|
|
|
copyClientUIToResources.dependsOn runNpmOnClient
|
|
|
|
|
copyClientUIToResources.shouldRunAfter runNpmOnClient
|
|
|
|
|
|
2020-07-07 22:10:28 +03:00
|
|
|
task generateJavaDocs(type: Javadoc) {
|
|
|
|
|
source = sourceSets.main.allJava
|
|
|
|
|
classpath = sourceSets.main.compileClasspath
|
|
|
|
|
destinationDir = file("${projectDir}/build/docs")
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-28 18:38:50 -07:00
|
|
|
spotless {
|
2020-07-02 22:02:21 -04:00
|
|
|
java {
|
|
|
|
|
googleJavaFormat()
|
|
|
|
|
paddedCell()
|
|
|
|
|
indentWithTabs(2)
|
|
|
|
|
indentWithSpaces(4)
|
|
|
|
|
removeUnusedImports()
|
|
|
|
|
}
|
|
|
|
|
java {
|
|
|
|
|
target "src/*/java/org/**/*.java"
|
|
|
|
|
licenseHeaderFile "$rootDir/LicenseHeader.txt"
|
2020-07-17 23:22:42 -07:00
|
|
|
|
|
|
|
|
targetExclude("src/main/java/org/photonvision/PhotonVersion.java")
|
2020-07-02 22:02:21 -04:00
|
|
|
}
|
2020-03-30 13:57:32 -04:00
|
|
|
}
|
2020-07-02 21:45:42 -07:00
|
|
|
|
|
|
|
|
jacocoTestReport {
|
|
|
|
|
dependsOn test // Tests are required to run before generating the report
|
|
|
|
|
|
|
|
|
|
reports {
|
|
|
|
|
xml.enabled true
|
|
|
|
|
}
|
2020-07-03 08:45:02 -07:00
|
|
|
|
|
|
|
|
afterEvaluate {
|
|
|
|
|
classDirectories.setFrom(files(classDirectories.files.collect {
|
|
|
|
|
fileTree(dir: it,
|
|
|
|
|
exclude: 'edu/wpi/**'
|
|
|
|
|
)
|
|
|
|
|
}))
|
|
|
|
|
}
|
2020-07-02 21:45:42 -07:00
|
|
|
}
|