From 5ca39e7f84504cb5baed7acf519f1d9f944767e8 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sun, 21 Nov 2021 17:22:56 -0800 Subject: [PATCH] Upgrade to Gradle 7.2 and WPILib 2022 (#316) --- photon-lib/.clang-format => .clang-format | 0 .github/CODEOWNERS | 1 - .github/workflows/main.yml | 24 +- photon-lib/.styleguide => .styleguide | 10 + ....styleguide-license => .styleguide-license | 0 LicenseHeader.txt | 1 - README.md | 4 +- build.gradle | 10 +- codecov.yml | 2 +- gradle/wrapper/gradle-wrapper.jar | Bin 58702 -> 59536 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 2 + gradlew.bat | 189 ++++++++-------- photon-client/public/index.html | 2 +- photon-client/src/App.vue | 4 +- .../src/components/common/cv-icon.vue | 2 +- .../src/components/common/cv-image.vue | 2 +- .../src/components/common/cv-input.vue | 2 +- .../src/components/common/cv-number-input.vue | 2 +- .../src/components/common/cv-radio.vue | 2 +- .../src/components/common/cv-range-slider.vue | 2 +- .../src/components/common/cv-select.vue | 2 +- .../src/components/common/cv-slider.vue | 2 +- .../src/components/common/cv-switch.vue | 2 +- .../components/common/cv-tooltipped-label.vue | 2 +- .../src/components/pipeline/3D/MiniMap.vue | 2 +- .../pipeline/CameraAndPipelineSelect.vue | 2 +- .../pipeline/OutputTab/DualCalibration.vue | 2 +- .../pipeline/OutputTab/SingleCalibration.vue | 2 +- photon-client/src/plugins/ColorPicker.js | 2 +- photon-client/src/scss/variables.scss | 2 +- photon-client/src/store/index.js | 2 +- photon-client/src/store/modules/undoRedo.js | 2 +- photon-client/src/theme.js | 2 +- photon-client/src/views/CamerasView.vue | 2 +- photon-client/src/views/PipelineView.vue | 2 +- .../src/views/PipelineViews/ContoursTab.vue | 2 +- .../src/views/PipelineViews/OutputTab.vue | 2 +- .../src/views/PipelineViews/PnPTab.vue | 4 +- .../src/views/PipelineViews/TargetsTab.vue | 2 +- .../src/views/PipelineViews/ThresholdTab.vue | 2 +- photon-client/src/views/SettingsView.vue | 2 +- .../src/views/SettingsViews/General.vue | 4 +- .../src/views/SettingsViews/Lighting.vue | 2 +- photon-core/.gitignore | 2 +- photon-core/build.gradle | 12 +- photon-core/settings.gradle | 1 - .../photonvision/common/ProgramStatus.java | 1 - .../configuration/CameraConfiguration.java | 3 +- .../common/configuration/ConfigManager.java | 1 - .../common/configuration/HardwareConfig.java | 2 - .../configuration/HardwareSettings.java | 1 - .../common/configuration/NetworkConfig.java | 1 - .../configuration/PhotonConfiguration.java | 2 - .../dataflow/CVPipelineResultConsumer.java | 1 - .../dataflow/DataChangeDestination.java | 1 - .../common/dataflow/DataChangeService.java | 2 - .../common/dataflow/DataChangeSource.java | 1 - .../common/dataflow/DataChangeSubscriber.java | 1 - .../dataflow/events/DataChangeEvent.java | 1 - .../dataflow/events/HTTPRequestEvent.java | 1 - .../events/IncomingWebSocketEvent.java | 2 - .../dataflow/events/OutgoingUIEvent.java | 1 - .../networktables/NTDataChangeListener.java | 2 - .../networktables/NTDataPublisher.java | 2 - .../networktables/NetworkTablesManager.java | 3 - .../dataflow/websocket/UIDataPublisher.java | 1 - .../common/hardware/GPIO/CustomGPIO.java | 2 - .../common/hardware/GPIO/GPIOBase.java | 1 - .../hardware/GPIO/pi/PigpioCommand.java | 1 - .../hardware/GPIO/pi/PigpioException.java | 2 - .../common/hardware/GPIO/pi/PigpioPin.java | 2 - .../common/hardware/GPIO/pi/PigpioPulse.java | 1 - .../common/hardware/GPIO/pi/PigpioSocket.java | 1 - .../hardware/GPIO/pi/PigpioSocketLock.java | 1 - .../common/hardware/HardwareManager.java | 1 - .../common/hardware/Platform.java | 3 +- .../common/hardware/StatusLED.java | 1 - .../common/hardware/VisionLED.java | 1 - .../common/hardware/metrics/CPUMetrics.java | 2 - .../common/hardware/metrics/DiskMetrics.java | 1 - .../common/hardware/metrics/GPUMetrics.java | 1 - .../common/hardware/metrics/MetricsBase.java | 1 - .../hardware/metrics/MetricsPublisher.java | 1 - .../common/hardware/metrics/RAMMetrics.java | 1 - .../photonvision/common/logging/LogGroup.java | 1 - .../photonvision/common/logging/LogLevel.java | 1 - .../photonvision/common/logging/Logger.java | 3 - .../common/networking/NetworkInterface.java | 1 - .../common/networking/NetworkManager.java | 2 - .../common/networking/NetworkMode.java | 1 - .../common/scripting/ScriptCommandType.java | 1 - .../common/scripting/ScriptConfig.java | 1 - .../common/scripting/ScriptEvent.java | 1 - .../common/scripting/ScriptEventType.java | 1 - .../common/scripting/ScriptManager.java | 3 - .../photonvision/common/util/ColorHelper.java | 1 - .../common/util/MemoryManager.java | 2 - .../common/util/ReflectionUtils.java | 2 - .../common/util/SerializationUtils.java | 1 - .../photonvision/common/util/ShellExec.java | 1 - .../photonvision/common/util/TestUtils.java | 7 +- .../common/util/TimedTaskManager.java | 2 - .../common/util/file/FileUtils.java | 2 - .../common/util/file/JacksonUtils.java | 1 - .../common/util/java/TriConsumer.java | 1 - .../common/util/math/IPUtils.java | 1 - .../common/util/math/MathUtils.java | 3 +- .../common/util/numbers/DoubleCouple.java | 2 - .../common/util/numbers/IntegerCouple.java | 2 - .../common/util/numbers/NumberCouple.java | 2 - .../common/util/numbers/NumberListUtils.java | 2 - .../java/org/photonvision/raspi/PicamJNI.java | 2 - .../CameraCalibrationCoefficients.java | 1 - .../vision/calibration/JsonMat.java | 1 - .../vision/camera/CameraQuirk.java | 1 - .../vision/camera/CameraType.java | 1 - .../vision/camera/FileVisionSource.java | 7 +- .../vision/camera/QuirkyCamera.java | 2 - .../vision/camera/USBCameraSource.java | 9 +- .../vision/camera/ZeroCopyPicamSource.java | 4 +- .../org/photonvision/vision/frame/Frame.java | 3 +- .../vision/frame/FrameConsumer.java | 1 - .../vision/frame/FrameDivisor.java | 1 - .../vision/frame/FrameProvider.java | 1 - .../vision/frame/FrameStaticProperties.java | 6 +- .../frame/consumer/DummyFrameConsumer.java | 1 - .../frame/consumer/FileSaveFrameConsumer.java | 3 - .../frame/consumer/MJPGFrameConsumer.java | 14 +- .../AcceleratedPicamFrameProvider.java | 2 - .../frame/provider/FileFrameProvider.java | 3 +- .../frame/provider/NetworkFrameProvider.java | 1 - .../frame/provider/USBFrameProvider.java | 3 +- .../org/photonvision/vision/opencv/CVMat.java | 1 - .../photonvision/vision/opencv/CVShape.java | 1 - .../photonvision/vision/opencv/Contour.java | 2 - .../vision/opencv/ContourGroupingMode.java | 1 - .../opencv/ContourIntersectionDirection.java | 1 - .../vision/opencv/ContourShape.java | 1 - .../vision/opencv/ContourSortMode.java | 1 - .../photonvision/vision/opencv/DualMat.java | 1 - .../vision/opencv/DualOffsetValues.java | 1 - .../vision/opencv/ImageFlipMode.java | 1 - .../vision/opencv/ImageRotationMode.java | 1 - .../vision/opencv/Releasable.java | 1 - .../org/photonvision/vision/pipe/CVPipe.java | 2 - .../vision/pipe/MutatingPipe.java | 1 - .../vision/pipe/impl/BlurPipe.java | 1 - .../vision/pipe/impl/CalculateFPSPipe.java | 4 +- .../vision/pipe/impl/Calibrate3dPipe.java | 2 - .../pipe/impl/Collect2dTargetsPipe.java | 2 - .../vision/pipe/impl/CornerDetectionPipe.java | 4 +- .../vision/pipe/impl/Draw2dCrosshairPipe.java | 2 - .../vision/pipe/impl/Draw2dTargetsPipe.java | 4 - .../vision/pipe/impl/Draw3dTargetsPipe.java | 3 - .../pipe/impl/DrawCornerDetectionPipe.java | 2 - .../vision/pipe/impl/ErodeDilatePipe.java | 1 - .../vision/pipe/impl/FilterContoursPipe.java | 2 - .../vision/pipe/impl/FilterShapesPipe.java | 2 - .../pipe/impl/FindBoardCornersPipe.java | 4 - .../vision/pipe/impl/FindCirclesPipe.java | 2 - .../vision/pipe/impl/FindContoursPipe.java | 2 - .../vision/pipe/impl/FindPolygonPipe.java | 2 - .../pipe/impl/GPUAcceleratedHSVPipe.java | 3 - .../vision/pipe/impl/GroupContoursPipe.java | 2 - .../vision/pipe/impl/HSVPipe.java | 1 - .../vision/pipe/impl/OutputMatPipe.java | 2 - .../vision/pipe/impl/ResizeImagePipe.java | 2 - .../vision/pipe/impl/RotateImagePipe.java | 2 - .../vision/pipe/impl/SolvePNPPipe.java | 8 +- .../vision/pipe/impl/SortContoursPipe.java | 2 - .../vision/pipe/impl/SpeckleRejectPipe.java | 2 - .../pipeline/AdvancedPipelineSettings.java | 2 - .../vision/pipeline/CVPipeline.java | 1 - .../vision/pipeline/CVPipelineSettings.java | 1 - .../vision/pipeline/Calibrate3dPipeline.java | 4 +- .../Calibration3dPipelineSettings.java | 3 +- .../vision/pipeline/ColoredShapePipeline.java | 3 - .../ColoredShapePipelineSettings.java | 1 - .../vision/pipeline/DriverModePipeline.java | 2 - .../pipeline/DriverModePipelineSettings.java | 1 - .../vision/pipeline/OutputStreamPipeline.java | 3 - .../vision/pipeline/PipelineProfiler.java | 2 - .../vision/pipeline/PipelineType.java | 1 - .../vision/pipeline/ReflectivePipeline.java | 3 - .../pipeline/ReflectivePipelineSettings.java | 1 - .../vision/pipeline/UICalibrationData.java | 1 - .../vision/pipeline/result/BytePackable.java | 1 - .../pipeline/result/CVPipelineResult.java | 1 - .../result/DriverModePipelineResult.java | 1 - .../photonvision/vision/processes/Data.java | 1 - .../vision/processes/PipelineManager.java | 1 - .../vision/processes/VisionModule.java | 6 +- .../VisionModuleChangeSubscriber.java | 2 - .../vision/processes/VisionModuleManager.java | 2 - .../vision/processes/VisionRunner.java | 2 - .../vision/processes/VisionSource.java | 2 - .../vision/processes/VisionSourceManager.java | 6 +- .../processes/VisionSourceSettables.java | 5 +- .../vision/target/PotentialTarget.java | 1 - .../vision/target/RobotOffsetPointMode.java | 1 - .../target/RobotOffsetPointOperation.java | 1 - .../vision/target/TargetCalculations.java | 1 - .../vision/target/TargetModel.java | 3 +- .../vision/target/TargetOffsetPointEdge.java | 1 - .../vision/target/TargetOrientation.java | 1 - .../vision/target/TrackedTarget.java | 3 +- .../photonvision/common/BenchmarkTest.java | 1 - .../common/ShapeBenchmarkTest.java | 1 - .../common/configuration/ConfigTest.java | 3 - .../configuration/NetworkConfigTest.java | 1 - .../common/util/LogFileManagementTest.java | 3 - .../common/util/TimedTaskManagerTest.java | 2 - .../hardware/HardwareConfigTest.java | 2 - .../hardware/HardwareManagerTest.java | 2 - .../photonvision/hardware/HardwareTest.java | 2 - .../photonvision/vision/QuirkyCameraTest.java | 1 - .../AcceleratedPicamFrameProviderTest.java | 1 - .../frame/provider/FileFrameProviderTest.java | 5 +- .../vision/opencv/ContourTest.java | 1 - .../vision/pipeline/Calibrate3dPipeTest.java | 11 +- .../vision/pipeline/CirclePNPTest.java | 4 +- .../pipeline/ColoredShapePipelineTest.java | 3 - .../vision/pipeline/PipelineProfilerTest.java | 2 - .../pipeline/ReflectivePipelineTest.java | 2 - .../vision/pipeline/SolvePNPTest.java | 6 +- .../vision/processes/PipelineManagerTest.java | 2 - .../processes/VisionModuleManagerTest.java | 8 +- .../processes/VisionSourceManagerTest.java | 3 +- .../vision/target/TargetCalculationsTest.java | 3 +- .../vision/target/TrackedTargetTest.java | 1 - photon-lib/build.gradle | 8 +- .../java/org/photonvision/PhotonCamera.java | 1 - .../photonvision/PhotonTargetSortMode.java | 1 - .../java/org/photonvision/PhotonUtils.java | 11 +- .../org/photonvision/SimPhotonCamera.java | 1 - .../org/photonvision/SimVisionSystem.java | 7 +- .../org/photonvision/SimVisionTarget.java | 3 +- .../native/cpp/photonlib/PhotonCamera.cpp | 2 +- .../cpp/photonlib/PhotonPipelineResult.cpp | 4 +- .../cpp/photonlib/PhotonTrackedTarget.cpp | 6 +- .../native/cpp/photonlib/SimPhotonCamera.cpp | 6 +- .../native/cpp/photonlib/SimVisionSystem.cpp | 25 +-- .../include/photonlib/PhotonPipelineResult.h | 11 +- .../include/photonlib/SimPhotonCamera.h | 4 +- .../include/photonlib/SimVisionSystem.h | 1 - .../java/org/photonvision/PacketTest.java | 7 +- .../org/photonvision/PhotonCameraTest.java | 1 - .../java/org/photonvision/PhotonUtilTest.java | 9 +- .../org/photonvision/PhotonVersionTest.java | 1 - .../org/photonvision/SimVisionSystemTest.java | 13 +- .../test/native/cpp/SimVisionSystemTest.cpp | 6 +- photon-server/.gitignore | 2 +- photon-server/build.gradle | 7 +- photon-server/netTest.json | 2 +- photon-server/settings.gradle | 1 - .../src/main/java/org/photonvision/Main.java | 3 +- .../photonvision/server/RequestHandler.java | 4 +- .../java/org/photonvision/server/Server.java | 2 - .../photonvision/server/SocketHandler.java | 2 - .../server/SocketMessageType.java | 1 - .../server/UIInboundSubscriber.java | 2 - .../server/UIOutboundSubscriber.java | 1 - .../org/photonvision/server/UISettings.java | 1 - .../resources/calibration/lifecam240p.json | 2 +- .../resources/calibration/lifecam480p.json | 2 +- photon-server/test.json | 2 +- photon-targeting/.gitignore | 2 +- photon-targeting/settings.gradle | 1 - .../common/dataflow/structures/Packet.java | 1 - .../common/hardware/VisionLEDMode.java | 1 - .../targeting/PhotonPipelineResult.java | 2 - .../targeting/PhotonTrackedTarget.java | 7 +- photonlib-cpp-examples/build.gradle | 4 +- photonlib-cpp-examples/settings.gradle | 2 +- .../cpp/examples/aimandrange/cpp/Robot.cpp | 30 ++- .../cpp/examples/aimandrange/include/Robot.h | 10 +- .../cpp/examples/aimattarget/cpp/Robot.cpp | 12 +- .../cpp/examples/aimattarget/include/Robot.h | 10 +- .../cpp/examples/getinrange/cpp/Robot.cpp | 14 +- .../cpp/examples/getinrange/include/Robot.h | 10 +- .../cpp/examples/simaimandrange/cpp/Robot.cpp | 36 ++- .../simaimandrange/cpp/sim/DrivetrainSim.cpp | 86 +++---- .../simaimandrange/include/DrivetrainSim.h | 212 +++++++++--------- .../examples/simaimandrange/include/Robot.h | 14 +- photonlib-java-examples/build.gradle | 58 +++-- .../src/dev/native/cpp/main.cpp | 26 ++- .../photonlib/examples/aimandrange/Main.java | 1 - .../photonlib/examples/aimandrange/Robot.java | 16 +- .../photonlib/examples/aimattarget/Main.java | 1 - .../photonlib/examples/aimattarget/Robot.java | 14 +- .../java/org/photonlib/examples/examples.json | 2 +- .../photonlib/examples/getinrange/Main.java | 1 - .../photonlib/examples/getinrange/Robot.java | 14 +- .../examples/simaimandrange/Main.java | 1 - .../examples/simaimandrange/Robot.java | 16 +- .../simaimandrange/sim/DrivetrainSim.java | 25 +-- .../photonlib/examples/simposeest/Main.java | 1 - .../simposeest/robot/AutoController.java | 18 +- .../examples/simposeest/robot/Constants.java | 12 +- .../examples/simposeest/robot/Drivetrain.java | 22 +- .../robot/DrivetrainPoseEstimator.java | 23 +- .../simposeest/robot/OperatorInterface.java | 8 +- .../simposeest/robot/PoseTelemetry.java | 4 +- .../examples/simposeest/robot/Robot.java | 6 +- .../simposeest/sim/DrivetrainSim.java | 21 +- scripts/install.sh | 12 +- scripts/uninstall.sh | 2 +- shared/PhotonVersion.java.in | 1 - shared/common.gradle | 35 +-- shared/config.gradle | 6 +- test-resources/calibration/lifecam240p.json | 2 +- test-resources/calibration/lifecam480p.json | 2 +- test-resources/hardware/HardwareConfig.json | 2 +- test-resources/testimages/2019/WPI/info.txt | 2 +- test-resources/testimages/2020/WPI/info.txt | 2 +- 316 files changed, 671 insertions(+), 1019 deletions(-) rename photon-lib/.clang-format => .clang-format (100%) rename photon-lib/.styleguide => .styleguide (68%) rename photon-lib/.styleguide-license => .styleguide-license (100%) diff --git a/photon-lib/.clang-format b/.clang-format similarity index 100% rename from photon-lib/.clang-format rename to .clang-format diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ede118092..0447d729a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,2 @@ # These owners will be the default owners for everything in the repo. * @PhotonVision/program-devs - diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 81525fadb..b17f36f8c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: steps: # Checkout code. - uses: actions/checkout@v1 - + # Setup Node.js - name: Setup Node.js uses: actions/setup-node@v1 @@ -61,7 +61,7 @@ jobs: # Fetch tags. - name: Fetch tags run: git fetch --tags --force - + # Install Java 11. - name: Install Java 11 uses: actions/setup-java@v1 @@ -81,7 +81,7 @@ jobs: # Generate Coverage Report. - name: Gradle Coverage run: ./gradlew jacocoTestReport --max-workers 1 - + # Publish Coverage Report. - name: Publish Server Coverage Report uses: codecov/codecov-action@v1 @@ -107,18 +107,18 @@ jobs: - uses: actions/setup-python@v2 with: python-version: '3.6' - + - name: Install dependencies run: | python -m pip install --upgrade pip pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8 pip install -r requirements.txt - + - name: Check the docs run: | make linkcheck make lint - + - name: Build the docs run: | make html @@ -132,7 +132,7 @@ jobs: photonserver-check-lint: # The type of runner that the job will run on. runs-on: ubuntu-latest - + steps: # Checkout code. - uses: actions/checkout@v1 @@ -141,7 +141,7 @@ jobs: - uses: actions/setup-java@v1 with: java-version: 11 - + # Check server code with Spotless. - run: | chmod +x gradlew @@ -241,11 +241,14 @@ jobs: with: python-version: 3.8 - name: Install clang-format - run: sudo apt-get update -q && sudo apt-get install clang-format-10 + run: | + sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe' >> /etc/apt/sources.list.d/proposed-repositories.list" + sudo apt-get update -q + sudo apt-get install -y clang-format-12 - name: Install wpiformat run: pip3 install wpiformat - name: Run - run: wpiformat -clang 10 -f photon-lib + run: wpiformat -clang 12 - name: Check Output run: git --no-pager diff --exit-code HEAD - name: Generate diff @@ -308,4 +311,3 @@ jobs: files: | photon-server/build/libs/*.jar if: github.event_name == 'push' - diff --git a/photon-lib/.styleguide b/.styleguide similarity index 68% rename from photon-lib/.styleguide rename to .styleguide index 02c108125..f9de9008f 100644 --- a/photon-lib/.styleguide +++ b/.styleguide @@ -9,6 +9,12 @@ cppSrcFileInclude { \.cpp$ } +modifiableFileExclude { + \.jpg$ + \.png$ + \.so$ +} + includeProject { ^photonLib/ } @@ -19,3 +25,7 @@ includeOtherLibs { ^units/ ^wpi/ } + +licenseUpdateExclude { + \.java$ +} diff --git a/photon-lib/.styleguide-license b/.styleguide-license similarity index 100% rename from photon-lib/.styleguide-license rename to .styleguide-license diff --git a/LicenseHeader.txt b/LicenseHeader.txt index d71928640..bcc3fc01e 100644 --- a/LicenseHeader.txt +++ b/LicenseHeader.txt @@ -14,4 +14,3 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - diff --git a/README.md b/README.md index cdb25af12..2df548766 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ A list of contributors is available in our documentation on ReadTheDocs. PhotonVision was forked from [Chameleon Vision](https://github.com/Chameleon-Vision/chameleon-vision/). Thank you to everyone who worked on the original project. -* [WPILib](https://github.com/wpilibsuite) - Specifically [cscore](https://github.com/wpilibsuite/allwpilib/tree/master/cscore), [CameraServer](https://github.com/wpilibsuite/allwpilib/tree/master/cameraserver), [NTCore](https://github.com/wpilibsuite/allwpilib/tree/master/ntcore), and [OpenCV](https://github.com/wpilibsuite/thirdparty-opencv). +* [WPILib](https://github.com/wpilibsuite) - Specifically [cscore](https://github.com/wpilibsuite/allwpilib/tree/master/cscore), [CameraServer](https://github.com/wpilibsuite/allwpilib/tree/master/cameraserver), [NTCore](https://github.com/wpilibsuite/allwpilib/tree/master/ntcore), and [OpenCV](https://github.com/wpilibsuite/thirdparty-opencv). * [Apache Commons](https://commons.apache.org/) - Specifically [Commons Math](https://commons.apache.org/proper/commons-math/), and [Commons Lang](https://commons.apache.org/proper/commons-lang/) @@ -27,5 +27,5 @@ PhotonVision was forked from [Chameleon Vision](https://github.com/Chameleon-Vis * [FasterXML](https://github.com/FasterXML) - Specifically [jackson](https://github.com/FasterXML/jackson) -## License +## License PhotonVision is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/build.gradle b/build.gradle index 978b93278..4e59baaf7 100644 --- a/build.gradle +++ b/build.gradle @@ -2,9 +2,9 @@ plugins { id "com.diffplug.gradle.spotless" version "3.28.0" id "com.github.johnrengelman.shadow" version "5.2.0" id "com.github.node-gradle.node" version "2.2.4" apply false - id "edu.wpi.first.GradleJni" version "0.10.1" - id "edu.wpi.first.GradleVsCode" version "0.12.0" - id "edu.wpi.first.NativeUtils" version "2021.1.1" apply false + id "edu.wpi.first.GradleJni" version "1.0.0" + id "edu.wpi.first.GradleVsCode" version "1.0.0" + id "edu.wpi.first.NativeUtils" version "2022.4.4" apply false id "edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin" version "2020.2" id "org.hidetake.ssh" version "2.10.1" } @@ -22,8 +22,8 @@ allprojects { apply from: "versioningHelper.gradle" ext { - wpilibVersion = "2021.3.1" - opencvVersion = "3.4.7-5" + wpilibVersion = "2022.1.1-beta-2" + opencvVersion = "4.5.2-1" joglVersion = "2.4.0-rc-20200307" pubVersion = versionString isDev = pubVersion.startsWith("dev") diff --git a/codecov.yml b/codecov.yml index 66c42bd18..cbefb2da2 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,4 +2,4 @@ coverage: # Turning off commit status to prevent failed checks if coverage decreases status: project: no - patch: no + patch: no diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index cc4fdc293d0e50b0ad9b65c16e7ddd1db2f6025b..7454180f2ae8848c63b8b4dea2cb829da983f2fa 100644 GIT binary patch delta 22213 zcmY&f^Lv;LkW6FSwr$(CZQFWd+qP{tw$UU_lg73h(fq;mlI-6jo_Cv#@*1%8!J8F0u=wFVUx#1RQs?yZxy26{dpcEQ( zur_vj#JIS!6zJl$^Az0(n~c3(8^Yfaf-k=^`%hC>u#9-gL_I13RN(@|RpB z1)fm@-C?;2Qm4APp10ikZ+cHI|55?KC-flQ%cMA{6MG59$a0)?D#uiw!ypgZ$(<#D zmeNJ6#hB9-wnQ0cvL!q}s7G1i&F5-Dcy30T2xG&Dm&NWpHi#}ZdPj?~$L5a7Kaf)W z(svm(TeFav8D2<3ZIw}6OpmX!7i`SkzCO<4wCcfc*njSaVWeIQ(TfYM6;5dQG!}EU zTC?dFW`ycEICvihta)DT@{b(-`T-6Uz_mDKkno?UN87m#d5)$3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}W&d5ccxF_w9Lpo_Vw=2c`(Zi@d;D7ztppgnvZ;on*Ptmc9Q4OP4gjnPKNT z(NT2gPvF8p@q$il#5w4R(*$qEoQsP%S=hhdjINUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/photon-client/public/index.html b/photon-client/public/index.html index f2431c6ae..9e16f901d 100644 --- a/photon-client/public/index.html +++ b/photon-client/public/index.html @@ -17,4 +17,4 @@ - \ No newline at end of file + diff --git a/photon-client/src/App.vue b/photon-client/src/App.vue index a79c8f8bd..fb7a93870 100644 --- a/photon-client/src/App.vue +++ b/photon-client/src/App.vue @@ -214,7 +214,7 @@ import Logs from "./views/LogsView" if (key === "logMessage") { this.logMessage(value["logMessage"], value["logLevel"]); } else if(key === "log"){ - this.logMessage(value["logMessage"]["logMessage"], value["logMessage"]["logLevel"]); + this.logMessage(value["logMessage"]["logMessage"], value["logMessage"]["logLevel"]); } else if (key === "updatePipelineResult") { this.$store.commit('mutatePipelineResults', value) } else if (this.$store.state.hasOwnProperty(key)) { @@ -343,4 +343,4 @@ import Logs from "./views/LogsView" font-size: 14px !important; } } - \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-icon.vue b/photon-client/src/components/common/cv-icon.vue index bf48d65fc..bff41be36 100644 --- a/photon-client/src/components/common/cv-icon.vue +++ b/photon-client/src/components/common/cv-icon.vue @@ -51,4 +51,4 @@ .hover:hover { color: white !important; } - \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-image.vue b/photon-client/src/components/common/cv-image.vue index 4a5d82421..e654466ea 100644 --- a/photon-client/src/components/common/cv-image.vue +++ b/photon-client/src/components/common/cv-image.vue @@ -59,4 +59,4 @@ } }, } - \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-input.vue b/photon-client/src/components/common/cv-input.vue index 8675035eb..256cb9f08 100644 --- a/photon-client/src/components/common/cv-input.vue +++ b/photon-client/src/components/common/cv-input.vue @@ -61,4 +61,4 @@ s \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-number-input.vue b/photon-client/src/components/common/cv-number-input.vue index 7448a7392..8cd3d244d 100644 --- a/photon-client/src/components/common/cv-number-input.vue +++ b/photon-client/src/components/common/cv-number-input.vue @@ -54,4 +54,4 @@ \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-radio.vue b/photon-client/src/components/common/cv-radio.vue index 292d52c2d..98963deb5 100644 --- a/photon-client/src/components/common/cv-radio.vue +++ b/photon-client/src/components/common/cv-radio.vue @@ -41,4 +41,4 @@ \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-range-slider.vue b/photon-client/src/components/common/cv-range-slider.vue index 1d25962a2..235c231bf 100644 --- a/photon-client/src/components/common/cv-range-slider.vue +++ b/photon-client/src/components/common/cv-range-slider.vue @@ -129,4 +129,4 @@ export default { \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-select.vue b/photon-client/src/components/common/cv-select.vue index 145bf1779..02364dcc2 100644 --- a/photon-client/src/components/common/cv-select.vue +++ b/photon-client/src/components/common/cv-select.vue @@ -62,4 +62,4 @@ import TooltippedLabel from "./cv-tooltipped-label"; \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-slider.vue b/photon-client/src/components/common/cv-slider.vue index ecb5a5d2c..2c7c8d639 100644 --- a/photon-client/src/components/common/cv-slider.vue +++ b/photon-client/src/components/common/cv-slider.vue @@ -105,4 +105,4 @@ export default { \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-switch.vue b/photon-client/src/components/common/cv-switch.vue index 69b080233..19c15e91a 100644 --- a/photon-client/src/components/common/cv-switch.vue +++ b/photon-client/src/components/common/cv-switch.vue @@ -48,4 +48,4 @@ export default { \ No newline at end of file + diff --git a/photon-client/src/components/common/cv-tooltipped-label.vue b/photon-client/src/components/common/cv-tooltipped-label.vue index 8509018db..e21a1a8f2 100644 --- a/photon-client/src/components/common/cv-tooltipped-label.vue +++ b/photon-client/src/components/common/cv-tooltipped-label.vue @@ -24,4 +24,4 @@ // eslint-disable-next-line vue/require-prop-types props: ['text', 'tooltip'], } - \ No newline at end of file + diff --git a/photon-client/src/components/pipeline/3D/MiniMap.vue b/photon-client/src/components/pipeline/3D/MiniMap.vue index d17897b3a..9b2c68620 100644 --- a/photon-client/src/components/pipeline/3D/MiniMap.vue +++ b/photon-client/src/components/pipeline/3D/MiniMap.vue @@ -151,4 +151,4 @@ width: 80px; text-align: center; } - \ No newline at end of file + diff --git a/photon-client/src/components/pipeline/CameraAndPipelineSelect.vue b/photon-client/src/components/pipeline/CameraAndPipelineSelect.vue index 78e5b9553..5b4b986fa 100644 --- a/photon-client/src/components/pipeline/CameraAndPipelineSelect.vue +++ b/photon-client/src/components/pipeline/CameraAndPipelineSelect.vue @@ -405,4 +405,4 @@ export default { \ No newline at end of file + diff --git a/photon-client/src/components/pipeline/OutputTab/DualCalibration.vue b/photon-client/src/components/pipeline/OutputTab/DualCalibration.vue index 8348a6bd8..854e604d2 100644 --- a/photon-client/src/components/pipeline/OutputTab/DualCalibration.vue +++ b/photon-client/src/components/pipeline/OutputTab/DualCalibration.vue @@ -60,4 +60,4 @@ \ No newline at end of file + diff --git a/photon-client/src/components/pipeline/OutputTab/SingleCalibration.vue b/photon-client/src/components/pipeline/OutputTab/SingleCalibration.vue index 8c21279bb..0b4184b31 100644 --- a/photon-client/src/components/pipeline/OutputTab/SingleCalibration.vue +++ b/photon-client/src/components/pipeline/OutputTab/SingleCalibration.vue @@ -45,4 +45,4 @@ \ No newline at end of file + diff --git a/photon-client/src/plugins/ColorPicker.js b/photon-client/src/plugins/ColorPicker.js index 0078b058a..1c0bd0c74 100644 --- a/photon-client/src/plugins/ColorPicker.js +++ b/photon-client/src/plugins/ColorPicker.js @@ -122,4 +122,4 @@ function shrinkRange(range, color) { } -export default {initColorPicker, colorPickerClick, eyeDrop, expand, shrink} \ No newline at end of file +export default {initColorPicker, colorPickerClick, eyeDrop, expand, shrink} diff --git a/photon-client/src/scss/variables.scss b/photon-client/src/scss/variables.scss index 459264fae..f5b8f71dc 100644 --- a/photon-client/src/scss/variables.scss +++ b/photon-client/src/scss/variables.scss @@ -5,4 +5,4 @@ $body-font-family: $default-font; $heading-font-family: $default-font; .v-application { font-family: $default-font !important; -} \ No newline at end of file +} diff --git a/photon-client/src/store/index.js b/photon-client/src/store/index.js index efe859384..2ba1123ff 100644 --- a/photon-client/src/store/index.js +++ b/photon-client/src/store/index.js @@ -247,4 +247,4 @@ export default new Vuex.Store({ calibrationList: state => state.cameraSettings[state.currentCameraIndex].calibrations, pipelineType: state => state.cameraSettings[state.currentCameraIndex].currentPipelineSettings.pipelineType } -}) \ No newline at end of file +}) diff --git a/photon-client/src/store/modules/undoRedo.js b/photon-client/src/store/modules/undoRedo.js index 8e502f9df..ac89db508 100644 --- a/photon-client/src/store/modules/undoRedo.js +++ b/photon-client/src/store/modules/undoRedo.js @@ -69,4 +69,4 @@ export default { } } -}; \ No newline at end of file +}; diff --git a/photon-client/src/theme.js b/photon-client/src/theme.js index 2f4c333fc..a7e425c53 100644 --- a/photon-client/src/theme.js +++ b/photon-client/src/theme.js @@ -5,4 +5,4 @@ const theme = Object.freeze({ background: "#232C37", }); -export default theme; \ No newline at end of file +export default theme; diff --git a/photon-client/src/views/CamerasView.vue b/photon-client/src/views/CamerasView.vue index adaeb1462..d9256023c 100644 --- a/photon-client/src/views/CamerasView.vue +++ b/photon-client/src/views/CamerasView.vue @@ -563,4 +563,4 @@ export default { .v-data-table th, td { font-size: 1rem !important; } - \ No newline at end of file + diff --git a/photon-client/src/views/PipelineView.vue b/photon-client/src/views/PipelineView.vue index 9d69b8efa..cda3f3032 100644 --- a/photon-client/src/views/PipelineView.vue +++ b/photon-client/src/views/PipelineView.vue @@ -469,4 +469,4 @@ th { width: 80px; text-align: center; } - \ No newline at end of file + diff --git a/photon-client/src/views/PipelineViews/ContoursTab.vue b/photon-client/src/views/PipelineViews/ContoursTab.vue index eb3027f8e..671f5fe2f 100644 --- a/photon-client/src/views/PipelineViews/ContoursTab.vue +++ b/photon-client/src/views/PipelineViews/ContoursTab.vue @@ -285,4 +285,4 @@ export default { \ No newline at end of file + diff --git a/photon-client/src/views/PipelineViews/OutputTab.vue b/photon-client/src/views/PipelineViews/OutputTab.vue index ca5556705..807ea3c98 100644 --- a/photon-client/src/views/PipelineViews/OutputTab.vue +++ b/photon-client/src/views/PipelineViews/OutputTab.vue @@ -156,4 +156,4 @@ \ No newline at end of file + diff --git a/photon-client/src/views/PipelineViews/PnPTab.vue b/photon-client/src/views/PipelineViews/PnPTab.vue index 2543e9b2b..629e853de 100644 --- a/photon-client/src/views/PipelineViews/PnPTab.vue +++ b/photon-client/src/views/PipelineViews/PnPTab.vue @@ -60,7 +60,7 @@ }, data() { return { - targetList: ['2020 High Goal Outer', '2020 High Goal Inner', '2019 Dual Target', 'Power Cell (7in)', '2016 High Goal'], //Keep in sync with TargetModel.java + targetList: ['2020 High Goal Outer', '2020 High Goal Inner', '2019 Dual Target', 'Power Cell (7in)', '2016 High Goal'], //Keep in sync with TargetModel.java snackbar: { color: "Success", text: "" @@ -155,4 +155,4 @@ margin-left: auto; margin-right: auto; } - \ No newline at end of file + diff --git a/photon-client/src/views/PipelineViews/TargetsTab.vue b/photon-client/src/views/PipelineViews/TargetsTab.vue index 248b54b02..d3f22d654 100644 --- a/photon-client/src/views/PipelineViews/TargetsTab.vue +++ b/photon-client/src/views/PipelineViews/TargetsTab.vue @@ -97,4 +97,4 @@ .v-data-table td { font-family: monospace !important; } - \ No newline at end of file + diff --git a/photon-client/src/views/PipelineViews/ThresholdTab.vue b/photon-client/src/views/PipelineViews/ThresholdTab.vue index 99853896d..eaf25bd3c 100644 --- a/photon-client/src/views/PipelineViews/ThresholdTab.vue +++ b/photon-client/src/views/PipelineViews/ThresholdTab.vue @@ -232,4 +232,4 @@ export default { } } - \ No newline at end of file + diff --git a/photon-client/src/views/SettingsView.vue b/photon-client/src/views/SettingsView.vue index 67375ab61..0c8731030 100644 --- a/photon-client/src/views/SettingsView.vue +++ b/photon-client/src/views/SettingsView.vue @@ -85,4 +85,4 @@ height: auto !important; vertical-align: middle; } - \ No newline at end of file + diff --git a/photon-client/src/views/SettingsViews/General.vue b/photon-client/src/views/SettingsViews/General.vue index 6ff78cf35..4dcc757e9 100644 --- a/photon-client/src/views/SettingsViews/General.vue +++ b/photon-client/src/views/SettingsViews/General.vue @@ -234,7 +234,7 @@ export default { this.snackbar = { color: "error", text: "Error while uploading settings file! Could not process provided file.", - }; + }; } else if (err.request) { this.snackbar = { color: "error", @@ -276,4 +276,4 @@ export default { border-right: 1px solid; } - \ No newline at end of file + diff --git a/photon-client/src/views/SettingsViews/Lighting.vue b/photon-client/src/views/SettingsViews/Lighting.vue index ed6235f65..e65ac8d58 100644 --- a/photon-client/src/views/SettingsViews/Lighting.vue +++ b/photon-client/src/views/SettingsViews/Lighting.vue @@ -41,4 +41,4 @@ \ No newline at end of file + diff --git a/photon-core/.gitignore b/photon-core/.gitignore index 933a7e534..bad380c87 100644 --- a/photon-core/.gitignore +++ b/photon-core/.gitignore @@ -10,4 +10,4 @@ build/* photonvision/* photonvision_config/* -src/main/java/org/photonvision/PhotonVersion.java \ No newline at end of file +src/main/java/org/photonvision/PhotonVersion.java diff --git a/photon-core/build.gradle b/photon-core/build.gradle index 520f932d7..1e6550b1b 100644 --- a/photon-core/build.gradle +++ b/photon-core/build.gradle @@ -11,11 +11,11 @@ dependencies { implementation 'org.msgpack:jackson-dataformat-msgpack:0.8.20' // wpiutil - compile "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:linuxaarch64bionic" - compile "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:linuxraspbian" - compile "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:linuxx86-64" - compile "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:osxx86-64" - compile "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:windowsx86-64" + implementation "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:linuxaarch64bionic" + implementation "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:linuxraspbian" + implementation "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:linuxx86-64" + implementation "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:osxx86-64" + implementation "edu.wpi.first.wpiutil:wpiutil-jni:$wpilibVersion:windowsx86-64" // JOGL stuff (currently we only distribute for aarch64, which is Pi 4) implementation "org.jogamp.gluegen:gluegen-rt:$joglVersion" @@ -25,7 +25,7 @@ dependencies { implementation "org.jogamp.jogl:jogl-all:$joglVersion:natives-linux-aarch64" // Zip - compile 'org.zeroturnaround:zt-zip:1.14' + implementation 'org.zeroturnaround:zt-zip:1.14' } task writeCurrentVersionJava { diff --git a/photon-core/settings.gradle b/photon-core/settings.gradle index 0533be7ae..993c9de12 100644 --- a/photon-core/settings.gradle +++ b/photon-core/settings.gradle @@ -1,2 +1 @@ rootProject.name = 'photon-core' - diff --git a/photon-core/src/main/java/org/photonvision/common/ProgramStatus.java b/photon-core/src/main/java/org/photonvision/common/ProgramStatus.java index a1ba6d091..1ad650315 100644 --- a/photon-core/src/main/java/org/photonvision/common/ProgramStatus.java +++ b/photon-core/src/main/java/org/photonvision/common/ProgramStatus.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common; public enum ProgramStatus { diff --git a/photon-core/src/main/java/org/photonvision/common/configuration/CameraConfiguration.java b/photon-core/src/main/java/org/photonvision/common/configuration/CameraConfiguration.java index 46cc14bba..80efdb84f 100644 --- a/photon-core/src/main/java/org/photonvision/common/configuration/CameraConfiguration.java +++ b/photon-core/src/main/java/org/photonvision/common/configuration/CameraConfiguration.java @@ -14,13 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.configuration; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import edu.wpi.first.wpilibj.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Rotation2d; import java.util.ArrayList; import java.util.List; import org.photonvision.common.logging.LogGroup; diff --git a/photon-core/src/main/java/org/photonvision/common/configuration/ConfigManager.java b/photon-core/src/main/java/org/photonvision/common/configuration/ConfigManager.java index 2492ac7a7..68629432f 100644 --- a/photon-core/src/main/java/org/photonvision/common/configuration/ConfigManager.java +++ b/photon-core/src/main/java/org/photonvision/common/configuration/ConfigManager.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.configuration; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/photon-core/src/main/java/org/photonvision/common/configuration/HardwareConfig.java b/photon-core/src/main/java/org/photonvision/common/configuration/HardwareConfig.java index 5272f4072..2d55d26c1 100644 --- a/photon-core/src/main/java/org/photonvision/common/configuration/HardwareConfig.java +++ b/photon-core/src/main/java/org/photonvision/common/configuration/HardwareConfig.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.configuration; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -24,7 +23,6 @@ import java.util.List; @JsonIgnoreProperties(ignoreUnknown = true) public class HardwareConfig { - public final String deviceName; public final String deviceLogoPath; public final String supportURL; diff --git a/photon-core/src/main/java/org/photonvision/common/configuration/HardwareSettings.java b/photon-core/src/main/java/org/photonvision/common/configuration/HardwareSettings.java index f5578bb74..d55e01630 100644 --- a/photon-core/src/main/java/org/photonvision/common/configuration/HardwareSettings.java +++ b/photon-core/src/main/java/org/photonvision/common/configuration/HardwareSettings.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.configuration; public class HardwareSettings { diff --git a/photon-core/src/main/java/org/photonvision/common/configuration/NetworkConfig.java b/photon-core/src/main/java/org/photonvision/common/configuration/NetworkConfig.java index d7bd833c0..32afad3e1 100644 --- a/photon-core/src/main/java/org/photonvision/common/configuration/NetworkConfig.java +++ b/photon-core/src/main/java/org/photonvision/common/configuration/NetworkConfig.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.configuration; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/photon-core/src/main/java/org/photonvision/common/configuration/PhotonConfiguration.java b/photon-core/src/main/java/org/photonvision/common/configuration/PhotonConfiguration.java index 429327719..e7dc3b7a9 100644 --- a/photon-core/src/main/java/org/photonvision/common/configuration/PhotonConfiguration.java +++ b/photon-core/src/main/java/org/photonvision/common/configuration/PhotonConfiguration.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.configuration; import java.util.Collection; @@ -32,7 +31,6 @@ import org.photonvision.vision.processes.VisionSource; // TODO rename this class public class PhotonConfiguration { - private HardwareConfig hardwareConfig; private HardwareSettings hardwareSettings; private NetworkConfig networkConfig; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/CVPipelineResultConsumer.java b/photon-core/src/main/java/org/photonvision/common/dataflow/CVPipelineResultConsumer.java index a51bf3574..7cb06d261 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/CVPipelineResultConsumer.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/CVPipelineResultConsumer.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow; import java.util.function.Consumer; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeDestination.java b/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeDestination.java index 16a69dfe4..e2f720955 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeDestination.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeDestination.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow; import java.util.ArrayList; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeService.java b/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeService.java index 72a5e0449..3aa783336 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeService.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeService.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow; import java.util.concurrent.BlockingQueue; @@ -27,7 +26,6 @@ import org.photonvision.common.logging.Logger; @SuppressWarnings("rawtypes") public class DataChangeService { - private static final Logger logger = new Logger(DataChangeService.class, LogGroup.WebServer); private static class ThreadSafeSingleton { diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeSource.java b/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeSource.java index c9ba1585f..05b3cbf4b 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeSource.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeSource.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow; import java.util.ArrayList; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeSubscriber.java b/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeSubscriber.java index 9ebbd6105..e50813de9 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeSubscriber.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/DataChangeSubscriber.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow; import java.util.List; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/events/DataChangeEvent.java b/photon-core/src/main/java/org/photonvision/common/dataflow/events/DataChangeEvent.java index 3f40aba73..557b259a1 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/events/DataChangeEvent.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/events/DataChangeEvent.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow.events; import org.photonvision.common.dataflow.DataChangeDestination; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/events/HTTPRequestEvent.java b/photon-core/src/main/java/org/photonvision/common/dataflow/events/HTTPRequestEvent.java index 5843ba1cc..135f655a4 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/events/HTTPRequestEvent.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/events/HTTPRequestEvent.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow.events; import org.photonvision.common.dataflow.DataChangeDestination; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/events/IncomingWebSocketEvent.java b/photon-core/src/main/java/org/photonvision/common/dataflow/events/IncomingWebSocketEvent.java index 0638f4446..1e18e78a6 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/events/IncomingWebSocketEvent.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/events/IncomingWebSocketEvent.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow.events; import io.javalin.websocket.WsContext; @@ -23,7 +22,6 @@ import org.photonvision.common.dataflow.DataChangeDestination; import org.photonvision.common.dataflow.DataChangeSource; public class IncomingWebSocketEvent extends DataChangeEvent { - public final Integer cameraIndex; public final WsContext originContext; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/events/OutgoingUIEvent.java b/photon-core/src/main/java/org/photonvision/common/dataflow/events/OutgoingUIEvent.java index efb3308dc..bfaa8256f 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/events/OutgoingUIEvent.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/events/OutgoingUIEvent.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow.events; import io.javalin.websocket.WsContext; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataChangeListener.java b/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataChangeListener.java index e2ea43027..f037f9467 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataChangeListener.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataChangeListener.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow.networktables; import edu.wpi.first.networktables.EntryListenerFlags; @@ -23,7 +22,6 @@ import edu.wpi.first.networktables.NetworkTableEntry; import java.util.function.Consumer; public class NTDataChangeListener { - private final NetworkTableEntry watchedEntry; private final int listenerID; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataPublisher.java b/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataPublisher.java index 710aebb25..f02808962 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataPublisher.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NTDataPublisher.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow.networktables; import edu.wpi.first.networktables.EntryNotification; @@ -33,7 +32,6 @@ import org.photonvision.vision.pipeline.result.CVPipelineResult; import org.photonvision.vision.target.TrackedTarget; public class NTDataPublisher implements CVPipelineResultConsumer { - private final NetworkTable rootTable = NetworkTablesManager.getInstance().kRootTable; private NetworkTable subTable; private NetworkTableEntry rawBytesEntry; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NetworkTablesManager.java b/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NetworkTablesManager.java index fa6b48ab2..e533e1418 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NetworkTablesManager.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/networktables/NetworkTablesManager.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow.networktables; import edu.wpi.first.networktables.LogMessage; @@ -29,7 +28,6 @@ import org.photonvision.common.scripting.ScriptEventType; import org.photonvision.common.scripting.ScriptManager; public class NetworkTablesManager { - private final NetworkTableInstance ntInstance = NetworkTableInstance.getDefault(); private final String kRootTableName = "/photonvision"; public final NetworkTable kRootTable = ntInstance.getTable(kRootTableName); @@ -48,7 +46,6 @@ public class NetworkTablesManager { private static final Logger logger = new Logger(NetworkTablesManager.class, LogGroup.General); private static class NTLogger implements Consumer { - private boolean hasReportedConnectionFailure = false; private long lastConnectMessageMillis = 0; diff --git a/photon-core/src/main/java/org/photonvision/common/dataflow/websocket/UIDataPublisher.java b/photon-core/src/main/java/org/photonvision/common/dataflow/websocket/UIDataPublisher.java index 0a9de0444..f6269000c 100644 --- a/photon-core/src/main/java/org/photonvision/common/dataflow/websocket/UIDataPublisher.java +++ b/photon-core/src/main/java/org/photonvision/common/dataflow/websocket/UIDataPublisher.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow.websocket; import java.util.ArrayList; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/CustomGPIO.java b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/CustomGPIO.java index 8d381f24c..5eab43fdf 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/CustomGPIO.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/CustomGPIO.java @@ -14,14 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.GPIO; import org.photonvision.common.configuration.HardwareConfig; import org.photonvision.common.hardware.Platform; public class CustomGPIO extends GPIOBase { - private boolean currentState; private final int port; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/GPIOBase.java b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/GPIOBase.java index a1d25be98..f2d603731 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/GPIOBase.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/GPIOBase.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.GPIO; import java.util.Arrays; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioCommand.java b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioCommand.java index 932674bb9..b25508942 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioCommand.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioCommand.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.GPIO.pi; @SuppressWarnings("SpellCheckingInspection") diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioException.java b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioException.java index b325868a7..3b1f26e1a 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioException.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioException.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.GPIO.pi; import java.util.HashMap; @@ -27,7 +26,6 @@ import java.util.HashMap; */ @SuppressWarnings({"SpellCheckingInspection", "unused", "RedundantSuppression"}) public class PigpioException extends Exception { - private int rc = -99999999; private static final long serialVersionUID = 443595760654129068L; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioPin.java b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioPin.java index eccef041b..6899c4980 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioPin.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioPin.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.GPIO.pi; import static org.photonvision.common.hardware.GPIO.pi.PigpioException.*; @@ -24,7 +23,6 @@ import org.photonvision.common.logging.LogGroup; import org.photonvision.common.logging.Logger; public class PigpioPin extends GPIOBase { - public static final Logger logger = new Logger(PigpioPin.class, LogGroup.General); private static final PigpioSocket piSocket = new PigpioSocket(); diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioPulse.java b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioPulse.java index 59e0bc0f8..e0b7897c9 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioPulse.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioPulse.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.GPIO.pi; public class PigpioPulse { diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioSocket.java b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioSocket.java index d808c44ba..35c5dd459 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioSocket.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioSocket.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.GPIO.pi; import static org.photonvision.common.hardware.GPIO.pi.PigpioException.*; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioSocketLock.java b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioSocketLock.java index 7c7a0036a..528e77240 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioSocketLock.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/GPIO/pi/PigpioSocketLock.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.GPIO.pi; import java.io.DataInputStream; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/HardwareManager.java b/photon-core/src/main/java/org/photonvision/common/hardware/HardwareManager.java index fbaebc4cc..9ed654668 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/HardwareManager.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/HardwareManager.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware; import edu.wpi.first.networktables.NetworkTableEntry; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/Platform.java b/photon-core/src/main/java/org/photonvision/common/hardware/Platform.java index b9b17e980..55436115e 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/Platform.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/Platform.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware; -import edu.wpi.first.wpiutil.RuntimeDetector; +import edu.wpi.first.util.RuntimeDetector; import java.io.IOException; import org.photonvision.common.util.ShellExec; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/StatusLED.java b/photon-core/src/main/java/org/photonvision/common/hardware/StatusLED.java index 0c10b3548..f601d40a8 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/StatusLED.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/StatusLED.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware; import java.util.List; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/VisionLED.java b/photon-core/src/main/java/org/photonvision/common/hardware/VisionLED.java index 880619e23..21c444dc2 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/VisionLED.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/VisionLED.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware; import edu.wpi.first.networktables.EntryNotification; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/CPUMetrics.java b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/CPUMetrics.java index eff807a56..6f16e714d 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/CPUMetrics.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/CPUMetrics.java @@ -14,11 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.metrics; public class CPUMetrics extends MetricsBase { - private String cpuMemSplit = null; public String getMemory() { diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/DiskMetrics.java b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/DiskMetrics.java index e6b672ef9..079129a9e 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/DiskMetrics.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/DiskMetrics.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.metrics; public class DiskMetrics extends MetricsBase { diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/GPUMetrics.java b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/GPUMetrics.java index 6319280a9..010bff61f 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/GPUMetrics.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/GPUMetrics.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.metrics; public class GPUMetrics extends MetricsBase { diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/MetricsBase.java b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/MetricsBase.java index 192d76f61..32999da61 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/MetricsBase.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/MetricsBase.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.metrics; import java.io.PrintWriter; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/MetricsPublisher.java b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/MetricsPublisher.java index f28d082a3..fd3518477 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/MetricsPublisher.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/MetricsPublisher.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.metrics; import java.util.HashMap; diff --git a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/RAMMetrics.java b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/RAMMetrics.java index bf0bd2b5a..8cc65cf2b 100644 --- a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/RAMMetrics.java +++ b/photon-core/src/main/java/org/photonvision/common/hardware/metrics/RAMMetrics.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware.metrics; public class RAMMetrics extends MetricsBase { diff --git a/photon-core/src/main/java/org/photonvision/common/logging/LogGroup.java b/photon-core/src/main/java/org/photonvision/common/logging/LogGroup.java index cfdd91861..1bd4181aa 100644 --- a/photon-core/src/main/java/org/photonvision/common/logging/LogGroup.java +++ b/photon-core/src/main/java/org/photonvision/common/logging/LogGroup.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.logging; public enum LogGroup { diff --git a/photon-core/src/main/java/org/photonvision/common/logging/LogLevel.java b/photon-core/src/main/java/org/photonvision/common/logging/LogLevel.java index 5d96d3aeb..d66cce151 100644 --- a/photon-core/src/main/java/org/photonvision/common/logging/LogLevel.java +++ b/photon-core/src/main/java/org/photonvision/common/logging/LogLevel.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.logging; public enum LogLevel { diff --git a/photon-core/src/main/java/org/photonvision/common/logging/Logger.java b/photon-core/src/main/java/org/photonvision/common/logging/Logger.java index 58bbe548c..220d502ca 100644 --- a/photon-core/src/main/java/org/photonvision/common/logging/Logger.java +++ b/photon-core/src/main/java/org/photonvision/common/logging/Logger.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.logging; import java.io.*; @@ -36,7 +35,6 @@ import org.photonvision.common.util.TimedTaskManager; @SuppressWarnings("unused") public class Logger { - public static final String ANSI_RESET = "\u001B[0m"; public static final String ANSI_BLACK = "\u001B[30m"; public static final String ANSI_RED = "\u001B[31m"; @@ -127,7 +125,6 @@ public class Logger { } public static void cleanLogs(Path folderToClean) { - LinkedList logFileList = new LinkedList<>(Arrays.asList(folderToClean.toFile().listFiles())); HashMap logFileStartDateMap = new HashMap<>(); diff --git a/photon-core/src/main/java/org/photonvision/common/networking/NetworkInterface.java b/photon-core/src/main/java/org/photonvision/common/networking/NetworkInterface.java index 8130dccb6..2dba02378 100644 --- a/photon-core/src/main/java/org/photonvision/common/networking/NetworkInterface.java +++ b/photon-core/src/main/java/org/photonvision/common/networking/NetworkInterface.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.networking; import java.net.InterfaceAddress; diff --git a/photon-core/src/main/java/org/photonvision/common/networking/NetworkManager.java b/photon-core/src/main/java/org/photonvision/common/networking/NetworkManager.java index 90d8b3aeb..34a326055 100644 --- a/photon-core/src/main/java/org/photonvision/common/networking/NetworkManager.java +++ b/photon-core/src/main/java/org/photonvision/common/networking/NetworkManager.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.networking; import org.photonvision.common.configuration.ConfigManager; @@ -24,7 +23,6 @@ import org.photonvision.common.logging.Logger; import org.photonvision.common.util.ShellExec; public class NetworkManager { - private static final Logger logger = new Logger(NetworkManager.class, LogGroup.General); private NetworkManager() {} diff --git a/photon-core/src/main/java/org/photonvision/common/networking/NetworkMode.java b/photon-core/src/main/java/org/photonvision/common/networking/NetworkMode.java index f5a12f1b7..39b33ebd1 100644 --- a/photon-core/src/main/java/org/photonvision/common/networking/NetworkMode.java +++ b/photon-core/src/main/java/org/photonvision/common/networking/NetworkMode.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.networking; public enum NetworkMode { diff --git a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptCommandType.java b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptCommandType.java index debc05c1b..699faf4c9 100644 --- a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptCommandType.java +++ b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptCommandType.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.scripting; public enum ScriptCommandType { diff --git a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptConfig.java b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptConfig.java index 684a1a882..5342add6b 100644 --- a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptConfig.java +++ b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptConfig.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.scripting; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptEvent.java b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptEvent.java index a60dd566a..a14642cf3 100644 --- a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptEvent.java +++ b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptEvent.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.scripting; import java.io.IOException; diff --git a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptEventType.java b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptEventType.java index 3fe98bf44..f2a6ff381 100644 --- a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptEventType.java +++ b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptEventType.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.scripting; public enum ScriptEventType { diff --git a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptManager.java b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptManager.java index 253f863fd..ff8172dae 100644 --- a/photon-core/src/main/java/org/photonvision/common/scripting/ScriptManager.java +++ b/photon-core/src/main/java/org/photonvision/common/scripting/ScriptManager.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.scripting; import java.io.IOException; @@ -31,7 +30,6 @@ import org.photonvision.common.util.TimedTaskManager; import org.photonvision.common.util.file.JacksonUtils; public class ScriptManager { - private static final Logger logger = new Logger(ScriptManager.class, LogGroup.General); private ScriptManager() {} @@ -83,7 +81,6 @@ public class ScriptManager { } protected static class ScriptConfigManager { - // protected static final Path scriptConfigPath = // Paths.get(ConfigManager.SettingsPath.toString(), "scripts.json"); static final Path scriptConfigPath = Paths.get(""); // TODO: Waiting on config diff --git a/photon-core/src/main/java/org/photonvision/common/util/ColorHelper.java b/photon-core/src/main/java/org/photonvision/common/util/ColorHelper.java index 1ce4c55f1..7ff7657ff 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/ColorHelper.java +++ b/photon-core/src/main/java/org/photonvision/common/util/ColorHelper.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util; import java.awt.*; diff --git a/photon-core/src/main/java/org/photonvision/common/util/MemoryManager.java b/photon-core/src/main/java/org/photonvision/common/util/MemoryManager.java index 9a6d5525e..78a0acd64 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/MemoryManager.java +++ b/photon-core/src/main/java/org/photonvision/common/util/MemoryManager.java @@ -14,11 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util; public class MemoryManager { - private static final long MEGABYTE_FACTOR = 1024L * 1024L; private int collectionThreshold; diff --git a/photon-core/src/main/java/org/photonvision/common/util/ReflectionUtils.java b/photon-core/src/main/java/org/photonvision/common/util/ReflectionUtils.java index f8c32905f..6b554e3aa 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/ReflectionUtils.java +++ b/photon-core/src/main/java/org/photonvision/common/util/ReflectionUtils.java @@ -14,11 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util; public class ReflectionUtils { - public static StackTraceElement[] getFullStackTrace() { return Thread.currentThread().getStackTrace(); } diff --git a/photon-core/src/main/java/org/photonvision/common/util/SerializationUtils.java b/photon-core/src/main/java/org/photonvision/common/util/SerializationUtils.java index a211b545e..6846f84f5 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/SerializationUtils.java +++ b/photon-core/src/main/java/org/photonvision/common/util/SerializationUtils.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util; import java.util.HashMap; diff --git a/photon-core/src/main/java/org/photonvision/common/util/ShellExec.java b/photon-core/src/main/java/org/photonvision/common/util/ShellExec.java index 61676cab0..a0e5079be 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/ShellExec.java +++ b/photon-core/src/main/java/org/photonvision/common/util/ShellExec.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util; import java.io.*; diff --git a/photon-core/src/main/java/org/photonvision/common/util/TestUtils.java b/photon-core/src/main/java/org/photonvision/common/util/TestUtils.java index 23f69e221..5876fcb5d 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/TestUtils.java +++ b/photon-core/src/main/java/org/photonvision/common/util/TestUtils.java @@ -14,11 +14,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util; import com.fasterxml.jackson.databind.ObjectMapper; -import edu.wpi.cscore.CameraServerCvJNI; +import edu.wpi.first.cscore.CameraServerCvJNI; import java.awt.*; import java.io.File; import java.io.IOException; @@ -28,7 +27,6 @@ import org.opencv.highgui.HighGui; import org.photonvision.vision.calibration.CameraCalibrationCoefficients; public class TestUtils { - @SuppressWarnings("unused") public enum WPI2019Image { kCargoAngledDark48in(1.2192), @@ -135,7 +133,7 @@ public class TestUtils { } private static Path getResourcesFolderPath(boolean testMode) { - return Path.of(testMode ? "src/main/resources" : "../test-resources").toAbsolutePath(); + return Path.of("../test-resources").toAbsolutePath(); } public static Path getTestMode2019ImagePath() { @@ -232,7 +230,6 @@ public class TestUtils { HighGui.waitKey(timeoutMs); HighGui.destroyAllWindows(); } catch (HeadlessException ignored) { - } } diff --git a/photon-core/src/main/java/org/photonvision/common/util/TimedTaskManager.java b/photon-core/src/main/java/org/photonvision/common/util/TimedTaskManager.java index b3fa552ed..9641c9c08 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/TimedTaskManager.java +++ b/photon-core/src/main/java/org/photonvision/common/util/TimedTaskManager.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util; import java.util.concurrent.*; @@ -23,7 +22,6 @@ import org.photonvision.common.logging.LogGroup; import org.photonvision.common.logging.Logger; public class TimedTaskManager { - private static final Logger logger = new Logger(TimedTaskManager.class, LogGroup.General); private static class Singleton { diff --git a/photon-core/src/main/java/org/photonvision/common/util/file/FileUtils.java b/photon-core/src/main/java/org/photonvision/common/util/file/FileUtils.java index 24ab5adff..40ce70c83 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/file/FileUtils.java +++ b/photon-core/src/main/java/org/photonvision/common/util/file/FileUtils.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util.file; import java.io.File; @@ -33,7 +32,6 @@ import org.photonvision.common.logging.LogGroup; import org.photonvision.common.logging.Logger; public class FileUtils { - private FileUtils() {} private static final Logger logger = new Logger(FileUtils.class, LogGroup.General); diff --git a/photon-core/src/main/java/org/photonvision/common/util/file/JacksonUtils.java b/photon-core/src/main/java/org/photonvision/common/util/file/JacksonUtils.java index 243428372..086f43e14 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/file/JacksonUtils.java +++ b/photon-core/src/main/java/org/photonvision/common/util/file/JacksonUtils.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util.file; import com.fasterxml.jackson.core.json.JsonReadFeature; diff --git a/photon-core/src/main/java/org/photonvision/common/util/java/TriConsumer.java b/photon-core/src/main/java/org/photonvision/common/util/java/TriConsumer.java index 6f1dc67fb..66bcf62c7 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/java/TriConsumer.java +++ b/photon-core/src/main/java/org/photonvision/common/util/java/TriConsumer.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util.java; public interface TriConsumer { diff --git a/photon-core/src/main/java/org/photonvision/common/util/math/IPUtils.java b/photon-core/src/main/java/org/photonvision/common/util/math/IPUtils.java index f4127e782..f2a7af542 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/math/IPUtils.java +++ b/photon-core/src/main/java/org/photonvision/common/util/math/IPUtils.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util.math; import java.util.ArrayList; diff --git a/photon-core/src/main/java/org/photonvision/common/util/math/MathUtils.java b/photon-core/src/main/java/org/photonvision/common/util/math/MathUtils.java index b7c0f76f8..12d4eda26 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/math/MathUtils.java +++ b/photon-core/src/main/java/org/photonvision/common/util/math/MathUtils.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util.math; -import edu.wpi.first.wpiutil.WPIUtilJNI; +import edu.wpi.first.util.WPIUtilJNI; public class MathUtils { MathUtils() {} diff --git a/photon-core/src/main/java/org/photonvision/common/util/numbers/DoubleCouple.java b/photon-core/src/main/java/org/photonvision/common/util/numbers/DoubleCouple.java index 004d0a2af..a040e3ecc 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/numbers/DoubleCouple.java +++ b/photon-core/src/main/java/org/photonvision/common/util/numbers/DoubleCouple.java @@ -14,13 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util.numbers; import org.opencv.core.Point; public class DoubleCouple extends NumberCouple { - public DoubleCouple() { super(0.0, 0.0); } diff --git a/photon-core/src/main/java/org/photonvision/common/util/numbers/IntegerCouple.java b/photon-core/src/main/java/org/photonvision/common/util/numbers/IntegerCouple.java index 5bfd133a9..31a0c7b90 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/numbers/IntegerCouple.java +++ b/photon-core/src/main/java/org/photonvision/common/util/numbers/IntegerCouple.java @@ -14,11 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util.numbers; public class IntegerCouple extends NumberCouple { - public IntegerCouple() { super(0, 0); } diff --git a/photon-core/src/main/java/org/photonvision/common/util/numbers/NumberCouple.java b/photon-core/src/main/java/org/photonvision/common/util/numbers/NumberCouple.java index e4a204f99..4df991a1c 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/numbers/NumberCouple.java +++ b/photon-core/src/main/java/org/photonvision/common/util/numbers/NumberCouple.java @@ -14,13 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util.numbers; import com.fasterxml.jackson.annotation.JsonIgnore; public abstract class NumberCouple { - protected T first; protected T second; diff --git a/photon-core/src/main/java/org/photonvision/common/util/numbers/NumberListUtils.java b/photon-core/src/main/java/org/photonvision/common/util/numbers/NumberListUtils.java index fd5b96532..3d724e350 100644 --- a/photon-core/src/main/java/org/photonvision/common/util/numbers/NumberListUtils.java +++ b/photon-core/src/main/java/org/photonvision/common/util/numbers/NumberListUtils.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util.numbers; import java.math.BigDecimal; @@ -25,7 +24,6 @@ import java.util.StringJoiner; @SuppressWarnings("unused") public class NumberListUtils { - /** * @param collection an ArrayList of Comparable objects * @return the median of collection diff --git a/photon-core/src/main/java/org/photonvision/raspi/PicamJNI.java b/photon-core/src/main/java/org/photonvision/raspi/PicamJNI.java index c96e32c89..c58e70189 100644 --- a/photon-core/src/main/java/org/photonvision/raspi/PicamJNI.java +++ b/photon-core/src/main/java/org/photonvision/raspi/PicamJNI.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.raspi; import java.io.File; @@ -28,7 +27,6 @@ import org.photonvision.common.logging.LogGroup; import org.photonvision.common.logging.Logger; public class PicamJNI { - private static boolean libraryLoaded = false; private static Logger logger = new Logger(PicamJNI.class, LogGroup.Camera); diff --git a/photon-core/src/main/java/org/photonvision/vision/calibration/CameraCalibrationCoefficients.java b/photon-core/src/main/java/org/photonvision/vision/calibration/CameraCalibrationCoefficients.java index cf7017656..84e8da65b 100644 --- a/photon-core/src/main/java/org/photonvision/vision/calibration/CameraCalibrationCoefficients.java +++ b/photon-core/src/main/java/org/photonvision/vision/calibration/CameraCalibrationCoefficients.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.calibration; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/photon-core/src/main/java/org/photonvision/vision/calibration/JsonMat.java b/photon-core/src/main/java/org/photonvision/vision/calibration/JsonMat.java index 60b4a524b..2219af588 100644 --- a/photon-core/src/main/java/org/photonvision/vision/calibration/JsonMat.java +++ b/photon-core/src/main/java/org/photonvision/vision/calibration/JsonMat.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.calibration; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/CameraQuirk.java b/photon-core/src/main/java/org/photonvision/vision/camera/CameraQuirk.java index fe5043f13..81e600a27 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/CameraQuirk.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/CameraQuirk.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.camera; public enum CameraQuirk { diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/CameraType.java b/photon-core/src/main/java/org/photonvision/vision/camera/CameraType.java index 8ce16ca27..3bd4f6a1a 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/CameraType.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/CameraType.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.camera; public enum CameraType { diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/FileVisionSource.java b/photon-core/src/main/java/org/photonvision/vision/camera/FileVisionSource.java index e089083fc..7f6768f79 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/FileVisionSource.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/FileVisionSource.java @@ -14,11 +14,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.camera; -import edu.wpi.cscore.VideoMode; -import edu.wpi.cscore.VideoMode.PixelFormat; +import edu.wpi.first.cscore.VideoMode; +import edu.wpi.first.cscore.VideoMode.PixelFormat; import java.nio.file.Path; import java.util.HashMap; import org.photonvision.common.configuration.CameraConfiguration; @@ -29,7 +28,6 @@ import org.photonvision.vision.processes.VisionSource; import org.photonvision.vision.processes.VisionSourceSettables; public class FileVisionSource extends VisionSource { - private final FileFrameProvider frameProvider; private final FileSourceSettables settables; @@ -73,7 +71,6 @@ public class FileVisionSource extends VisionSource { } private static class FileSourceSettables extends VisionSourceSettables { - private final VideoMode videoMode; private final HashMap videoModes = new HashMap<>(); diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/QuirkyCamera.java b/photon-core/src/main/java/org/photonvision/vision/camera/QuirkyCamera.java index 737585f28..a4e2da954 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/QuirkyCamera.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/QuirkyCamera.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.camera; import java.util.HashMap; @@ -22,7 +21,6 @@ import java.util.List; import java.util.Objects; public class QuirkyCamera { - private static final List quirkyCameras = List.of( new QuirkyCamera(0x2000, 0x1415, CameraQuirk.Gain, CameraQuirk.FPSCap100), // PS3Eye diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java b/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java index 652a0e25b..f22ed6eff 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java @@ -14,14 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.camera; -import edu.wpi.cscore.CvSink; -import edu.wpi.cscore.UsbCamera; -import edu.wpi.cscore.VideoException; -import edu.wpi.cscore.VideoMode; import edu.wpi.first.cameraserver.CameraServer; +import edu.wpi.first.cscore.CvSink; +import edu.wpi.first.cscore.UsbCamera; +import edu.wpi.first.cscore.VideoException; +import edu.wpi.first.cscore.VideoMode; import java.util.*; import java.util.stream.Collectors; import org.photonvision.common.configuration.CameraConfiguration; diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/ZeroCopyPicamSource.java b/photon-core/src/main/java/org/photonvision/vision/camera/ZeroCopyPicamSource.java index 995ad8b58..e90cb5c6d 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/ZeroCopyPicamSource.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/ZeroCopyPicamSource.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.camera; -import edu.wpi.cscore.VideoMode; +import edu.wpi.first.cscore.VideoMode; import java.util.HashMap; import org.photonvision.common.configuration.CameraConfiguration; import org.photonvision.common.configuration.ConfigManager; @@ -82,7 +81,6 @@ public class ZeroCopyPicamSource extends VisionSource { } public static class PicamSettables extends VisionSourceSettables { - private FPSRatedVideoMode currentVideoMode; private double lastExposure; private int lastBrightness; diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/Frame.java b/photon-core/src/main/java/org/photonvision/vision/frame/Frame.java index fd029b483..5fe07c00d 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/Frame.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/Frame.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame; -import edu.wpi.first.wpilibj.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Rotation2d; import org.photonvision.common.util.math.MathUtils; import org.photonvision.vision.opencv.CVMat; import org.photonvision.vision.opencv.Releasable; diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/FrameConsumer.java b/photon-core/src/main/java/org/photonvision/vision/frame/FrameConsumer.java index c22fe707e..96af8cdc8 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/FrameConsumer.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/FrameConsumer.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame; import java.util.function.Consumer; diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/FrameDivisor.java b/photon-core/src/main/java/org/photonvision/vision/frame/FrameDivisor.java index b44ca78d1..2f8d17c10 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/FrameDivisor.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/FrameDivisor.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame; public enum FrameDivisor { diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/FrameProvider.java b/photon-core/src/main/java/org/photonvision/vision/frame/FrameProvider.java index 22b4e178f..42ecfe38f 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/FrameProvider.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/FrameProvider.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame; import java.util.function.Supplier; diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/FrameStaticProperties.java b/photon-core/src/main/java/org/photonvision/vision/frame/FrameStaticProperties.java index 6cdc9f157..0324e44a4 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/FrameStaticProperties.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/FrameStaticProperties.java @@ -14,11 +14,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame; -import edu.wpi.cscore.VideoMode; -import edu.wpi.first.wpilibj.geometry.Rotation2d; +import edu.wpi.first.cscore.VideoMode; +import edu.wpi.first.math.geometry.Rotation2d; import org.opencv.core.Point; import org.photonvision.common.util.numbers.DoubleCouple; import org.photonvision.vision.calibration.CameraCalibrationCoefficients; @@ -83,7 +82,6 @@ public class FrameStaticProperties { public static DoubleCouple calculateHorizontalVerticalFoV( double diagonalFoV, int imageWidth, int imageHeight) { - double diagonalView = Math.toRadians(diagonalFoV); double diagonalAspect = Math.hypot(imageWidth, imageHeight); diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/consumer/DummyFrameConsumer.java b/photon-core/src/main/java/org/photonvision/vision/frame/consumer/DummyFrameConsumer.java index 1e9449a35..9e185c1ce 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/consumer/DummyFrameConsumer.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/consumer/DummyFrameConsumer.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame.consumer; import org.photonvision.vision.frame.Frame; diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/consumer/FileSaveFrameConsumer.java b/photon-core/src/main/java/org/photonvision/vision/frame/consumer/FileSaveFrameConsumer.java index 61274e73c..feaadfc59 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/consumer/FileSaveFrameConsumer.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/consumer/FileSaveFrameConsumer.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame.consumer; import edu.wpi.first.networktables.NetworkTable; @@ -34,7 +33,6 @@ import org.photonvision.common.util.TimedTaskManager; import org.photonvision.vision.frame.Frame; public class FileSaveFrameConsumer implements Consumer { - // Formatters to generate unique, timestamped file names private static String FILE_PATH = ConfigManager.getInstance().getImageSavePath().toString(); private static String FILE_EXTENSION = ".jpg"; @@ -66,7 +64,6 @@ public class FileSaveFrameConsumer implements Consumer { public void accept(Frame frame) { if (frame != null && !frame.image.getMat().empty()) { - if (lock.tryLock()) { boolean curCommand = entry.getBoolean(false); if (curCommand && !prevCommand) { diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/consumer/MJPGFrameConsumer.java b/photon-core/src/main/java/org/photonvision/vision/frame/consumer/MJPGFrameConsumer.java index ebdd01230..7928b812a 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/consumer/MJPGFrameConsumer.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/consumer/MJPGFrameConsumer.java @@ -14,15 +14,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame.consumer; -import edu.wpi.cscore.CameraServerJNI; -import edu.wpi.cscore.CvSource; -import edu.wpi.cscore.MjpegServer; -import edu.wpi.cscore.VideoEvent; -import edu.wpi.cscore.VideoListener; -import edu.wpi.cscore.VideoMode; +import edu.wpi.first.cscore.CameraServerJNI; +import edu.wpi.first.cscore.CvSource; +import edu.wpi.first.cscore.MjpegServer; +import edu.wpi.first.cscore.VideoEvent; +import edu.wpi.first.cscore.VideoListener; +import edu.wpi.first.cscore.VideoMode; import edu.wpi.first.networktables.NetworkTable; import edu.wpi.first.networktables.NetworkTableInstance; import java.util.ArrayList; @@ -31,7 +30,6 @@ import org.photonvision.vision.frame.Frame; import org.photonvision.vision.frame.FrameDivisor; public class MJPGFrameConsumer { - private CvSource cvSource; private MjpegServer mjpegServer; diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/provider/AcceleratedPicamFrameProvider.java b/photon-core/src/main/java/org/photonvision/vision/frame/provider/AcceleratedPicamFrameProvider.java index 8ce20cd79..2936dd825 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/provider/AcceleratedPicamFrameProvider.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/provider/AcceleratedPicamFrameProvider.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame.provider; import org.opencv.core.Mat; @@ -26,7 +25,6 @@ import org.photonvision.vision.opencv.CVMat; import org.photonvision.vision.processes.VisionSourceSettables; public class AcceleratedPicamFrameProvider implements FrameProvider { - private final VisionSourceSettables settables; private CVMat mat; diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/provider/FileFrameProvider.java b/photon-core/src/main/java/org/photonvision/vision/frame/provider/FileFrameProvider.java index 1d9cd605b..f31855674 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/provider/FileFrameProvider.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/provider/FileFrameProvider.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame.provider; -import edu.wpi.first.wpilibj.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Rotation2d; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/provider/NetworkFrameProvider.java b/photon-core/src/main/java/org/photonvision/vision/frame/provider/NetworkFrameProvider.java index 26cf1aca3..e3a1c6cc0 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/provider/NetworkFrameProvider.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/provider/NetworkFrameProvider.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame.provider; import org.apache.commons.lang3.NotImplementedException; diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/provider/USBFrameProvider.java b/photon-core/src/main/java/org/photonvision/vision/frame/provider/USBFrameProvider.java index c93c740d9..df981b01c 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/provider/USBFrameProvider.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/provider/USBFrameProvider.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame.provider; -import edu.wpi.cscore.CvSink; +import edu.wpi.first.cscore.CvSink; import org.photonvision.common.util.math.MathUtils; import org.photonvision.vision.frame.Frame; import org.photonvision.vision.frame.FrameProvider; diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/CVMat.java b/photon-core/src/main/java/org/photonvision/vision/opencv/CVMat.java index e58f0d11d..e264f45b9 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/CVMat.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/CVMat.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; import java.util.HashMap; diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/CVShape.java b/photon-core/src/main/java/org/photonvision/vision/opencv/CVShape.java index 71f21cc1d..c5db96aea 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/CVShape.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/CVShape.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; import org.jetbrains.annotations.Nullable; diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/Contour.java b/photon-core/src/main/java/org/photonvision/vision/opencv/Contour.java index 398e3c34d..d34f222d7 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/Contour.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/Contour.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; import java.util.Comparator; @@ -31,7 +30,6 @@ import org.opencv.imgproc.Moments; import org.photonvision.common.util.math.MathUtils; public class Contour implements Releasable { - public static final Comparator SortByMomentsX = Comparator.comparingDouble( (contour) -> contour.getMoments().get_m10() / contour.getMoments().get_m00()); diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/ContourGroupingMode.java b/photon-core/src/main/java/org/photonvision/vision/opencv/ContourGroupingMode.java index 86c801169..2ae1a0eae 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/ContourGroupingMode.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/ContourGroupingMode.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; public enum ContourGroupingMode { diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/ContourIntersectionDirection.java b/photon-core/src/main/java/org/photonvision/vision/opencv/ContourIntersectionDirection.java index d3f97d61e..19a05bef1 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/ContourIntersectionDirection.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/ContourIntersectionDirection.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; public enum ContourIntersectionDirection { diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/ContourShape.java b/photon-core/src/main/java/org/photonvision/vision/opencv/ContourShape.java index 4eac4d847..1886ed2bb 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/ContourShape.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/ContourShape.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; import java.util.EnumSet; diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/ContourSortMode.java b/photon-core/src/main/java/org/photonvision/vision/opencv/ContourSortMode.java index d4cf359e4..3831712b5 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/ContourSortMode.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/ContourSortMode.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; import java.util.Comparator; diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/DualMat.java b/photon-core/src/main/java/org/photonvision/vision/opencv/DualMat.java index f2adb4a92..1fc172af2 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/DualMat.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/DualMat.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; import org.opencv.core.Mat; diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/DualOffsetValues.java b/photon-core/src/main/java/org/photonvision/vision/opencv/DualOffsetValues.java index c7b2ac04f..80e8b1d5a 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/DualOffsetValues.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/DualOffsetValues.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; import org.opencv.core.Point; diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/ImageFlipMode.java b/photon-core/src/main/java/org/photonvision/vision/opencv/ImageFlipMode.java index 6fa456e7a..06c46c45d 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/ImageFlipMode.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/ImageFlipMode.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; public enum ImageFlipMode { diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/ImageRotationMode.java b/photon-core/src/main/java/org/photonvision/vision/opencv/ImageRotationMode.java index e72dd50e2..e031fd21d 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/ImageRotationMode.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/ImageRotationMode.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; public enum ImageRotationMode { diff --git a/photon-core/src/main/java/org/photonvision/vision/opencv/Releasable.java b/photon-core/src/main/java/org/photonvision/vision/opencv/Releasable.java index dc7667888..7fd23e819 100644 --- a/photon-core/src/main/java/org/photonvision/vision/opencv/Releasable.java +++ b/photon-core/src/main/java/org/photonvision/vision/opencv/Releasable.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; public interface Releasable { diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/CVPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/CVPipe.java index 95538c07f..c02604230 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/CVPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/CVPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe; /** @@ -26,7 +25,6 @@ package org.photonvision.vision.pipe; * @param

Parameters type for the pipe */ public abstract class CVPipe { - protected CVPipeResult result = new CVPipeResult<>(); protected P params; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/MutatingPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/MutatingPipe.java index 14e8f5ea3..ed20880ab 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/MutatingPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/MutatingPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe; public abstract class MutatingPipe extends CVPipe {} diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/BlurPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/BlurPipe.java index 885ede841..696f70c5a 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/BlurPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/BlurPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import org.opencv.core.Mat; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/CalculateFPSPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/CalculateFPSPipe.java index 1e709fae8..06270abef 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/CalculateFPSPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/CalculateFPSPipe.java @@ -14,16 +14,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; -import edu.wpi.first.wpilibj.LinearFilter; +import edu.wpi.first.math.filter.LinearFilter; import org.apache.commons.lang3.time.StopWatch; import org.photonvision.vision.pipe.CVPipe; public class CalculateFPSPipe extends CVPipe { - private LinearFilter fpsFilter = LinearFilter.movingAverage(20); StopWatch clock = new StopWatch(); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Calibrate3dPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Calibrate3dPipe.java index 0d7283a96..f23aac210 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Calibrate3dPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Calibrate3dPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import com.fasterxml.jackson.core.JsonProcessingException; @@ -36,7 +35,6 @@ public class Calibrate3dPipe List>, CameraCalibrationCoefficients, Calibrate3dPipe.CalibratePipeParams> { - // Camera matrix stores the center of the image and focal length across the x and y-axis in a 3x3 // matrix private Mat cameraMatrix = new Mat(); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Collect2dTargetsPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Collect2dTargetsPipe.java index 19129d1eb..9f7264fc3 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Collect2dTargetsPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Collect2dTargetsPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.ArrayList; @@ -29,7 +28,6 @@ import org.photonvision.vision.target.*; public class Collect2dTargetsPipe extends CVPipe< List, List, Collect2dTargetsPipe.Collect2dTargetsParams> { - /** * Processes this pipeline. * diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/CornerDetectionPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/CornerDetectionPipe.java index f4c5c485c..21098412c 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/CornerDetectionPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/CornerDetectionPipe.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; -import edu.wpi.first.wpilibj.geometry.Translation2d; +import edu.wpi.first.math.geometry.Translation2d; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; @@ -33,7 +32,6 @@ public class CornerDetectionPipe List, List, CornerDetectionPipe.CornerDetectionPipeParameters> { - Comparator leftRightComparator = Comparator.comparingDouble(point -> point.x); Comparator verticalComparator = Comparator.comparingDouble(point -> point.y); MatOfPoint2f polyOutput = new MatOfPoint2f(); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dCrosshairPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dCrosshairPipe.java index c47b3bc44..55e9186df 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dCrosshairPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dCrosshairPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.awt.Color; @@ -35,7 +34,6 @@ import org.photonvision.vision.target.TrackedTarget; public class Draw2dCrosshairPipe extends MutatingPipe< Pair>, Draw2dCrosshairPipe.Draw2dCrosshairParams> { - @Override protected Void process(Pair> in) { if (!params.shouldDraw) return null; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dTargetsPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dTargetsPipe.java index 1752af0a2..c8e8cb6fc 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dTargetsPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw2dTargetsPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.awt.*; @@ -34,7 +33,6 @@ import org.photonvision.vision.target.TrackedTarget; public class Draw2dTargetsPipe extends MutatingPipe>, Draw2dTargetsPipe.Draw2dTargetsParams> { - MatOfPoint tempMat = new MatOfPoint(); private static final Logger logger = new Logger(Draw2dTargetsPipe.class, LogGroup.General); @@ -53,7 +51,6 @@ public class Draw2dTargetsPipe || params.showMaximumBox || params.showRotatedBox || params.showShape)) { - var centroidColour = ColorHelper.colorToScalar(params.centroidColor); var maximumBoxColour = ColorHelper.colorToScalar(params.maximumBoxColor); var rotatedBoxColour = ColorHelper.colorToScalar(params.rotatedBoxColor); @@ -147,7 +144,6 @@ public class Draw2dTargetsPipe } if (params.showCentroid) { - Point centroid = target.getTargetOffsetPoint().clone(); dividePoint(centroid); var crosshairRadius = (int) (imageSize * params.kPixelsToCentroidRadius); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw3dTargetsPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw3dTargetsPipe.java index 5bf002dc8..2313e2543 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw3dTargetsPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/Draw3dTargetsPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.awt.*; @@ -37,7 +36,6 @@ import org.photonvision.vision.target.TrackedTarget; public class Draw3dTargetsPipe extends MutatingPipe>, Draw3dTargetsPipe.Draw3dContoursParams> { - Logger logger = new Logger(Draw3dTargetsPipe.class, LogGroup.VisionModule); @Override @@ -45,7 +43,6 @@ public class Draw3dTargetsPipe if (!params.shouldDraw) return null; for (var target : in.getRight()) { - // draw convex hull var pointMat = new MatOfPoint(); divideMat2f(target.m_mainContour.getConvexHull(), pointMat); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/DrawCornerDetectionPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/DrawCornerDetectionPipe.java index 544f0a646..0685fadbf 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/DrawCornerDetectionPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/DrawCornerDetectionPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.List; @@ -27,7 +26,6 @@ import org.photonvision.vision.target.TrackedTarget; public class DrawCornerDetectionPipe extends MutatingPipe>, DrawCornerDetectionPipe.DrawCornerParams> { - @Override protected Void process(Pair> in) { Mat image = in.getLeft(); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/ErodeDilatePipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/ErodeDilatePipe.java index 9d09a5d19..baafccb68 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/ErodeDilatePipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/ErodeDilatePipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import org.opencv.core.Mat; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FilterContoursPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FilterContoursPipe.java index ec5d74369..ccd1c4808 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FilterContoursPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FilterContoursPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.ArrayList; @@ -28,7 +27,6 @@ import org.photonvision.vision.pipe.CVPipe; public class FilterContoursPipe extends CVPipe, List, FilterContoursPipe.FilterContoursParams> { - List m_filteredContours = new ArrayList<>(); @Override diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FilterShapesPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FilterShapesPipe.java index e0df8d3d8..9784930ef 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FilterShapesPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FilterShapesPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.ArrayList; @@ -26,7 +25,6 @@ import org.photonvision.vision.pipe.CVPipe; public class FilterShapesPipe extends CVPipe, List, FilterShapesPipe.FilterShapesPipeParams> { - List outputList = new ArrayList<>(); /** diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindBoardCornersPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindBoardCornersPipe.java index 49764fd86..6e2109d14 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindBoardCornersPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindBoardCornersPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.Objects; @@ -117,7 +116,6 @@ public class FindBoardCornersPipe */ @Override protected Triple process(Pair in) { - // Create the object points createObjectPoints(); @@ -158,7 +156,6 @@ public class FindBoardCornersPipe private double getApproxMinSpacing(MatOfPoint2f inPoints) { double minSpacing = Double.MAX_VALUE; for (int pointIdx = 0; pointIdx < inPoints.height() - 1; pointIdx += 2) { - // +1 idx Neighbor distance double[] startPoint = inPoints.get(pointIdx, 0); double[] endPoint = inPoints.get(pointIdx + 1, 0); @@ -293,7 +290,6 @@ public class FindBoardCornersPipe } public static class FindCornersPipeParams { - private final int boardHeight; private final int boardWidth; private final UICalibrationData.BoardType type; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindCirclesPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindCirclesPipe.java index 1779e689f..36283a9c6 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindCirclesPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindCirclesPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.ArrayList; @@ -30,7 +29,6 @@ import org.photonvision.vision.pipe.CVPipe; public class FindCirclesPipe extends CVPipe>, List, FindCirclesPipe.FindCirclePipeParams> { - // Output vector of found circles. Each vector is encoded as 3 or 4 element floating-point vector // (x,y,radius) or (x,y,radius,votes) . private final Mat circles = new Mat(); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindContoursPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindContoursPipe.java index 5ce32c9d6..70532f72b 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindContoursPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindContoursPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.ArrayList; @@ -28,7 +27,6 @@ import org.photonvision.vision.pipe.CVPipe; public class FindContoursPipe extends CVPipe, FindContoursPipe.FindContoursParams> { - private final List m_foundContours = new ArrayList<>(); @Override diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindPolygonPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindPolygonPipe.java index 4929ee5b6..8ee392f8e 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindPolygonPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/FindPolygonPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.ArrayList; @@ -50,7 +49,6 @@ public class FindPolygonPipe } private CVShape getShape(Contour in) { - int corners = getCorners(in); /*The contourShape enum has predefined shapes for Circles, Triangles, and Quads diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/GPUAcceleratedHSVPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/GPUAcceleratedHSVPipe.java index a2df7190f..02f664d0b 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/GPUAcceleratedHSVPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/GPUAcceleratedHSVPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import static com.jogamp.opengl.GL.*; @@ -35,7 +34,6 @@ import org.photonvision.common.logging.Logger; import org.photonvision.vision.pipe.CVPipe; public class GPUAcceleratedHSVPipe extends CVPipe { - private static final String k_vertexShader = String.join( "\n", @@ -252,7 +250,6 @@ public class GPUAcceleratedHSVPipe extends CVPipe { IntBuffer status = GLBuffers.newDirectIntBuffer(1); gl.glGetProgramiv(programId, GL_LINK_STATUS, status); if (status.get(0) == GL_FALSE) { - IntBuffer infoLogLength = GLBuffers.newDirectIntBuffer(1); gl.glGetProgramiv(programId, GL_INFO_LOG_LENGTH, infoLogLength); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/GroupContoursPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/GroupContoursPipe.java index 258a11afa..e0519f0cb 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/GroupContoursPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/GroupContoursPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.ArrayList; @@ -28,7 +27,6 @@ import org.photonvision.vision.target.PotentialTarget; public class GroupContoursPipe extends CVPipe, List, GroupContoursPipe.GroupContoursParams> { - private final List m_targets = new ArrayList<>(); @Override diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/HSVPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/HSVPipe.java index 3c10a8e1a..cbe916fb2 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/HSVPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/HSVPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import org.opencv.core.Core; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/OutputMatPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/OutputMatPipe.java index 0880307a4..f51002d04 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/OutputMatPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/OutputMatPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import org.opencv.core.Mat; @@ -22,7 +21,6 @@ import org.opencv.imgproc.Imgproc; import org.photonvision.vision.pipe.MutatingPipe; public class OutputMatPipe extends MutatingPipe { - @Override protected Void process(Mat in) { // convert input mat diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/ResizeImagePipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/ResizeImagePipe.java index 29f036016..227174815 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/ResizeImagePipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/ResizeImagePipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import org.opencv.core.Mat; @@ -25,7 +24,6 @@ import org.photonvision.vision.pipe.MutatingPipe; /** Pipe that resizes an image to a given resolution */ public class ResizeImagePipe extends MutatingPipe { - /** * Process this pipe * diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/RotateImagePipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/RotateImagePipe.java index e32ec6cef..8fa7a471f 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/RotateImagePipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/RotateImagePipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import org.opencv.core.Core; @@ -24,7 +23,6 @@ import org.photonvision.vision.pipe.MutatingPipe; /** Pipe that rotates an image to a given orientation */ public class RotateImagePipe extends MutatingPipe { - public RotateImagePipe() { setParams(RotateImageParams.DEFAULT); } diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SolvePNPPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SolvePNPPipe.java index f760905f3..dad7320bd 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SolvePNPPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SolvePNPPipe.java @@ -14,12 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.geometry.Translation2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.geometry.Translation2d; import java.util.List; import org.opencv.calib3d.Calib3d; import org.opencv.core.Core; @@ -35,7 +34,6 @@ import org.photonvision.vision.target.TrackedTarget; public class SolvePNPPipe extends CVPipe, List, SolvePNPPipe.SolvePNPPipeParams> { - private static final Logger logger = new Logger(SolvePNPPipe.class, LogGroup.VisionModule); private final MatOfPoint2f imagePoints = new MatOfPoint2f(); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SortContoursPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SortContoursPipe.java index 066db5cb0..d104689e9 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SortContoursPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SortContoursPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.ArrayList; @@ -28,7 +27,6 @@ import org.photonvision.vision.target.PotentialTarget; public class SortContoursPipe extends CVPipe< List, List, SortContoursPipe.SortContoursParams> { - private final List m_sortedContours = new ArrayList<>(); @Override diff --git a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SpeckleRejectPipe.java b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SpeckleRejectPipe.java index c08a2cb8e..b1cef4950 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SpeckleRejectPipe.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipe/impl/SpeckleRejectPipe.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipe.impl; import java.util.ArrayList; @@ -24,7 +23,6 @@ import org.photonvision.vision.pipe.CVPipe; public class SpeckleRejectPipe extends CVPipe, List, SpeckleRejectPipe.SpeckleRejectParams> { - private final List m_despeckledContours = new ArrayList<>(); @Override diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/AdvancedPipelineSettings.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/AdvancedPipelineSettings.java index 56522d6d3..2e45c4e40 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/AdvancedPipelineSettings.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/AdvancedPipelineSettings.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import java.util.Objects; @@ -31,7 +30,6 @@ import org.photonvision.vision.target.TargetOffsetPointEdge; import org.photonvision.vision.target.TargetOrientation; public class AdvancedPipelineSettings extends CVPipelineSettings { - public AdvancedPipelineSettings() { ledMode = true; } diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/CVPipeline.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/CVPipeline.java index 53b035ce2..000063821 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/CVPipeline.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/CVPipeline.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import java.util.List; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/CVPipelineSettings.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/CVPipelineSettings.java index 82fa44f00..d1f0b3e1c 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/CVPipelineSettings.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/CVPipelineSettings.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/Calibrate3dPipeline.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/Calibrate3dPipeline.java index 7811002bd..fbc48123d 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/Calibrate3dPipeline.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/Calibrate3dPipeline.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.util.Units; import java.nio.file.Path; import java.util.ArrayList; import java.util.Collections; @@ -47,7 +46,6 @@ import org.photonvision.vision.pipeline.result.CVPipelineResult; public class Calibrate3dPipeline extends CVPipeline { - // For loggging private static final Logger logger = new Logger(Calibrate3dPipeline.class, LogGroup.General); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/Calibration3dPipelineSettings.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/Calibration3dPipelineSettings.java index ace018430..3dd0b1b00 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/Calibration3dPipelineSettings.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/Calibration3dPipelineSettings.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.util.Units; import org.opencv.core.Size; public class Calibration3dPipelineSettings extends AdvancedPipelineSettings { diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/ColoredShapePipeline.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/ColoredShapePipeline.java index 8b98b7cd0..598f4b92e 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/ColoredShapePipeline.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/ColoredShapePipeline.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import java.util.Arrays; @@ -37,7 +36,6 @@ import org.photonvision.vision.target.TrackedTarget; @SuppressWarnings({"DuplicatedCode"}) public class ColoredShapePipeline extends CVPipeline { - private final RotateImagePipe rotateImagePipe = new RotateImagePipe(); private final ErodeDilatePipe erodeDilatePipe = new ErodeDilatePipe(); private final HSVPipe hsvPipe = new HSVPipe(); @@ -67,7 +65,6 @@ public class ColoredShapePipeline @Override protected void setPipeParamsImpl() { - DualOffsetValues dualOffsetValues = new DualOffsetValues( settings.offsetDualPointA, diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/ColoredShapePipelineSettings.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/ColoredShapePipelineSettings.java index c1568f0f7..40a67a56c 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/ColoredShapePipelineSettings.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/ColoredShapePipelineSettings.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import com.fasterxml.jackson.annotation.JsonTypeName; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/DriverModePipeline.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/DriverModePipeline.java index 2a17e4136..86df43648 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/DriverModePipeline.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/DriverModePipeline.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import java.util.List; @@ -33,7 +32,6 @@ import org.photonvision.vision.pipeline.result.DriverModePipelineResult; public class DriverModePipeline extends CVPipeline { - private final RotateImagePipe rotateImagePipe = new RotateImagePipe(); private final Draw2dCrosshairPipe draw2dCrosshairPipe = new Draw2dCrosshairPipe(); private final CalculateFPSPipe calculateFPSPipe = new CalculateFPSPipe(); diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/DriverModePipelineSettings.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/DriverModePipelineSettings.java index 25911458e..1011bead7 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/DriverModePipelineSettings.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/DriverModePipelineSettings.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import com.fasterxml.jackson.annotation.JsonTypeName; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/OutputStreamPipeline.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/OutputStreamPipeline.java index 6c5b92259..623ec30d9 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/OutputStreamPipeline.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/OutputStreamPipeline.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import java.util.List; @@ -33,7 +32,6 @@ import org.photonvision.vision.target.TrackedTarget; * shall not get its settings saved, nor shall it be managed by PipelineManager */ public class OutputStreamPipeline { - private final OutputMatPipe outputMatPipe = new OutputMatPipe(); private final Draw2dCrosshairPipe draw2dCrosshairPipe = new Draw2dCrosshairPipe(); private final Draw2dTargetsPipe draw2dTargetsPipe = new Draw2dTargetsPipe(); @@ -45,7 +43,6 @@ public class OutputStreamPipeline { protected void setPipeParams( FrameStaticProperties frameStaticProperties, AdvancedPipelineSettings settings) { - var dualOffsetValues = new DualOffsetValues( settings.offsetDualPointA, diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/PipelineProfiler.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/PipelineProfiler.java index 8a0508666..934036201 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/PipelineProfiler.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/PipelineProfiler.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import org.photonvision.common.logging.LogGroup; @@ -22,7 +21,6 @@ import org.photonvision.common.logging.Logger; import org.photonvision.common.util.math.MathUtils; public class PipelineProfiler { - private static boolean shouldLog; private static final Logger reflectiveLogger = diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/PipelineType.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/PipelineType.java index 28e497a1b..502cce9b2 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/PipelineType.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/PipelineType.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; @SuppressWarnings("rawtypes") diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/ReflectivePipeline.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/ReflectivePipeline.java index 5800c5a42..9e0ca5b20 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/ReflectivePipeline.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/ReflectivePipeline.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import java.util.List; @@ -35,7 +34,6 @@ import org.photonvision.vision.target.TrackedTarget; /** Represents a pipeline for tracking retro-reflective targets. */ @SuppressWarnings({"DuplicatedCode"}) public class ReflectivePipeline extends CVPipeline { - private final RotateImagePipe rotateImagePipe = new RotateImagePipe(); private final HSVPipe hsvPipe = new HSVPipe(); private final FindContoursPipe findContoursPipe = new FindContoursPipe(); @@ -60,7 +58,6 @@ public class ReflectivePipeline extends CVPipeline. */ - package org.photonvision.vision.pipeline; import com.fasterxml.jackson.annotation.JsonTypeName; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/UICalibrationData.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/UICalibrationData.java index 287e27197..74790474e 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/UICalibrationData.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/UICalibrationData.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import java.util.Map; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/result/BytePackable.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/result/BytePackable.java index c729d35f6..9f15184dc 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/result/BytePackable.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/result/BytePackable.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline.result; @SuppressWarnings("PointlessBitwiseExpression") diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/result/CVPipelineResult.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/result/CVPipelineResult.java index 4f902ab00..f8dfb3b9e 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/result/CVPipelineResult.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/result/CVPipelineResult.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline.result; import java.util.Collections; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/result/DriverModePipelineResult.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/result/DriverModePipelineResult.java index 609a3f448..5da88acc3 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/result/DriverModePipelineResult.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/result/DriverModePipelineResult.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline.result; import java.util.List; diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/Data.java b/photon-core/src/main/java/org/photonvision/vision/processes/Data.java index c146a0e27..2bdb19b0d 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/Data.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/Data.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; import org.photonvision.vision.opencv.Releasable; diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/PipelineManager.java b/photon-core/src/main/java/org/photonvision/vision/processes/PipelineManager.java index 3fe138f8b..e22056a2f 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/PipelineManager.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/PipelineManager.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; import java.util.ArrayList; diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModule.java b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModule.java index 803f2f460..5fe6a8a26 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModule.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModule.java @@ -14,11 +14,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.util.Units; import io.javalin.websocket.WsContext; import java.util.*; import org.photonvision.common.configuration.CameraConfiguration; @@ -57,7 +56,6 @@ import org.photonvision.vision.target.TrackedTarget; * provide info on settings changes. VisionModuleManager holds a list of all current vision modules. */ public class VisionModule { - private static final int streamFPSCap = 30; private final Logger logger; diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleChangeSubscriber.java b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleChangeSubscriber.java index 1966a40f8..923054275 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleChangeSubscriber.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleChangeSubscriber.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; import java.util.ArrayList; @@ -35,7 +34,6 @@ import org.photonvision.vision.target.RobotOffsetPointOperation; @SuppressWarnings("unchecked") public class VisionModuleChangeSubscriber extends DataChangeSubscriber { - private final VisionModule parentModule; private final Logger logger; diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleManager.java b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleManager.java index 0075e9825..168fb531e 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleManager.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleManager.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; import java.util.*; @@ -22,7 +21,6 @@ import java.util.stream.Collectors; /** VisionModuleManager has many VisionModules, and provides camera configuration data to them. */ public class VisionModuleManager { - private static class ThreadSafeSingleton { private static final VisionModuleManager INSTANCE = new VisionModuleManager(); } diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/VisionRunner.java b/photon-core/src/main/java/org/photonvision/vision/processes/VisionRunner.java index 1f415e5de..979dc4e5c 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/VisionRunner.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/VisionRunner.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; import java.util.function.Consumer; @@ -30,7 +29,6 @@ import org.photonvision.vision.pipeline.result.CVPipelineResult; /** VisionRunner has a frame supplier, a pipeline supplier, and a result consumer */ @SuppressWarnings("rawtypes") public class VisionRunner { - private final Logger logger; private final Thread visionProcessThread; private final Supplier frameSupplier; diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/VisionSource.java b/photon-core/src/main/java/org/photonvision/vision/processes/VisionSource.java index 1dfcf66cb..d78f1a367 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/VisionSource.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/VisionSource.java @@ -14,14 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; import org.photonvision.common.configuration.CameraConfiguration; import org.photonvision.vision.frame.FrameProvider; public abstract class VisionSource { - protected final CameraConfiguration cameraConfiguration; protected VisionSource(CameraConfiguration cameraConfiguration) { diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/VisionSourceManager.java b/photon-core/src/main/java/org/photonvision/vision/processes/VisionSourceManager.java index 49b5f54b1..f45480b34 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/VisionSourceManager.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/VisionSourceManager.java @@ -14,11 +14,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; -import edu.wpi.cscore.UsbCamera; -import edu.wpi.cscore.UsbCameraInfo; +import edu.wpi.first.cscore.UsbCamera; +import edu.wpi.first.cscore.UsbCameraInfo; import java.util.*; import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Supplier; @@ -36,7 +35,6 @@ import org.photonvision.vision.camera.USBCameraSource; import org.photonvision.vision.camera.ZeroCopyPicamSource; public class VisionSourceManager { - private static final Logger logger = new Logger(VisionSourceManager.class, LogGroup.Camera); private static final List deviceBlacklist = List.of("bcm2835-isp"); diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/VisionSourceSettables.java b/photon-core/src/main/java/org/photonvision/vision/processes/VisionSourceSettables.java index 9dbb2ee0c..664cad8ee 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/VisionSourceSettables.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/VisionSourceSettables.java @@ -14,11 +14,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; -import edu.wpi.cscore.VideoMode; -import edu.wpi.first.wpilibj.geometry.Rotation2d; +import edu.wpi.first.cscore.VideoMode; +import edu.wpi.first.math.geometry.Rotation2d; import java.util.HashMap; import org.photonvision.common.configuration.CameraConfiguration; import org.photonvision.common.logging.LogGroup; diff --git a/photon-core/src/main/java/org/photonvision/vision/target/PotentialTarget.java b/photon-core/src/main/java/org/photonvision/vision/target/PotentialTarget.java index 5e1ae399e..deb3de569 100644 --- a/photon-core/src/main/java/org/photonvision/vision/target/PotentialTarget.java +++ b/photon-core/src/main/java/org/photonvision/vision/target/PotentialTarget.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; import java.util.ArrayList; diff --git a/photon-core/src/main/java/org/photonvision/vision/target/RobotOffsetPointMode.java b/photon-core/src/main/java/org/photonvision/vision/target/RobotOffsetPointMode.java index caa5bf331..434e2de6f 100644 --- a/photon-core/src/main/java/org/photonvision/vision/target/RobotOffsetPointMode.java +++ b/photon-core/src/main/java/org/photonvision/vision/target/RobotOffsetPointMode.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; public enum RobotOffsetPointMode { diff --git a/photon-core/src/main/java/org/photonvision/vision/target/RobotOffsetPointOperation.java b/photon-core/src/main/java/org/photonvision/vision/target/RobotOffsetPointOperation.java index 34f2ad249..0e69fe9d8 100644 --- a/photon-core/src/main/java/org/photonvision/vision/target/RobotOffsetPointOperation.java +++ b/photon-core/src/main/java/org/photonvision/vision/target/RobotOffsetPointOperation.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; public enum RobotOffsetPointOperation { diff --git a/photon-core/src/main/java/org/photonvision/vision/target/TargetCalculations.java b/photon-core/src/main/java/org/photonvision/vision/target/TargetCalculations.java index c0633a2e5..d8bead93c 100644 --- a/photon-core/src/main/java/org/photonvision/vision/target/TargetCalculations.java +++ b/photon-core/src/main/java/org/photonvision/vision/target/TargetCalculations.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; import org.opencv.core.Point; diff --git a/photon-core/src/main/java/org/photonvision/vision/target/TargetModel.java b/photon-core/src/main/java/org/photonvision/vision/target/TargetModel.java index da505b72f..7b0ac40df 100644 --- a/photon-core/src/main/java/org/photonvision/vision/target/TargetModel.java +++ b/photon-core/src/main/java/org/photonvision/vision/target/TargetModel.java @@ -14,13 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.util.Units; import java.util.ArrayList; import java.util.List; import org.opencv.core.MatOfPoint3f; diff --git a/photon-core/src/main/java/org/photonvision/vision/target/TargetOffsetPointEdge.java b/photon-core/src/main/java/org/photonvision/vision/target/TargetOffsetPointEdge.java index add407ea3..eccf287ec 100644 --- a/photon-core/src/main/java/org/photonvision/vision/target/TargetOffsetPointEdge.java +++ b/photon-core/src/main/java/org/photonvision/vision/target/TargetOffsetPointEdge.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; public enum TargetOffsetPointEdge { diff --git a/photon-core/src/main/java/org/photonvision/vision/target/TargetOrientation.java b/photon-core/src/main/java/org/photonvision/vision/target/TargetOrientation.java index 0820f0304..61b19c7f8 100644 --- a/photon-core/src/main/java/org/photonvision/vision/target/TargetOrientation.java +++ b/photon-core/src/main/java/org/photonvision/vision/target/TargetOrientation.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; public enum TargetOrientation { diff --git a/photon-core/src/main/java/org/photonvision/vision/target/TrackedTarget.java b/photon-core/src/main/java/org/photonvision/vision/target/TrackedTarget.java index 333ec0f56..ae7527e78 100644 --- a/photon-core/src/main/java/org/photonvision/vision/target/TrackedTarget.java +++ b/photon-core/src/main/java/org/photonvision/vision/target/TrackedTarget.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; -import edu.wpi.first.wpilibj.geometry.Transform2d; +import edu.wpi.first.math.geometry.Transform2d; import java.util.HashMap; import java.util.List; import org.opencv.core.Mat; diff --git a/photon-core/src/test/java/org/photonvision/common/BenchmarkTest.java b/photon-core/src/test/java/org/photonvision/common/BenchmarkTest.java index bbf83c6e6..9e1f1395b 100644 --- a/photon-core/src/test/java/org/photonvision/common/BenchmarkTest.java +++ b/photon-core/src/test/java/org/photonvision/common/BenchmarkTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common; import java.util.ArrayList; diff --git a/photon-core/src/test/java/org/photonvision/common/ShapeBenchmarkTest.java b/photon-core/src/test/java/org/photonvision/common/ShapeBenchmarkTest.java index 062a67b2c..61b3db7bf 100644 --- a/photon-core/src/test/java/org/photonvision/common/ShapeBenchmarkTest.java +++ b/photon-core/src/test/java/org/photonvision/common/ShapeBenchmarkTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common; /* * Copyright (C) 2020 Photon Vision. diff --git a/photon-core/src/test/java/org/photonvision/common/configuration/ConfigTest.java b/photon-core/src/test/java/org/photonvision/common/configuration/ConfigTest.java index a4477d9e9..4af8b4ae6 100644 --- a/photon-core/src/test/java/org/photonvision/common/configuration/ConfigTest.java +++ b/photon-core/src/test/java/org/photonvision/common/configuration/ConfigTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.configuration; import java.io.File; @@ -35,7 +34,6 @@ import org.photonvision.vision.pipeline.ReflectivePipelineSettings; import org.photonvision.vision.target.TargetModel; public class ConfigTest { - private static ConfigManager configMgr; private static final CameraConfiguration cameraConfig = new CameraConfiguration("TestCamera", "/dev/video420"); @@ -87,7 +85,6 @@ public class ConfigTest { @Test @Order(2) public void deserializeConfig() { - var reflectivePipelineSettings = configMgr.getConfig().getCameraConfigurations().get("TestCamera").pipelineSettings.get(0); var coloredShapePipelineSettings = diff --git a/photon-core/src/test/java/org/photonvision/common/configuration/NetworkConfigTest.java b/photon-core/src/test/java/org/photonvision/common/configuration/NetworkConfigTest.java index 181598bc3..bea4513c6 100644 --- a/photon-core/src/test/java/org/photonvision/common/configuration/NetworkConfigTest.java +++ b/photon-core/src/test/java/org/photonvision/common/configuration/NetworkConfigTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.configuration; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/photon-core/src/test/java/org/photonvision/common/util/LogFileManagementTest.java b/photon-core/src/test/java/org/photonvision/common/util/LogFileManagementTest.java index e591ef7bc..9a9d4f29b 100644 --- a/photon-core/src/test/java/org/photonvision/common/util/LogFileManagementTest.java +++ b/photon-core/src/test/java/org/photonvision/common/util/LogFileManagementTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util; import java.io.File; @@ -32,10 +31,8 @@ import org.photonvision.common.configuration.ConfigManager; import org.photonvision.common.logging.Logger; public class LogFileManagementTest { - @Test public void fileCleanupTest() throws IOException { - // Ensure we instantiate the new log correctly ConfigManager.getInstance(); diff --git a/photon-core/src/test/java/org/photonvision/common/util/TimedTaskManagerTest.java b/photon-core/src/test/java/org/photonvision/common/util/TimedTaskManagerTest.java index 2b8d31de5..b193db25c 100644 --- a/photon-core/src/test/java/org/photonvision/common/util/TimedTaskManagerTest.java +++ b/photon-core/src/test/java/org/photonvision/common/util/TimedTaskManagerTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.util; import java.util.concurrent.atomic.AtomicInteger; @@ -22,7 +21,6 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class TimedTaskManagerTest { - @Test public void atomicIntegerIncrementTest() throws InterruptedException { AtomicInteger i = new AtomicInteger(); diff --git a/photon-core/src/test/java/org/photonvision/hardware/HardwareConfigTest.java b/photon-core/src/test/java/org/photonvision/hardware/HardwareConfigTest.java index af484140f..ac0f81718 100644 --- a/photon-core/src/test/java/org/photonvision/hardware/HardwareConfigTest.java +++ b/photon-core/src/test/java/org/photonvision/hardware/HardwareConfigTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.hardware; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -28,7 +27,6 @@ import org.photonvision.common.hardware.GPIO.CustomGPIO; import org.photonvision.common.util.TestUtils; public class HardwareConfigTest { - @Test public void loadJson() { try { diff --git a/photon-core/src/test/java/org/photonvision/hardware/HardwareManagerTest.java b/photon-core/src/test/java/org/photonvision/hardware/HardwareManagerTest.java index 25a582119..3746c0c99 100644 --- a/photon-core/src/test/java/org/photonvision/hardware/HardwareManagerTest.java +++ b/photon-core/src/test/java/org/photonvision/hardware/HardwareManagerTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.hardware; import org.junit.jupiter.api.Assumptions; @@ -27,7 +26,6 @@ import org.photonvision.common.logging.LogGroup; import org.photonvision.common.logging.Logger; public class HardwareManagerTest { - public static final Logger logger = new Logger(HardwareManager.class, LogGroup.General); @Test diff --git a/photon-core/src/test/java/org/photonvision/hardware/HardwareTest.java b/photon-core/src/test/java/org/photonvision/hardware/HardwareTest.java index b2a13cf4d..fd6610d52 100644 --- a/photon-core/src/test/java/org/photonvision/hardware/HardwareTest.java +++ b/photon-core/src/test/java/org/photonvision/hardware/HardwareTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.hardware; import static org.junit.jupiter.api.Assertions.*; @@ -29,7 +28,6 @@ import org.photonvision.common.hardware.metrics.GPUMetrics; import org.photonvision.common.hardware.metrics.RAMMetrics; public class HardwareTest { - @Test public void testHardware() { CPUMetrics cpuMetrics = new CPUMetrics(); diff --git a/photon-core/src/test/java/org/photonvision/vision/QuirkyCameraTest.java b/photon-core/src/test/java/org/photonvision/vision/QuirkyCameraTest.java index 45517ee02..0deb30605 100644 --- a/photon-core/src/test/java/org/photonvision/vision/QuirkyCameraTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/QuirkyCameraTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision; import java.util.HashMap; diff --git a/photon-core/src/test/java/org/photonvision/vision/frame/provider/AcceleratedPicamFrameProviderTest.java b/photon-core/src/test/java/org/photonvision/vision/frame/provider/AcceleratedPicamFrameProviderTest.java index a62285438..b6d0559d7 100644 --- a/photon-core/src/test/java/org/photonvision/vision/frame/provider/AcceleratedPicamFrameProviderTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/frame/provider/AcceleratedPicamFrameProviderTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame.provider; import java.io.IOException; diff --git a/photon-core/src/test/java/org/photonvision/vision/frame/provider/FileFrameProviderTest.java b/photon-core/src/test/java/org/photonvision/vision/frame/provider/FileFrameProviderTest.java index dfe31f289..ab2f5d40e 100644 --- a/photon-core/src/test/java/org/photonvision/vision/frame/provider/FileFrameProviderTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/frame/provider/FileFrameProviderTest.java @@ -14,12 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.frame.provider; import static org.junit.jupiter.api.Assertions.*; -import edu.wpi.cscore.CameraServerCvJNI; +import edu.wpi.first.cscore.CameraServerCvJNI; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; @@ -29,10 +28,8 @@ import org.photonvision.common.util.TestUtils; import org.photonvision.vision.frame.Frame; public class FileFrameProviderTest { - @BeforeAll public static void initPath() { - try { CameraServerCvJNI.forceLoad(); } catch (IOException e) { diff --git a/photon-core/src/test/java/org/photonvision/vision/opencv/ContourTest.java b/photon-core/src/test/java/org/photonvision/vision/opencv/ContourTest.java index 6e6c6fb17..eb38bf437 100644 --- a/photon-core/src/test/java/org/photonvision/vision/opencv/ContourTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/opencv/ContourTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.opencv; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/photon-core/src/test/java/org/photonvision/vision/pipeline/Calibrate3dPipeTest.java b/photon-core/src/test/java/org/photonvision/vision/pipeline/Calibrate3dPipeTest.java index 2beadbb7e..32e8ab195 100644 --- a/photon-core/src/test/java/org/photonvision/vision/pipeline/Calibrate3dPipeTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/pipeline/Calibrate3dPipeTest.java @@ -14,13 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import static org.junit.jupiter.api.Assertions.*; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.util.Units; import java.io.File; import java.nio.file.Path; import java.util.ArrayList; @@ -30,10 +29,10 @@ import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Triple; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.opencv.calib3d.Calib3d; import org.opencv.core.Mat; import org.opencv.core.Size; import org.opencv.imgcodecs.Imgcodecs; -import org.opencv.imgproc.Imgproc; import org.photonvision.common.util.TestUtils; import org.photonvision.vision.calibration.CameraCalibrationCoefficients; import org.photonvision.vision.camera.QuirkyCamera; @@ -87,7 +86,6 @@ public class Calibrate3dPipeTest { @Test public void calibrationPipelineTest() { - int startMatCount = CVMat.getMatCount(); File dir = new File(TestUtils.getDotBoardImagesPath().toAbsolutePath().toString()); @@ -249,7 +247,6 @@ public class Calibrate3dPipeTest { double boardGridSize_m, double expectedXCenter, double expectedYCenter) { - int startMatCount = CVMat.getMatCount(); File[] directoryListing = rootFolder.listFiles(); @@ -333,7 +330,7 @@ public class Calibrate3dPipeTest { if (file.isFile()) { Mat raw = Imgcodecs.imread(file.getAbsolutePath()); Mat undistorted = new Mat(new Size(imgRes.width * 2, imgRes.height * 2), raw.type()); - Imgproc.undistort( + Calib3d.undistort( raw, undistorted, cal.cameraIntrinsics.getAsMat(), cal.cameraExtrinsics.getAsMat()); TestUtils.showImage(undistorted, "undistorted " + file.getName(), 1); raw.release(); diff --git a/photon-core/src/test/java/org/photonvision/vision/pipeline/CirclePNPTest.java b/photon-core/src/test/java/org/photonvision/vision/pipeline/CirclePNPTest.java index c38433d8c..bbe3f6146 100644 --- a/photon-core/src/test/java/org/photonvision/vision/pipeline/CirclePNPTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/pipeline/CirclePNPTest.java @@ -14,12 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import static org.junit.jupiter.api.Assertions.*; -import edu.wpi.first.wpilibj.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Rotation2d; import java.util.stream.Collectors; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -37,7 +36,6 @@ import org.photonvision.vision.target.TargetModel; import org.photonvision.vision.target.TrackedTarget; public class CirclePNPTest { - private static final String LIFECAM_240P_CAL_FILE = "lifecam240p.json"; private static final String LIFECAM_480P_CAL_FILE = "lifecam480p.json"; diff --git a/photon-core/src/test/java/org/photonvision/vision/pipeline/ColoredShapePipelineTest.java b/photon-core/src/test/java/org/photonvision/vision/pipeline/ColoredShapePipelineTest.java index c774a43ad..8f5d3680a 100644 --- a/photon-core/src/test/java/org/photonvision/vision/pipeline/ColoredShapePipelineTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/pipeline/ColoredShapePipelineTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import org.junit.jupiter.api.Test; @@ -28,7 +27,6 @@ import org.photonvision.vision.opencv.ContourShape; import org.photonvision.vision.pipeline.result.CVPipelineResult; public class ColoredShapePipelineTest { - public static void testTriangleDetection( ColoredShapePipeline pipeline, ColoredShapePipelineSettings settings, Frame frame) { pipeline.settings = settings; @@ -72,7 +70,6 @@ public class ColoredShapePipelineTest { @Test public static void testPowercellDetection( ColoredShapePipelineSettings settings, ColoredShapePipeline pipeline) { - settings.hsvHue.set(10, 40); settings.hsvSaturation.set(100, 255); settings.hsvValue.set(100, 255); diff --git a/photon-core/src/test/java/org/photonvision/vision/pipeline/PipelineProfilerTest.java b/photon-core/src/test/java/org/photonvision/vision/pipeline/PipelineProfilerTest.java index 11b410f88..1d6eece9e 100644 --- a/photon-core/src/test/java/org/photonvision/vision/pipeline/PipelineProfilerTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/pipeline/PipelineProfilerTest.java @@ -14,14 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class PipelineProfilerTest { - @Test public void reflectiveProfile() { long[] invalidNanos = new long[20]; diff --git a/photon-core/src/test/java/org/photonvision/vision/pipeline/ReflectivePipelineTest.java b/photon-core/src/test/java/org/photonvision/vision/pipeline/ReflectivePipelineTest.java index e47df81ed..f2dcd1339 100644 --- a/photon-core/src/test/java/org/photonvision/vision/pipeline/ReflectivePipelineTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/pipeline/ReflectivePipelineTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import org.junit.jupiter.api.Assertions; @@ -29,7 +28,6 @@ import org.photonvision.vision.opencv.ContourIntersectionDirection; import org.photonvision.vision.pipeline.result.CVPipelineResult; public class ReflectivePipelineTest { - @Test public void test2019() { TestUtils.loadLibraries(); diff --git a/photon-core/src/test/java/org/photonvision/vision/pipeline/SolvePNPTest.java b/photon-core/src/test/java/org/photonvision/vision/pipeline/SolvePNPTest.java index 5b5c61ace..a341202f2 100644 --- a/photon-core/src/test/java/org/photonvision/vision/pipeline/SolvePNPTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/pipeline/SolvePNPTest.java @@ -14,14 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.pipeline; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.util.Units; import java.util.stream.Collectors; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; @@ -40,7 +39,6 @@ import org.photonvision.vision.target.TargetModel; import org.photonvision.vision.target.TrackedTarget; public class SolvePNPTest { - private static final String LIFECAM_240P_CAL_FILE = "lifecam240p.json"; private static final String LIFECAM_480P_CAL_FILE = "lifecam480p.json"; diff --git a/photon-core/src/test/java/org/photonvision/vision/processes/PipelineManagerTest.java b/photon-core/src/test/java/org/photonvision/vision/processes/PipelineManagerTest.java index 30fbf74f0..67bfa20b5 100644 --- a/photon-core/src/test/java/org/photonvision/vision/processes/PipelineManagerTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/processes/PipelineManagerTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; import java.util.ArrayList; @@ -26,7 +25,6 @@ import org.photonvision.vision.pipeline.DriverModePipelineSettings; import org.photonvision.vision.pipeline.PipelineType; public class PipelineManagerTest { - @Test public void testUniqueName() { TestUtils.loadLibraries(); diff --git a/photon-core/src/test/java/org/photonvision/vision/processes/VisionModuleManagerTest.java b/photon-core/src/test/java/org/photonvision/vision/processes/VisionModuleManagerTest.java index 99ffe1d3b..8caaa09e6 100644 --- a/photon-core/src/test/java/org/photonvision/vision/processes/VisionModuleManagerTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/processes/VisionModuleManagerTest.java @@ -14,13 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; import static org.junit.jupiter.api.Assertions.assertTrue; -import edu.wpi.cscore.VideoMode; -import edu.wpi.first.wpilibj.geometry.Rotation2d; +import edu.wpi.first.cscore.VideoMode; +import edu.wpi.first.math.geometry.Rotation2d; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -36,14 +35,12 @@ import org.photonvision.vision.frame.provider.FileFrameProvider; import org.photonvision.vision.pipeline.result.CVPipelineResult; public class VisionModuleManagerTest { - @BeforeEach public void init() { TestUtils.loadLibraries(); } private static class TestSource extends VisionSource { - private final FrameProvider provider; public TestSource(FrameProvider provider, CameraConfiguration cameraConfiguration) { @@ -68,7 +65,6 @@ public class VisionModuleManagerTest { } private static class TestSettables extends VisionSourceSettables { - protected TestSettables(CameraConfiguration configuration) { super(configuration); } diff --git a/photon-core/src/test/java/org/photonvision/vision/processes/VisionSourceManagerTest.java b/photon-core/src/test/java/org/photonvision/vision/processes/VisionSourceManagerTest.java index af6831a3a..04b126ccd 100644 --- a/photon-core/src/test/java/org/photonvision/vision/processes/VisionSourceManagerTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/processes/VisionSourceManagerTest.java @@ -14,13 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.processes; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import edu.wpi.cscore.UsbCameraInfo; +import edu.wpi.first.cscore.UsbCameraInfo; import java.util.ArrayList; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/photon-core/src/test/java/org/photonvision/vision/target/TargetCalculationsTest.java b/photon-core/src/test/java/org/photonvision/vision/target/TargetCalculationsTest.java index 6afcba9d6..72df9cad5 100644 --- a/photon-core/src/test/java/org/photonvision/vision/target/TargetCalculationsTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/target/TargetCalculationsTest.java @@ -14,12 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; import static org.junit.jupiter.api.Assertions.assertEquals; -import edu.wpi.first.wpilibj.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Rotation2d; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/photon-core/src/test/java/org/photonvision/vision/target/TrackedTargetTest.java b/photon-core/src/test/java/org/photonvision/vision/target/TrackedTargetTest.java index 5d4b2095f..f58f35572 100644 --- a/photon-core/src/test/java/org/photonvision/vision/target/TrackedTargetTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/target/TrackedTargetTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.vision.target; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/photon-lib/build.gradle b/photon-lib/build.gradle index 33f9441ea..8bd671ce6 100644 --- a/photon-lib/build.gradle +++ b/photon-lib/build.gradle @@ -16,7 +16,7 @@ def jniPlatforms = ['linuxaarch64bionic', 'linuxraspbian', 'linuxx86-64', 'osxx8 // Apply Java configuration dependencies { - compile project(":photon-targeting") + implementation project(":photon-targeting") // WPILib non-JNI dependencies implementation "edu.wpi.first.cscore:cscore-java:$wpilibVersion" @@ -24,15 +24,15 @@ dependencies { implementation "edu.wpi.first.wpilibj:wpilibj-java:$wpilibVersion" implementation "edu.wpi.first.wpiutil:wpiutil-java:$wpilibVersion" implementation "edu.wpi.first.wpimath:wpimath-java:$wpilibVersion" - implementation "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:3.4.7-2" + implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:$opencvVersion" // NTCore implementation "edu.wpi.first.ntcore:ntcore-java:$wpilibVersion" - jniPlatforms.each { compile "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:$it" } + jniPlatforms.each { implementation "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:$it" } // HAL implementation "edu.wpi.first.hal:hal-java:$wpilibVersion" - jniPlatforms.each {compile "edu.wpi.first.hal:hal-jni:$wpilibVersion:$it"} + jniPlatforms.each { implementation "edu.wpi.first.hal:hal-jni:$wpilibVersion:$it"} // Junit testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.2") diff --git a/photon-lib/src/main/java/org/photonvision/PhotonCamera.java b/photon-lib/src/main/java/org/photonvision/PhotonCamera.java index d3a7914df..5b3b23475 100644 --- a/photon-lib/src/main/java/org/photonvision/PhotonCamera.java +++ b/photon-lib/src/main/java/org/photonvision/PhotonCamera.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; import edu.wpi.first.networktables.NetworkTable; diff --git a/photon-lib/src/main/java/org/photonvision/PhotonTargetSortMode.java b/photon-lib/src/main/java/org/photonvision/PhotonTargetSortMode.java index a173cd5cf..5bd93819e 100644 --- a/photon-lib/src/main/java/org/photonvision/PhotonTargetSortMode.java +++ b/photon-lib/src/main/java/org/photonvision/PhotonTargetSortMode.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; import java.util.Comparator; diff --git a/photon-lib/src/main/java/org/photonvision/PhotonUtils.java b/photon-lib/src/main/java/org/photonvision/PhotonUtils.java index d1b5182f2..753485e7f 100644 --- a/photon-lib/src/main/java/org/photonvision/PhotonUtils.java +++ b/photon-lib/src/main/java/org/photonvision/PhotonUtils.java @@ -14,13 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.geometry.Translation2d; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.geometry.Translation2d; public final class PhotonUtils { private PhotonUtils() { @@ -35,7 +34,7 @@ public final class PhotonUtils { * for there to exist a height differential between goal and camera. The larger this differential, * the more accurate the distance estimate will be. * - *

Units can be converted using the {@link edu.wpi.first.wpilibj.util.Units} class. + *

Units can be converted using the {@link edu.wpi.first.math.util.Units} class. * * @param cameraHeightMeters The physical height of the camera off the floor in meters. * @param targetHeightMeters The physical height of the target off the floor in meters. This diff --git a/photon-lib/src/main/java/org/photonvision/SimPhotonCamera.java b/photon-lib/src/main/java/org/photonvision/SimPhotonCamera.java index a972c82d7..ce7369793 100644 --- a/photon-lib/src/main/java/org/photonvision/SimPhotonCamera.java +++ b/photon-lib/src/main/java/org/photonvision/SimPhotonCamera.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; import edu.wpi.first.networktables.NetworkTable; diff --git a/photon-lib/src/main/java/org/photonvision/SimVisionSystem.java b/photon-lib/src/main/java/org/photonvision/SimVisionSystem.java index a8ff9c265..9981ba901 100644 --- a/photon-lib/src/main/java/org/photonvision/SimVisionSystem.java +++ b/photon-lib/src/main/java/org/photonvision/SimVisionSystem.java @@ -14,12 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.util.Units; import java.util.ArrayList; import org.photonvision.targeting.PhotonTrackedTarget; diff --git a/photon-lib/src/main/java/org/photonvision/SimVisionTarget.java b/photon-lib/src/main/java/org/photonvision/SimVisionTarget.java index 7d0064afc..332afe00e 100644 --- a/photon-lib/src/main/java/org/photonvision/SimVisionTarget.java +++ b/photon-lib/src/main/java/org/photonvision/SimVisionTarget.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; -import edu.wpi.first.wpilibj.geometry.Pose2d; +import edu.wpi.first.math.geometry.Pose2d; public class SimVisionTarget { Pose2d targetPos; diff --git a/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp b/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp index e50302507..dd925f972 100644 --- a/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp +++ b/photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp @@ -48,7 +48,7 @@ PhotonPipelineResult PhotonCamera::GetLatestResult() const { std::shared_ptr ntvalue = rawBytesEntry.GetValue(); if (!ntvalue) return result; - std::string value = ntvalue->GetRaw(); + std::string value{ntvalue->GetRaw()}; std::vector bytes{value.begin(), value.end()}; photonlib::Packet packet{bytes}; diff --git a/photon-lib/src/main/native/cpp/photonlib/PhotonPipelineResult.cpp b/photon-lib/src/main/native/cpp/photonlib/PhotonPipelineResult.cpp index 5f4b726fa..294f4576a 100644 --- a/photon-lib/src/main/native/cpp/photonlib/PhotonPipelineResult.cpp +++ b/photon-lib/src/main/native/cpp/photonlib/PhotonPipelineResult.cpp @@ -19,7 +19,7 @@ namespace photonlib { PhotonPipelineResult::PhotonPipelineResult( - units::second_t latency, wpi::ArrayRef targets) + units::second_t latency, wpi::span targets) : latency(latency), targets(targets.data(), targets.data() + targets.size()) {} @@ -33,7 +33,7 @@ bool PhotonPipelineResult::operator!=(const PhotonPipelineResult& other) const { Packet& operator<<(Packet& packet, const PhotonPipelineResult& result) { // Encode latency and number of targets. - packet << result.latency.to() * 1000 + packet << result.latency.value() * 1000 << static_cast(result.targets.size()); // Encode the information of each target. diff --git a/photon-lib/src/main/native/cpp/photonlib/PhotonTrackedTarget.cpp b/photon-lib/src/main/native/cpp/photonlib/PhotonTrackedTarget.cpp index d5005e747..ef0b52e6a 100644 --- a/photon-lib/src/main/native/cpp/photonlib/PhotonTrackedTarget.cpp +++ b/photon-lib/src/main/native/cpp/photonlib/PhotonTrackedTarget.cpp @@ -39,9 +39,9 @@ bool PhotonTrackedTarget::operator!=(const PhotonTrackedTarget& other) const { Packet& operator<<(Packet& packet, const PhotonTrackedTarget& target) { return packet << target.yaw << target.pitch << target.area << target.skew - << target.cameraToTarget.Translation().X().to() - << target.cameraToTarget.Translation().Y().to() - << target.cameraToTarget.Rotation().Degrees().to(); + << target.cameraToTarget.Translation().X().value() + << target.cameraToTarget.Translation().Y().value() + << target.cameraToTarget.Rotation().Degrees().value(); } Packet& operator>>(Packet& packet, PhotonTrackedTarget& target) { diff --git a/photon-lib/src/main/native/cpp/photonlib/SimPhotonCamera.cpp b/photon-lib/src/main/native/cpp/photonlib/SimPhotonCamera.cpp index ce8f4e2c6..ac8e71abb 100644 --- a/photon-lib/src/main/native/cpp/photonlib/SimPhotonCamera.cpp +++ b/photon-lib/src/main/native/cpp/photonlib/SimPhotonCamera.cpp @@ -26,7 +26,7 @@ SimPhotonCamera::SimPhotonCamera(const std::string& cameraName) : PhotonCamera(cameraName) {} void SimPhotonCamera::SubmitProcessedFrame( - units::second_t latency, wpi::ArrayRef tgtList) { + units::second_t latency, wpi::span tgtList) { if (!GetDriverMode()) { // Clear the current packet. simPacket.Clear(); @@ -34,8 +34,8 @@ void SimPhotonCamera::SubmitProcessedFrame( // Create the new result and pump it into the packet simPacket << PhotonPipelineResult(latency, tgtList); - rawBytesEntry.SetRaw( - wpi::StringRef(simPacket.GetData().data(), simPacket.GetData().size())); + rawBytesEntry.SetRaw(std::string_view{simPacket.GetData().data(), + simPacket.GetData().size()}); } } diff --git a/photon-lib/src/main/native/cpp/photonlib/SimVisionSystem.cpp b/photon-lib/src/main/native/cpp/photonlib/SimVisionSystem.cpp index 971dc6fb0..aa8b8b854 100644 --- a/photon-lib/src/main/native/cpp/photonlib/SimVisionSystem.cpp +++ b/photon-lib/src/main/native/cpp/photonlib/SimVisionSystem.cpp @@ -21,6 +21,7 @@ #include #include +#include namespace photonlib { @@ -73,36 +74,34 @@ void SimVisionSystem::ProcessFrame(frc::Pose2d robotPose) { units::meter_t distHypot = units::math::hypot(distAlongGround, distVertical); - double area = tgt.tgtArea.to() / GetM2PerPx(distAlongGround); + double area = tgt.tgtArea.value() / GetM2PerPx(distAlongGround); // 2D yaw mode considers the target as a point, and should ignore target // rotation. // Photon reports it in the correct robot reference frame. // IE: targets to the left of the image should report negative yaw. - units::degree_t yawAngle = - -1.0 * units::math::atan2(camToTargetTrans.Translation().Y(), - camToTargetTrans.Translation().X()); + units::degree_t yawAngle = -units::math::atan2( + camToTargetTrans.Translation().Y(), camToTargetTrans.Translation().X()); units::degree_t pitchAngle = units::math::atan2(distVertical, distAlongGround) - camPitch; if (CamCanSeeTarget(distHypot, yawAngle, pitchAngle, area)) { - PhotonTrackedTarget newTgt = - PhotonTrackedTarget(yawAngle.to(), pitchAngle.to(), - area, 0.0, camToTargetTrans); + PhotonTrackedTarget newTgt = PhotonTrackedTarget( + yawAngle.value(), pitchAngle.value(), area, 0.0, camToTargetTrans); visibleTgtList.push_back(newTgt); } } units::second_t procDelay(0.0); // Future - tie this to something meaningful - cam.SubmitProcessedFrame( - procDelay, wpi::MutableArrayRef(visibleTgtList)); + cam.SubmitProcessedFrame(procDelay, + wpi::span(visibleTgtList)); } double SimVisionSystem::GetM2PerPx(units::meter_t dist) { - double heightMPerPx = 2 * dist.to() * - units::math::tan(camVertFOV / 2) / cameraResHeight; - double widthMPerPx = 2 * dist.to() * - units::math::tan(camHorizFOV / 2) / cameraResWidth; + double heightMPerPx = + 2 * dist.value() * units::math::tan(camVertFOV / 2) / cameraResHeight; + double widthMPerPx = + 2 * dist.value() * units::math::tan(camHorizFOV / 2) / cameraResWidth; return widthMPerPx * heightMPerPx; } diff --git a/photon-lib/src/main/native/include/photonlib/PhotonPipelineResult.h b/photon-lib/src/main/native/include/photonlib/PhotonPipelineResult.h index 413d2529e..f1e906b56 100644 --- a/photon-lib/src/main/native/include/photonlib/PhotonPipelineResult.h +++ b/photon-lib/src/main/native/include/photonlib/PhotonPipelineResult.h @@ -19,10 +19,10 @@ #include -#include +#include #include -#include #include +#include #include "photonlib/Packet.h" #include "photonlib/PhotonTrackedTarget.h" @@ -44,7 +44,7 @@ class PhotonPipelineResult { * @param targets The list of targets identified by the pipeline. */ PhotonPipelineResult(units::second_t latency, - wpi::ArrayRef targets); + wpi::span targets); /** * Returns the best target in this pipeline result. If there are no targets, @@ -55,7 +55,8 @@ class PhotonPipelineResult { */ PhotonTrackedTarget GetBestTarget() const { if (!HasTargets() && !HAS_WARNED) { - ::frc::DriverStation::ReportError( + FRC_ReportError( + frc::warn::Warning, "{}", "This PhotonPipelineResult object has no targets associated with it! " "Please check HasTargets() before calling this method. For more " "information, please review the PhotonLib documentation at " @@ -81,7 +82,7 @@ class PhotonPipelineResult { * Returns a reference to the vector of targets. * @return A reference to the vector of targets. */ - const wpi::ArrayRef GetTargets() const { + const wpi::span GetTargets() const { return targets; } diff --git a/photon-lib/src/main/native/include/photonlib/SimPhotonCamera.h b/photon-lib/src/main/native/include/photonlib/SimPhotonCamera.h index 1a53138b4..c82efd86d 100644 --- a/photon-lib/src/main/native/include/photonlib/SimPhotonCamera.h +++ b/photon-lib/src/main/native/include/photonlib/SimPhotonCamera.h @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include "photonlib/Packet.h" #include "photonlib/PhotonCamera.h" @@ -56,7 +56,7 @@ class SimPhotonCamera : public PhotonCamera { * @param tgtList Set of targets detected */ void SubmitProcessedFrame(units::second_t latency, - wpi::ArrayRef tgtList); + wpi::span tgtList); private: mutable Packet simPacket; diff --git a/photon-lib/src/main/native/include/photonlib/SimVisionSystem.h b/photon-lib/src/main/native/include/photonlib/SimVisionSystem.h index 419ac63f6..479d7793b 100644 --- a/photon-lib/src/main/native/include/photonlib/SimVisionSystem.h +++ b/photon-lib/src/main/native/include/photonlib/SimVisionSystem.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include "photonlib/SimPhotonCamera.h" diff --git a/photon-lib/src/test/java/org/photonvision/PacketTest.java b/photon-lib/src/test/java/org/photonvision/PacketTest.java index 0b4d5a7f3..55d231257 100644 --- a/photon-lib/src/test/java/org/photonvision/PacketTest.java +++ b/photon-lib/src/test/java/org/photonvision/PacketTest.java @@ -14,12 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.geometry.Translation2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.geometry.Translation2d; import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.Assertions; diff --git a/photon-lib/src/test/java/org/photonvision/PhotonCameraTest.java b/photon-lib/src/test/java/org/photonvision/PhotonCameraTest.java index b405415bd..299f37df8 100644 --- a/photon-lib/src/test/java/org/photonvision/PhotonCameraTest.java +++ b/photon-lib/src/test/java/org/photonvision/PhotonCameraTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; import org.junit.jupiter.api.Assertions; diff --git a/photon-lib/src/test/java/org/photonvision/PhotonUtilTest.java b/photon-lib/src/test/java/org/photonvision/PhotonUtilTest.java index 85e652c3a..812f31632 100644 --- a/photon-lib/src/test/java/org/photonvision/PhotonUtilTest.java +++ b/photon-lib/src/test/java/org/photonvision/PhotonUtilTest.java @@ -14,13 +14,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.util.Units; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/photon-lib/src/test/java/org/photonvision/PhotonVersionTest.java b/photon-lib/src/test/java/org/photonvision/PhotonVersionTest.java index 86e750f30..2a7de07ac 100644 --- a/photon-lib/src/test/java/org/photonvision/PhotonVersionTest.java +++ b/photon-lib/src/test/java/org/photonvision/PhotonVersionTest.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; import java.util.regex.Matcher; diff --git a/photon-lib/src/test/java/org/photonvision/SimVisionSystemTest.java b/photon-lib/src/test/java/org/photonvision/SimVisionSystemTest.java index 520ebe731..f5e7442c3 100644 --- a/photon-lib/src/test/java/org/photonvision/SimVisionSystemTest.java +++ b/photon-lib/src/test/java/org/photonvision/SimVisionSystemTest.java @@ -14,18 +14,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.geometry.Translation2d; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.geometry.Translation2d; +import edu.wpi.first.math.util.Units; import java.util.List; import java.util.stream.Stream; import org.junit.jupiter.api.Assertions; @@ -214,7 +213,7 @@ class SimVisionSystemTest { // If the camera is pitched down by 10 degrees, the target should appear // in the upper part of the image (ie, pitch positive). Therefor, // pass/fail involves -1.0. - assertEquals(tgt.getPitch(), -1.0 * testPitch, 0.0001); + assertEquals(tgt.getPitch(), -testPitch, 0.0001); } private static Stream distCalCParamProvider() { diff --git a/photon-lib/src/test/native/cpp/SimVisionSystemTest.cpp b/photon-lib/src/test/native/cpp/SimVisionSystemTest.cpp index a1673fce0..da0437c5c 100644 --- a/photon-lib/src/test/native/cpp/SimVisionSystemTest.cpp +++ b/photon-lib/src/test/native/cpp/SimVisionSystemTest.cpp @@ -64,7 +64,7 @@ TEST_P(SimVisionSystemDistParamTest, DistanceAligned) { .GetCameraRelativePose() .Translation() .Norm() - .to(), + .value(), dist); } @@ -294,7 +294,7 @@ TEST_P(SimVisionSystemCameraPitchParamTest, CameraPitch) { // If the camera is pitched down by 10 degrees, the target should appear // in the upper part of the image (ie, pitch positive). Therefor, // pass/fail involves -1.0. - EXPECT_DOUBLE_EQ(tgt.GetPitch(), -1.0 * testPitch); + EXPECT_DOUBLE_EQ(tgt.GetPitch(), -testPitch); } class SimVisionSystemDistCalcParamTest @@ -350,7 +350,7 @@ TEST_P(SimVisionSystemDistCalcParamTest, DistanceCalc) { units::meter_t distMeas = photonlib::PhotonUtils::CalculateDistanceToTarget( units::meter_t(testHeight), units::meter_t(testDist), units::degree_t(testPitch), units::degree_t(tgt.GetPitch())); - EXPECT_DOUBLE_EQ(distMeas.to(), testDist); + EXPECT_DOUBLE_EQ(distMeas.value(), testDist); } TEST(SimVisionSystemTest, MultipleTargets) { diff --git a/photon-server/.gitignore b/photon-server/.gitignore index 2e0905a34..4faca75e2 100644 --- a/photon-server/.gitignore +++ b/photon-server/.gitignore @@ -8,4 +8,4 @@ bin/* build build/* photonvision/* -photonvision_config/* \ No newline at end of file +photonvision_config/* diff --git a/photon-server/build.gradle b/photon-server/build.gradle index d6731cfbc..08dbd4f24 100644 --- a/photon-server/build.gradle +++ b/photon-server/build.gradle @@ -19,7 +19,7 @@ dependencies { implementation "org.msgpack:msgpack-core:0.8.20" implementation "org.msgpack:jackson-dataformat-msgpack:0.8.20" - compile "org.slf4j:slf4j-simple:1.8.0-beta4" + implementation "org.slf4j:slf4j-simple:1.8.0-beta4" } shadowJar { @@ -75,8 +75,8 @@ remotes { } } -import java.io.*; -import java.net.*; +import java.io.*; +import java.net.*; task findDeployTarget { doLast { @@ -138,4 +138,3 @@ task deploy { } } } - diff --git a/photon-server/netTest.json b/photon-server/netTest.json index a28a23a86..dcfbb1247 100644 --- a/photon-server/netTest.json +++ b/photon-server/netTest.json @@ -1 +1 @@ -{"teamNumber":0,"connectionType":"DHCP","staticIp":"","hostname":"photonvision","runNTServer":false,"shouldManage":false} \ No newline at end of file +{"teamNumber":0,"connectionType":"DHCP","staticIp":"","hostname":"photonvision","runNTServer":false,"shouldManage":false} diff --git a/photon-server/settings.gradle b/photon-server/settings.gradle index 8771f3c13..541fb9afd 100644 --- a/photon-server/settings.gradle +++ b/photon-server/settings.gradle @@ -1,2 +1 @@ rootProject.name = 'photon-server' - diff --git a/photon-server/src/main/java/org/photonvision/Main.java b/photon-server/src/main/java/org/photonvision/Main.java index 98e51c542..99000b068 100644 --- a/photon-server/src/main/java/org/photonvision/Main.java +++ b/photon-server/src/main/java/org/photonvision/Main.java @@ -14,10 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; -import edu.wpi.cscore.CameraServerCvJNI; +import edu.wpi.first.cscore.CameraServerCvJNI; import java.util.ArrayList; import org.apache.commons.cli.*; import org.photonvision.common.configuration.CameraConfiguration; diff --git a/photon-server/src/main/java/org/photonvision/server/RequestHandler.java b/photon-server/src/main/java/org/photonvision/server/RequestHandler.java index 43c79dc22..fa58bb88e 100644 --- a/photon-server/src/main/java/org/photonvision/server/RequestHandler.java +++ b/photon-server/src/main/java/org/photonvision/server/RequestHandler.java @@ -14,12 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.server; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import edu.wpi.first.wpilibj.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Rotation2d; import io.javalin.http.Context; import java.io.File; import java.io.FileInputStream; @@ -49,7 +48,6 @@ public class RequestHandler { public static void onSettingUpload(Context ctx) { var file = ctx.uploadedFile("zipData"); if (file != null) { - // Copy the file from the client to a temporary location var tempFilePath = new File(Path.of(System.getProperty("java.io.tmpdir"), file.getFilename()).toString()); diff --git a/photon-server/src/main/java/org/photonvision/server/Server.java b/photon-server/src/main/java/org/photonvision/server/Server.java index e0370324b..c2a321e15 100644 --- a/photon-server/src/main/java/org/photonvision/server/Server.java +++ b/photon-server/src/main/java/org/photonvision/server/Server.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.server; import io.javalin.Javalin; @@ -25,7 +24,6 @@ public class Server { private static final Logger logger = new Logger(Server.class, LogGroup.WebServer); public static void main(int port) { - Javalin app = Javalin.create( config -> { diff --git a/photon-server/src/main/java/org/photonvision/server/SocketHandler.java b/photon-server/src/main/java/org/photonvision/server/SocketHandler.java index 708444b98..b0ead57dc 100644 --- a/photon-server/src/main/java/org/photonvision/server/SocketHandler.java +++ b/photon-server/src/main/java/org/photonvision/server/SocketHandler.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.server; import com.fasterxml.jackson.core.JsonProcessingException; @@ -43,7 +42,6 @@ import org.photonvision.vision.pipeline.PipelineType; @SuppressWarnings("rawtypes") public class SocketHandler { - private final Logger logger = new Logger(SocketHandler.class, LogGroup.WebServer); private final List users = new CopyOnWriteArrayList<>(); private final ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory()); diff --git a/photon-server/src/main/java/org/photonvision/server/SocketMessageType.java b/photon-server/src/main/java/org/photonvision/server/SocketMessageType.java index ff5ba3a36..935069619 100644 --- a/photon-server/src/main/java/org/photonvision/server/SocketMessageType.java +++ b/photon-server/src/main/java/org/photonvision/server/SocketMessageType.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.server; import java.util.EnumSet; diff --git a/photon-server/src/main/java/org/photonvision/server/UIInboundSubscriber.java b/photon-server/src/main/java/org/photonvision/server/UIInboundSubscriber.java index 8666edb09..14d147485 100644 --- a/photon-server/src/main/java/org/photonvision/server/UIInboundSubscriber.java +++ b/photon-server/src/main/java/org/photonvision/server/UIInboundSubscriber.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.server; import java.util.Collections; @@ -29,7 +28,6 @@ import org.photonvision.common.dataflow.events.OutgoingUIEvent; import org.photonvision.common.logging.Logger; public class UIInboundSubscriber extends DataChangeSubscriber { - public UIInboundSubscriber() { super( Collections.singletonList(DataChangeSource.DCS_WEBSOCKET), diff --git a/photon-server/src/main/java/org/photonvision/server/UIOutboundSubscriber.java b/photon-server/src/main/java/org/photonvision/server/UIOutboundSubscriber.java index a71b92822..72561f369 100644 --- a/photon-server/src/main/java/org/photonvision/server/UIOutboundSubscriber.java +++ b/photon-server/src/main/java/org/photonvision/server/UIOutboundSubscriber.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.server; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/photon-server/src/main/java/org/photonvision/server/UISettings.java b/photon-server/src/main/java/org/photonvision/server/UISettings.java index f4361c267..90e417e8e 100644 --- a/photon-server/src/main/java/org/photonvision/server/UISettings.java +++ b/photon-server/src/main/java/org/photonvision/server/UISettings.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.server; import org.photonvision.common.configuration.CameraConfiguration; diff --git a/photon-server/src/main/resources/calibration/lifecam240p.json b/photon-server/src/main/resources/calibration/lifecam240p.json index 349c450c8..954a1cc45 100644 --- a/photon-server/src/main/resources/calibration/lifecam240p.json +++ b/photon-server/src/main/resources/calibration/lifecam240p.json @@ -31,4 +31,4 @@ -1.462385758978924 ] } -} \ No newline at end of file +} diff --git a/photon-server/src/main/resources/calibration/lifecam480p.json b/photon-server/src/main/resources/calibration/lifecam480p.json index fff629bf6..a9a6ae4e4 100644 --- a/photon-server/src/main/resources/calibration/lifecam480p.json +++ b/photon-server/src/main/resources/calibration/lifecam480p.json @@ -31,4 +31,4 @@ 1.9833437176538498 ] } -} \ No newline at end of file +} diff --git a/photon-server/test.json b/photon-server/test.json index 10c0c2e72..173b493aa 100644 --- a/photon-server/test.json +++ b/photon-server/test.json @@ -1 +1 @@ -{"baseName":"aaaaaa","uniqueName":"aaaaaa","nickname":"aaaaaa","FOV":70.0,"path":"dev/vid","cameraType":"UsbCamera","currentPipelineIndex":0,"camPitch":{"radians":0.0},"calibrations":[], "cameraLEDs":[]} \ No newline at end of file +{"baseName":"aaaaaa","uniqueName":"aaaaaa","nickname":"aaaaaa","FOV":70.0,"path":"dev/vid","cameraType":"UsbCamera","currentPipelineIndex":0,"camPitch":{"radians":0.0},"calibrations":[], "cameraLEDs":[]} diff --git a/photon-targeting/.gitignore b/photon-targeting/.gitignore index 933a7e534..bad380c87 100644 --- a/photon-targeting/.gitignore +++ b/photon-targeting/.gitignore @@ -10,4 +10,4 @@ build/* photonvision/* photonvision_config/* -src/main/java/org/photonvision/PhotonVersion.java \ No newline at end of file +src/main/java/org/photonvision/PhotonVersion.java diff --git a/photon-targeting/settings.gradle b/photon-targeting/settings.gradle index 674b1ce85..68f151259 100644 --- a/photon-targeting/settings.gradle +++ b/photon-targeting/settings.gradle @@ -1,2 +1 @@ rootProject.name = 'photon-targeting' - diff --git a/photon-targeting/src/main/java/org/photonvision/common/dataflow/structures/Packet.java b/photon-targeting/src/main/java/org/photonvision/common/dataflow/structures/Packet.java index 479b09458..cb8056f0b 100644 --- a/photon-targeting/src/main/java/org/photonvision/common/dataflow/structures/Packet.java +++ b/photon-targeting/src/main/java/org/photonvision/common/dataflow/structures/Packet.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.dataflow.structures; /** A packet that holds byte-packed data to be sent over NetworkTables. */ diff --git a/photon-targeting/src/main/java/org/photonvision/common/hardware/VisionLEDMode.java b/photon-targeting/src/main/java/org/photonvision/common/hardware/VisionLEDMode.java index af95fc2cb..73e9ed295 100644 --- a/photon-targeting/src/main/java/org/photonvision/common/hardware/VisionLEDMode.java +++ b/photon-targeting/src/main/java/org/photonvision/common/hardware/VisionLEDMode.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.common.hardware; public enum VisionLEDMode { diff --git a/photon-targeting/src/main/java/org/photonvision/targeting/PhotonPipelineResult.java b/photon-targeting/src/main/java/org/photonvision/targeting/PhotonPipelineResult.java index 308964468..d9dcc435a 100644 --- a/photon-targeting/src/main/java/org/photonvision/targeting/PhotonPipelineResult.java +++ b/photon-targeting/src/main/java/org/photonvision/targeting/PhotonPipelineResult.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.targeting; import java.util.ArrayList; @@ -24,7 +23,6 @@ import org.photonvision.common.dataflow.structures.Packet; /** Represents a pipeline result from a PhotonCamera. */ public class PhotonPipelineResult { - private static boolean HAS_WARNED = false; // Targets to store. diff --git a/photon-targeting/src/main/java/org/photonvision/targeting/PhotonTrackedTarget.java b/photon-targeting/src/main/java/org/photonvision/targeting/PhotonTrackedTarget.java index 002c73724..fa141884c 100644 --- a/photon-targeting/src/main/java/org/photonvision/targeting/PhotonTrackedTarget.java +++ b/photon-targeting/src/main/java/org/photonvision/targeting/PhotonTrackedTarget.java @@ -14,12 +14,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision.targeting; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.geometry.Translation2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.geometry.Translation2d; import java.util.Objects; import org.photonvision.common.dataflow.structures.Packet; diff --git a/photonlib-cpp-examples/build.gradle b/photonlib-cpp-examples/build.gradle index d071fa61f..5ba609699 100644 --- a/photonlib-cpp-examples/build.gradle +++ b/photonlib-cpp-examples/build.gradle @@ -38,7 +38,7 @@ model { binaries.all { binary -> lib project: ':photon-lib', library: 'Photon', linkage: 'shared' if (binary.targetPlatform.name == nativeUtils.wpi.platforms.roborio) { - nativeUtils.useRequiredLibrary(binary, 'netcomm_shared', 'chipobject_shared', 'visa_shared', 'ni_runtime_shared') + nativeUtils.useRequiredLibrary(binary, 'ni_link_libraries', 'ni_runtime_libraries') } } sources { @@ -62,4 +62,4 @@ model { ext { exampleDirectory = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/examples/") exampleFile = new File("$projectDir/src/main/java/edu/wpi/first/wpilibj/examples/examples.json") -} \ No newline at end of file +} diff --git a/photonlib-cpp-examples/settings.gradle b/photonlib-cpp-examples/settings.gradle index 325404797..016e831a1 100644 --- a/photonlib-cpp-examples/settings.gradle +++ b/photonlib-cpp-examples/settings.gradle @@ -1 +1 @@ -rootproject.name = 'photonlib-cpp-examples' \ No newline at end of file +rootproject.name = 'photonlib-cpp-examples' diff --git a/photonlib-cpp-examples/src/main/cpp/examples/aimandrange/cpp/Robot.cpp b/photonlib-cpp-examples/src/main/cpp/examples/aimandrange/cpp/Robot.cpp index e1d3f041e..4998a036b 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/aimandrange/cpp/Robot.cpp +++ b/photonlib-cpp-examples/src/main/cpp/examples/aimandrange/cpp/Robot.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. +/* + * Copyright (C) Photon Vision. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,24 +26,24 @@ void Robot::TeleopPeriodic() { if (xboxController.GetAButton()) { // Vision-alignment mode // Query the latest result from PhotonVision - const auto &result = camera.GetLatestResult(); + const auto& result = camera.GetLatestResult(); if (result.HasTargets()) { // First calculate range - units::meter_t range = - photonlib::PhotonUtils::CalculateDistanceToTarget( - CAMERA_HEIGHT, TARGET_HEIGHT, CAMERA_PITCH, - units::degree_t{result.GetBestTarget().GetPitch()}); + units::meter_t range = photonlib::PhotonUtils::CalculateDistanceToTarget( + CAMERA_HEIGHT, TARGET_HEIGHT, CAMERA_PITCH, + units::degree_t{result.GetBestTarget().GetPitch()}); // Use this range as the measurement we give to the PID controller. - // -1.0 required to ensure positive PID controller effort _increases_ range - forwardSpeed = -1.0* forwardController.Calculate( - range.to(), GOAL_RANGE_METERS.to()); + // -1.0 required to ensure positive PID controller effort _increases_ + // range + forwardSpeed = -forwardController.Calculate(range.value(), + GOAL_RANGE_METERS.value()); // Also calculate angular power // -1.0 required to ensure positive PID controller effort _increases_ yaw - rotationSpeed = -1.0 * turnController.Calculate( - result.GetBestTarget().GetYaw(), 0); + rotationSpeed = + -turnController.Calculate(result.GetBestTarget().GetYaw(), 0); } else { // If we have no targets, stay still. forwardSpeed = 0; @@ -51,10 +51,8 @@ void Robot::TeleopPeriodic() { } } else { // Manual Driver Mode - forwardSpeed = - -1.0 * xboxController.GetY(frc::GenericHID::JoystickHand::kRightHand); - rotationSpeed = - xboxController.GetX(frc::GenericHID::JoystickHand::kLeftHand); + forwardSpeed = -xboxController.GetRightY(); + rotationSpeed = xboxController.GetLeftX(); } // Use our forward/turn speeds to control the drivetrain diff --git a/photonlib-cpp-examples/src/main/cpp/examples/aimandrange/include/Robot.h b/photonlib-cpp-examples/src/main/cpp/examples/aimandrange/include/Robot.h index 9a42f4fcf..a290efb22 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/aimandrange/include/Robot.h +++ b/photonlib-cpp-examples/src/main/cpp/examples/aimandrange/include/Robot.h @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. +/* + * Copyright (C) Photon Vision. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,19 +19,19 @@ #include -#include #include #include #include #include +#include #include #include class Robot : public frc::TimedRobot { -public: + public: void TeleopPeriodic() override; -private: + private: // Constants such as camera and target height stored. Change per robot and // goal! const units::meter_t CAMERA_HEIGHT = 24_in; diff --git a/photonlib-cpp-examples/src/main/cpp/examples/aimattarget/cpp/Robot.cpp b/photonlib-cpp-examples/src/main/cpp/examples/aimattarget/cpp/Robot.cpp index 281fd7eba..10235d980 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/aimattarget/cpp/Robot.cpp +++ b/photonlib-cpp-examples/src/main/cpp/examples/aimattarget/cpp/Robot.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. +/* + * Copyright (C) Photon Vision. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,8 +20,7 @@ #include void Robot::TeleopPeriodic() { - double forwardSpeed = - -1.0 * xboxController.GetY(frc::GenericHID::JoystickHand::kRightHand); + double forwardSpeed = -xboxController.GetRightY(); double rotationSpeed; if (xboxController.GetAButton()) { @@ -31,15 +30,14 @@ void Robot::TeleopPeriodic() { if (result.HasTargets()) { // Rotation speed is the output of the PID controller - rotationSpeed = -1.0 * controller.Calculate(result.GetBestTarget().GetYaw(), 0); + rotationSpeed = -controller.Calculate(result.GetBestTarget().GetYaw(), 0); } else { // If we have no targets, stay still. rotationSpeed = 0; } } else { // Manual Driver Mode - rotationSpeed = - xboxController.GetX(frc::GenericHID::JoystickHand::kLeftHand); + rotationSpeed = xboxController.GetLeftX(); } // Use our forward/turn speeds to control the drivetrain diff --git a/photonlib-cpp-examples/src/main/cpp/examples/aimattarget/include/Robot.h b/photonlib-cpp-examples/src/main/cpp/examples/aimattarget/include/Robot.h index b0cac12a4..cac6332d8 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/aimattarget/include/Robot.h +++ b/photonlib-cpp-examples/src/main/cpp/examples/aimattarget/include/Robot.h @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. +/* + * Copyright (C) Photon Vision. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,19 +19,19 @@ #include -#include #include #include #include #include +#include #include #include class Robot : public frc::TimedRobot { -public: + public: void TeleopPeriodic() override; -private: + private: // Change this to match the name of your camera photonlib::PhotonCamera camera{"photonvision"}; // PID constants should be tuned per robot diff --git a/photonlib-cpp-examples/src/main/cpp/examples/getinrange/cpp/Robot.cpp b/photonlib-cpp-examples/src/main/cpp/examples/getinrange/cpp/Robot.cpp index 7e88193bf..b8cc02aa7 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/getinrange/cpp/Robot.cpp +++ b/photonlib-cpp-examples/src/main/cpp/examples/getinrange/cpp/Robot.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. +/* + * Copyright (C) Photon Vision. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,8 +21,7 @@ void Robot::TeleopPeriodic() { double forwardSpeed; - double rotationSpeed = - xboxController.GetX(frc::GenericHID::JoystickHand::kLeftHand); + double rotationSpeed = xboxController.GetLeftX(); if (xboxController.GetAButton()) { // Vision-alignment mode @@ -36,16 +35,15 @@ void Robot::TeleopPeriodic() { units::degree_t{result.GetBestTarget().GetPitch()}); // Use this range as the measurement we give to the PID controller. - forwardSpeed = -1.0 * controller.Calculate(range.to(), - GOAL_RANGE_METERS.to()); + forwardSpeed = + -controller.Calculate(range.value(), GOAL_RANGE_METERS.value()); } else { // If we have no targets, stay still. forwardSpeed = 0; } } else { // Manual Driver Mode - forwardSpeed = - -1.0 * xboxController.GetY(frc::GenericHID::JoystickHand::kRightHand); + forwardSpeed = -xboxController.GetRightY(); } // Use our forward/turn speeds to control the drivetrain diff --git a/photonlib-cpp-examples/src/main/cpp/examples/getinrange/include/Robot.h b/photonlib-cpp-examples/src/main/cpp/examples/getinrange/include/Robot.h index 10272a4af..452d9ad7a 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/getinrange/include/Robot.h +++ b/photonlib-cpp-examples/src/main/cpp/examples/getinrange/include/Robot.h @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. +/* + * Copyright (C) Photon Vision. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,19 +19,19 @@ #include -#include #include #include #include #include +#include #include #include class Robot : public frc::TimedRobot { -public: + public: void TeleopPeriodic() override; -private: + private: // Constants such as camera and target height stored. Change per robot and // goal! const units::meter_t CAMERA_HEIGHT = 24_in; diff --git a/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/cpp/Robot.cpp b/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/cpp/Robot.cpp index 3658933b7..ea343872f 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/cpp/Robot.cpp +++ b/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/cpp/Robot.cpp @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. +/* + * Copyright (C) Photon Vision. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,24 +26,24 @@ void Robot::TeleopPeriodic() { if (xboxController.GetAButton()) { // Vision-alignment mode // Query the latest result from PhotonVision - const auto &result = camera.GetLatestResult(); + const auto& result = camera.GetLatestResult(); if (result.HasTargets()) { // First calculate range - units::meter_t range = - photonlib::PhotonUtils::CalculateDistanceToTarget( - CAMERA_HEIGHT, TARGET_HEIGHT, CAMERA_PITCH, - units::degree_t{result.GetBestTarget().GetPitch()}); + units::meter_t range = photonlib::PhotonUtils::CalculateDistanceToTarget( + CAMERA_HEIGHT, TARGET_HEIGHT, CAMERA_PITCH, + units::degree_t{result.GetBestTarget().GetPitch()}); // Use this range as the measurement we give to the PID controller. - // -1.0 required to ensure positive PID controller effort _increases_ range - forwardSpeed = -1.0* forwardController.Calculate( - range.to(), GOAL_RANGE_METERS.to()); + // -1.0 required to ensure positive PID controller effort _increases_ + // range + forwardSpeed = -forwardController.Calculate(range.value(), + GOAL_RANGE_METERS.value()); // Also calculate angular power // -1.0 required to ensure positive PID controller effort _increases_ yaw - rotationSpeed = -1.0 * turnController.Calculate( - result.GetBestTarget().GetYaw(), 0); + rotationSpeed = + -turnController.Calculate(result.GetBestTarget().GetYaw(), 0); } else { // If we have no targets, stay still. forwardSpeed = 0; @@ -51,22 +51,16 @@ void Robot::TeleopPeriodic() { } } else { // Manual Driver Mode - forwardSpeed = - -1.0 * xboxController.GetY(frc::GenericHID::JoystickHand::kRightHand); - rotationSpeed = - xboxController.GetX(frc::GenericHID::JoystickHand::kLeftHand); + forwardSpeed = -xboxController.GetRightY(); + rotationSpeed = xboxController.GetLeftX(); } // Use our forward/turn speeds to control the drivetrain drive.ArcadeDrive(forwardSpeed, rotationSpeed); } -void Robot::SimulationPeriodic() { - dtSim.update(); -} +void Robot::SimulationPeriodic() { dtSim.update(); } #ifndef RUNNING_FRC_TESTS int main() { return frc::StartRobot(); } #endif - - diff --git a/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/cpp/sim/DrivetrainSim.cpp b/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/cpp/sim/DrivetrainSim.cpp index 818bc24d8..59a537787 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/cpp/sim/DrivetrainSim.cpp +++ b/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/cpp/sim/DrivetrainSim.cpp @@ -1,43 +1,43 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "DrivetrainSim.h" - -/** -* Perform all periodic drivetrain simulation related tasks to advance our simulation of robot -* physics forward by a single 20ms step. -*/ -void DrivetrainSim::update(){ - - double leftMotorCmd = 0; - double rightMotorCmd = 0; - - if (frc::DriverStation::GetInstance().IsEnabled() && !frc::RobotController::IsBrownedOut()) { - leftMotorCmd = leftLeader.GetSpeed(); - rightMotorCmd = rightLeader.GetSpeed(); - } - - m_drivetrainSimulator.SetInputs( - units::volt_t(leftMotorCmd * frc::RobotController::GetInputVoltage()), - units::volt_t(-rightMotorCmd * frc::RobotController::GetInputVoltage()) ); - m_drivetrainSimulator.Update(20_ms); - - // Update PhotonVision based on our new robot position. - simVision.ProcessFrame(m_drivetrainSimulator.GetPose()); - - field.SetRobotPose(m_drivetrainSimulator.GetPose()); -} \ No newline at end of file +/* + * Copyright (C) Photon Vision. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "DrivetrainSim.h" + +/** + * Perform all periodic drivetrain simulation related tasks to advance our + * simulation of robot physics forward by a single 20ms step. + */ +void DrivetrainSim::update() { + double leftMotorCmd = 0; + double rightMotorCmd = 0; + + if (frc::DriverStation::IsEnabled() && + !frc::RobotController::IsBrownedOut()) { + leftMotorCmd = leftLeader.GetSpeed(); + rightMotorCmd = rightLeader.GetSpeed(); + } + + m_drivetrainSimulator.SetInputs( + units::volt_t(leftMotorCmd * frc::RobotController::GetInputVoltage()), + units::volt_t(-rightMotorCmd * frc::RobotController::GetInputVoltage())); + m_drivetrainSimulator.Update(20_ms); + + // Update PhotonVision based on our new robot position. + simVision.ProcessFrame(m_drivetrainSimulator.GetPose()); + + field.SetRobotPose(m_drivetrainSimulator.GetPose()); +} diff --git a/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/include/DrivetrainSim.h b/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/include/DrivetrainSim.h index faf0183c6..61ba13489 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/include/DrivetrainSim.h +++ b/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/include/DrivetrainSim.h @@ -1,107 +1,105 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#pragma once - -class DrivetrainSim { - - -public: - - DrivetrainSim(){ - simVision.AddSimVisionTarget(photonlib::SimVisionTarget(farTargetPose, 81.91_in, targetWidth, targetHeight)); - frc::SmartDashboard::PutData("Field", &field); - } - - void update(); - -private: - - // Simulated Motor Controllers - frc::sim::PWMSim leftLeader {0}; - frc::sim::PWMSim rightLeader {1}; - - // Simulation Physics - // Configure these to match your drivetrain's physical dimensions - // and characterization results. - decltype(1_V / 1_mps) kv = 1.98 * 1_V * 1_s / 1_m; - decltype(1_V / 1_mps_sq) ka = 0.2 * 1_V * 1_s * 1_s / 1_m; - decltype(1_V / 1_rad_per_s) kvAngular = 1.5 * 1_V * 1_s / 1_rad; - decltype(1_V / 1_rad_per_s_sq) kaAngular = 0.3 * 1_V * 1_s * 1_s / 1_rad; - - const frc::LinearSystem<2, 2, 2> kDrivetrainPlant = - frc::LinearSystemId::IdentifyDrivetrainSystem(kv, ka, kvAngular, kaAngular); - - frc::sim::DifferentialDrivetrainSim m_drivetrainSimulator{ - kDrivetrainPlant, - 2.0_ft, - frc::DCMotor::CIM(2), - 8.0, - 6.0_in / 2, - {0.001, 0.001, 0.0001, 0.1, 0.1, 0.005, 0.005}}; - - // Simulated Vision System. - // Configure these to match your PhotonVision Camera, - // pipeline, and LED setup. - units::degree_t camDiagFOV = 170.0_deg; // assume wide-angle camera - units::degree_t camPitch = 15_deg; - units::meter_t camHeightOffGround = 24_in; - units::meter_t maxLEDRange = 20_m; - int camResolutionWidth = 640; // pixels - int camResolutionHeight = 480; // pixels - double minTargetArea = 10; // square pixels - - photonlib::SimVisionSystem simVision { - "photonvision", - camDiagFOV, - camPitch, - frc::Transform2d{}, - camHeightOffGround, - maxLEDRange, - camResolutionWidth, - camResolutionHeight, - minTargetArea}; - - // See https://firstfrc.blob.core.windows.net/frc2020/PlayingField/2020FieldDrawing-SeasonSpecific.pdf page 208 - const units::meter_t targetWidth = 41.30_in - 6.70_in; - // See https://firstfrc.blob.core.windows.net/frc2020/PlayingField/2020FieldDrawing-SeasonSpecific.pdf page 197 - const units::meter_t targetHeight = 98.19_in - 81.19_in; // meters - // See https://firstfrc.blob.core.windows.net/frc2020/PlayingField/LayoutandMarkingDiagram.pdf pages 4 and 5 - const units::meter_t tgtXPos = 54_ft; - const units::meter_t tgtYPos = (27.0_ft / 2) - 43.75_in - (48.0_in / 2.0); - const frc::Translation2d targetTrans {tgtXPos, tgtYPos}; - const frc::Rotation2d targetRot {0.0_deg}; - frc::Pose2d farTargetPose {targetTrans, targetRot}; - - frc::Field2d field {}; - -}; \ No newline at end of file +/* + * Copyright (C) Photon Vision. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#pragma once + +class DrivetrainSim { + public: + DrivetrainSim() { + simVision.AddSimVisionTarget(photonlib::SimVisionTarget( + farTargetPose, 81.91_in, targetWidth, targetHeight)); + frc::SmartDashboard::PutData("Field", &field); + } + + void update(); + + private: + // Simulated Motor Controllers + frc::sim::PWMSim leftLeader{0}; + frc::sim::PWMSim rightLeader{1}; + + // Simulation Physics + // Configure these to match your drivetrain's physical dimensions + // and characterization results. + static constexpr decltype(1_V / 1_mps) kv = 1.98 * 1_V * 1_s / 1_m; + static constexpr decltype(1_V / 1_mps_sq) ka = 0.2 * 1_V * 1_s * 1_s / 1_m; + static constexpr decltype(1_V / 1_rad_per_s) kvAngular = + 1.5 * 1_V * 1_s / 1_rad; + static constexpr decltype(1_V / 1_rad_per_s_sq) kaAngular = + 0.3 * 1_V * 1_s * 1_s / 1_rad; + static constexpr units::meter_t kTrackWidth = 1_m; + + const frc::LinearSystem<2, 2, 2> kDrivetrainPlant = + frc::LinearSystemId::IdentifyDrivetrainSystem(kv, ka, kvAngular, + kaAngular, kTrackWidth); + + frc::sim::DifferentialDrivetrainSim m_drivetrainSimulator{ + kDrivetrainPlant, 2.0_ft, + frc::DCMotor::CIM(2), 8.0, + 6.0_in / 2, {0.001, 0.001, 0.0001, 0.1, 0.1, 0.005, 0.005}}; + + // Simulated Vision System. + // Configure these to match your PhotonVision Camera, + // pipeline, and LED setup. + units::degree_t camDiagFOV = 170.0_deg; // assume wide-angle camera + units::degree_t camPitch = 15_deg; + units::meter_t camHeightOffGround = 24_in; + units::meter_t maxLEDRange = 20_m; + int camResolutionWidth = 640; // pixels + int camResolutionHeight = 480; // pixels + double minTargetArea = 10; // square pixels + + photonlib::SimVisionSystem simVision{ + "photonvision", camDiagFOV, camPitch, + frc::Transform2d{}, camHeightOffGround, maxLEDRange, + camResolutionWidth, camResolutionHeight, minTargetArea}; + + // See + // https://firstfrc.blob.core.windows.net/frc2020/PlayingField/2020FieldDrawing-SeasonSpecific.pdf + // page 208 + const units::meter_t targetWidth = 41.30_in - 6.70_in; + // See + // https://firstfrc.blob.core.windows.net/frc2020/PlayingField/2020FieldDrawing-SeasonSpecific.pdf + // page 197 + const units::meter_t targetHeight = 98.19_in - 81.19_in; // meters + // See + // https://firstfrc.blob.core.windows.net/frc2020/PlayingField/LayoutandMarkingDiagram.pdf + // pages 4 and 5 + const units::meter_t tgtXPos = 54_ft; + const units::meter_t tgtYPos = (27.0_ft / 2) - 43.75_in - (48.0_in / 2.0); + const frc::Translation2d targetTrans{tgtXPos, tgtYPos}; + const frc::Rotation2d targetRot{0.0_deg}; + frc::Pose2d farTargetPose{targetTrans, targetRot}; + + frc::Field2d field{}; +}; diff --git a/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/include/Robot.h b/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/include/Robot.h index 636b5429a..cb00b0b44 100644 --- a/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/include/Robot.h +++ b/photonlib-cpp-examples/src/main/cpp/examples/simaimandrange/include/Robot.h @@ -1,5 +1,5 @@ -/** - * Copyright (C) 2018-2020 Photon Vision. +/* + * Copyright (C) Photon Vision. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,24 +17,24 @@ #pragma once -#include "DrivetrainSim.h" - #include -#include #include #include #include #include +#include #include #include +#include "DrivetrainSim.h" + class Robot : public frc::TimedRobot { -public: + public: void TeleopPeriodic() override; void SimulationPeriodic() override; -private: + private: // Constants such as camera and target height stored. Change per robot and // goal! const units::meter_t CAMERA_HEIGHT = 24_in; diff --git a/photonlib-java-examples/build.gradle b/photonlib-java-examples/build.gradle index fd94883db..2ff9f5ee1 100644 --- a/photonlib-java-examples/build.gradle +++ b/photonlib-java-examples/build.gradle @@ -6,25 +6,44 @@ apply plugin: "edu.wpi.first.NativeUtils" apply from: "${rootDir}/shared/config.gradle" +// Configure wpigui, libglass, libglassnt. nativeUtils { - dependencyConfigs { - gui { - groupId = "edu.wpi.first.halsim" - artifactId = "halsim_gui" - headerClassifier = "headers" - sourceClassifier = "sources" - ext = "zip" - version = wpilibVersion - sharedPlatforms << "osxx86-64" << "linuxx86-64" << "windowsx86-64" - } + nativeDependencyContainer { + wpigui(getNativeDependencyTypeClass('WPIStaticMavenDependency')) { + groupId = "edu.wpi.first.wpigui" + artifactId = "wpigui-cpp" + headerClassifier = "headers" + sourceClassifier = "sources" + ext = "zip" + version = wpilibVersion + targetPlatforms.addAll(nativeUtils.wpi.platforms.desktopPlatforms) } - combinedDependencyConfigs { - halsim_gui { - libraryName = "halsim_gui" - targetPlatforms << "osxx86-64" << "linuxx86-64" << "windowsx86-64" - dependencies << "gui_shared" - } + libglass(getNativeDependencyTypeClass('WPIStaticMavenDependency')) { + groupId = "edu.wpi.first.glass" + artifactId = "libglass" + headerClassifier = "headers" + sourceClassifier = "sources" + ext = "zip" + version = wpilibVersion + targetPlatforms.addAll(nativeUtils.wpi.platforms.desktopPlatforms) } + libglassnt(getNativeDependencyTypeClass('WPIStaticMavenDependency')) { + groupId = "edu.wpi.first.glass" + artifactId = "libglassnt" + headerClassifier = "headers" + sourceClassifier = "sources" + ext = "zip" + version = wpilibVersion + targetPlatforms.addAll(nativeUtils.wpi.platforms.desktopPlatforms) + } + + // Combined + gui(getNativeDependencyTypeClass('AllPlatformsCombinedNativeDependency')) { + dependencies = [ + "libglassnt", "libglass", "wpigui", "imgui_static", + "wpimath_static", "ntcore_static", "wpiutil_static"] + } + } } ext { @@ -42,11 +61,10 @@ dependencies { implementation "edu.wpi.first.wpiutil:wpiutil-java:$wpilibVersion" implementation "edu.wpi.first.wpimath:wpimath-java:$wpilibVersion" implementation "edu.wpi.first.hal:hal-java:$wpilibVersion" - implementation "org.ejml:ejml-simple:0.38" 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 "edu.wpi.first.thirdparty.frc2020.opencv:opencv-java:3.4.7-3" + implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:$opencvVersion" } model { @@ -67,10 +85,6 @@ model { binaries.all { binary -> nativeUtils.useRequiredLibrary(binary, "wpilib_executable_shared") nativeUtils.useRequiredLibrary(binary, "opencv_shared") - - if (binary.targetPlatform.name == NativePlatforms.desktop) { - nativeUtils.useRequiredLibrary(binary, "halsim_gui") - } } } } diff --git a/photonlib-java-examples/src/dev/native/cpp/main.cpp b/photonlib-java-examples/src/dev/native/cpp/main.cpp index 70059c2f2..6ad38377b 100644 --- a/photonlib-java-examples/src/dev/native/cpp/main.cpp +++ b/photonlib-java-examples/src/dev/native/cpp/main.cpp @@ -1,8 +1,18 @@ -/*----------------------------------------------------------------------------*/ -/* Copyright (c) 2020 FIRST. All Rights Reserved. */ -/* Open Source Software - may be modified and shared by FRC teams. The code */ -/* must be accompanied by the FIRST BSD license file in the root directory of */ -/* the project. */ -/*----------------------------------------------------------------------------*/ - -int main() {} +/* + * Copyright (C) Photon Vision. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +int main() {} diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/aimandrange/Main.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/aimandrange/Main.java index b11b5b18a..ed8fc7abf 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/aimandrange/Main.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/aimandrange/Main.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.aimandrange; import edu.wpi.first.wpilibj.RobotBase; diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/aimandrange/Robot.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/aimandrange/Robot.java index f2f624604..112789fb0 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/aimandrange/Robot.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/aimandrange/Robot.java @@ -14,16 +14,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.aimandrange; -import edu.wpi.first.wpilibj.GenericHID; -import edu.wpi.first.wpilibj.PWMVictorSPX; +import edu.wpi.first.math.controller.PIDController; +import edu.wpi.first.math.util.Units; import edu.wpi.first.wpilibj.TimedRobot; import edu.wpi.first.wpilibj.XboxController; -import edu.wpi.first.wpilibj.controller.PIDController; import edu.wpi.first.wpilibj.drive.DifferentialDrive; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.wpilibj.motorcontrol.PWMVictorSPX; import org.photonvision.PhotonCamera; import org.photonvision.PhotonUtils; @@ -83,11 +81,11 @@ public class Robot extends TimedRobot { // Use this range as the measurement we give to the PID controller. // -1.0 required to ensure positive PID controller effort _increases_ range - forwardSpeed = -1.0 * forwardController.calculate(range, GOAL_RANGE_METERS); + forwardSpeed = -forwardController.calculate(range, GOAL_RANGE_METERS); // Also calculate angular power // -1.0 required to ensure positive PID controller effort _increases_ yaw - rotationSpeed = -1.0 * turnController.calculate(result.getBestTarget().getYaw(), 0); + rotationSpeed = -turnController.calculate(result.getBestTarget().getYaw(), 0); } else { // If we have no targets, stay still. forwardSpeed = 0; @@ -95,8 +93,8 @@ public class Robot extends TimedRobot { } } else { // Manual Driver Mode - forwardSpeed = -1.0 * xboxController.getY(GenericHID.Hand.kRight); - rotationSpeed = xboxController.getX(GenericHID.Hand.kLeft); + forwardSpeed = -xboxController.getRightY(); + rotationSpeed = xboxController.getLeftX(); } // Use our forward/turn speeds to control the drivetrain diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/aimattarget/Main.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/aimattarget/Main.java index bdb793801..f9a9620ec 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/aimattarget/Main.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/aimattarget/Main.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.aimattarget; import edu.wpi.first.wpilibj.RobotBase; diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/aimattarget/Robot.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/aimattarget/Robot.java index e8c2bcebe..2c351995f 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/aimattarget/Robot.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/aimattarget/Robot.java @@ -14,16 +14,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.aimattarget; -import edu.wpi.first.wpilibj.GenericHID; -import edu.wpi.first.wpilibj.PWMVictorSPX; +import edu.wpi.first.math.controller.PIDController; +import edu.wpi.first.math.util.Units; import edu.wpi.first.wpilibj.TimedRobot; import edu.wpi.first.wpilibj.XboxController; -import edu.wpi.first.wpilibj.controller.PIDController; import edu.wpi.first.wpilibj.drive.DifferentialDrive; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.wpilibj.motorcontrol.PWMVictorSPX; import org.photonvision.PhotonCamera; /** @@ -66,7 +64,7 @@ public class Robot extends TimedRobot { double forwardSpeed; double rotationSpeed; - forwardSpeed = -1.0 * xboxController.getY(GenericHID.Hand.kRight); + forwardSpeed = -xboxController.getRightY(); if (xboxController.getAButton()) { // Vision-alignment mode @@ -76,14 +74,14 @@ public class Robot extends TimedRobot { if (result.hasTargets()) { // Calculate angular turn power // -1.0 required to ensure positive PID controller effort _increases_ yaw - rotationSpeed = -1.0 * turnController.calculate(result.getBestTarget().getYaw(), 0); + rotationSpeed = -turnController.calculate(result.getBestTarget().getYaw(), 0); } else { // If we have no targets, stay still. rotationSpeed = 0; } } else { // Manual Driver Mode - rotationSpeed = xboxController.getX(GenericHID.Hand.kLeft); + rotationSpeed = xboxController.getLeftX(); } // Use our forward/turn speeds to control the drivetrain diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/examples.json b/photonlib-java-examples/src/main/java/org/photonlib/examples/examples.json index d007d0a42..40c05cc5a 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/examples.json +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/examples.json @@ -59,4 +59,4 @@ "dependencies": [], "foldername": "simposeest" } -] \ No newline at end of file +] diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/getinrange/Main.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/getinrange/Main.java index 12e41d08e..0f5d6826e 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/getinrange/Main.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/getinrange/Main.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.getinrange; import edu.wpi.first.wpilibj.RobotBase; diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/getinrange/Robot.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/getinrange/Robot.java index 26cea1bac..7df84185c 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/getinrange/Robot.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/getinrange/Robot.java @@ -14,16 +14,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.getinrange; -import edu.wpi.first.wpilibj.GenericHID; -import edu.wpi.first.wpilibj.PWMVictorSPX; +import edu.wpi.first.math.controller.PIDController; +import edu.wpi.first.math.util.Units; import edu.wpi.first.wpilibj.TimedRobot; import edu.wpi.first.wpilibj.XboxController; -import edu.wpi.first.wpilibj.controller.PIDController; import edu.wpi.first.wpilibj.drive.DifferentialDrive; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.wpilibj.motorcontrol.PWMVictorSPX; import org.photonvision.PhotonCamera; import org.photonvision.PhotonUtils; @@ -67,7 +65,7 @@ public class Robot extends TimedRobot { @Override public void teleopPeriodic() { double forwardSpeed; - double rotationSpeed = xboxController.getX(GenericHID.Hand.kLeft); + double rotationSpeed = xboxController.getLeftX(); if (xboxController.getAButton()) { // Vision-alignment mode @@ -85,14 +83,14 @@ public class Robot extends TimedRobot { // Use this range as the measurement we give to the PID controller. // -1.0 required to ensure positive PID controller effort _increases_ range - forwardSpeed = -1.0 * controller.calculate(range, GOAL_RANGE_METERS); + forwardSpeed = -controller.calculate(range, GOAL_RANGE_METERS); } else { // If we have no targets, stay still. forwardSpeed = 0; } } else { // Manual Driver Mode - forwardSpeed = -1.0 * xboxController.getY(GenericHID.Hand.kRight); + forwardSpeed = -xboxController.getRightY(); } // Use our forward/turn speeds to control the drivetrain diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/Main.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/Main.java index 74d41c403..6254d005d 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/Main.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/Main.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simaimandrange; import edu.wpi.first.wpilibj.RobotBase; diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/Robot.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/Robot.java index 5a6d47cfd..4f08f42c0 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/Robot.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/Robot.java @@ -14,16 +14,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simaimandrange; -import edu.wpi.first.wpilibj.GenericHID; -import edu.wpi.first.wpilibj.PWMVictorSPX; +import edu.wpi.first.math.controller.PIDController; +import edu.wpi.first.math.util.Units; import edu.wpi.first.wpilibj.TimedRobot; import edu.wpi.first.wpilibj.XboxController; -import edu.wpi.first.wpilibj.controller.PIDController; import edu.wpi.first.wpilibj.drive.DifferentialDrive; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.wpilibj.motorcontrol.PWMVictorSPX; import org.photonlib.examples.simaimandrange.sim.DrivetrainSim; import org.photonvision.PhotonCamera; import org.photonvision.PhotonUtils; @@ -86,11 +84,11 @@ public class Robot extends TimedRobot { // Use this range as the measurement we give to the PID controller. // -1.0 required to ensure positive PID controller effort _increases_ range - forwardSpeed = -1.0 * forwardController.calculate(range, GOAL_RANGE_METERS); + forwardSpeed = -forwardController.calculate(range, GOAL_RANGE_METERS); // Also calculate angular power // -1.0 required to ensure positive PID controller effort _increases_ yaw - rotationSpeed = -1.0 * turnController.calculate(result.getBestTarget().getYaw(), 0); + rotationSpeed = -turnController.calculate(result.getBestTarget().getYaw(), 0); } else { // If we have no targets, stay still. forwardSpeed = 0; @@ -98,8 +96,8 @@ public class Robot extends TimedRobot { } } else { // Manual Driver Mode - forwardSpeed = -1.0 * xboxController.getY(GenericHID.Hand.kRight); - rotationSpeed = xboxController.getX(GenericHID.Hand.kLeft); + forwardSpeed = -xboxController.getRightY(); + rotationSpeed = xboxController.getLeftX(); } // Use our forward/turn speeds to control the drivetrain diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/sim/DrivetrainSim.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/sim/DrivetrainSim.java index 9e6d8124b..0e24b38a3 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/sim/DrivetrainSim.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simaimandrange/sim/DrivetrainSim.java @@ -14,24 +14,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simaimandrange.sim; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.geometry.Translation2d; +import edu.wpi.first.math.numbers.N2; +import edu.wpi.first.math.system.LinearSystem; +import edu.wpi.first.math.system.plant.DCMotor; +import edu.wpi.first.math.system.plant.LinearSystemId; +import edu.wpi.first.math.util.Units; import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.RobotController; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.geometry.Translation2d; import edu.wpi.first.wpilibj.simulation.DifferentialDrivetrainSim; import edu.wpi.first.wpilibj.simulation.PWMSim; import edu.wpi.first.wpilibj.smartdashboard.Field2d; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; -import edu.wpi.first.wpilibj.system.LinearSystem; -import edu.wpi.first.wpilibj.system.plant.DCMotor; -import edu.wpi.first.wpilibj.system.plant.LinearSystemId; -import edu.wpi.first.wpilibj.util.Units; -import edu.wpi.first.wpiutil.math.numbers.N2; import org.photonlib.examples.simaimandrange.Robot; import org.photonvision.SimVisionSystem; import org.photonvision.SimVisionTarget; @@ -44,7 +43,6 @@ import org.photonvision.SimVisionTarget; * real motors/sensors/physics are used instead. */ public class DrivetrainSim { - // Simulated Motor Controllers PWMSim leftLeader = new PWMSim(0); PWMSim rightLeader = new PWMSim(1); @@ -53,7 +51,7 @@ public class DrivetrainSim { // Configure these to match your drivetrain's physical dimensions // and characterization results. LinearSystem drivetrainSystem = - LinearSystemId.identifyDrivetrainSystem(1.98, 0.2, 1.5, 0.3); + LinearSystemId.identifyDrivetrainSystem(1.98, 0.2, 1.5, 0.3, 1.0); DifferentialDrivetrainSim drivetrainSimulator = new DifferentialDrivetrainSim( drivetrainSystem, @@ -114,11 +112,10 @@ public class DrivetrainSim { * physics forward by a single 20ms step. */ public void update() { - double leftMotorCmd = 0; double rightMotorCmd = 0; - if (DriverStation.getInstance().isEnabled() && !RobotController.isBrownedOut()) { + if (DriverStation.isEnabled() && !RobotController.isBrownedOut()) { leftMotorCmd = leftLeader.getSpeed(); rightMotorCmd = rightLeader.getSpeed(); } diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/Main.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/Main.java index 6eb052216..2349b4cd4 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/Main.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/Main.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simposeest; import edu.wpi.first.wpilibj.RobotBase; diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/AutoController.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/AutoController.java index 738b6bbc5..6b9d1aba1 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/AutoController.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/AutoController.java @@ -14,17 +14,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simposeest.robot; +import edu.wpi.first.math.controller.RamseteController; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.kinematics.ChassisSpeeds; +import edu.wpi.first.math.trajectory.Trajectory; +import edu.wpi.first.math.trajectory.TrajectoryConfig; +import edu.wpi.first.math.trajectory.TrajectoryGenerator; import edu.wpi.first.wpilibj.Timer; -import edu.wpi.first.wpilibj.controller.RamseteController; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.kinematics.ChassisSpeeds; -import edu.wpi.first.wpilibj.trajectory.Trajectory; -import edu.wpi.first.wpilibj.trajectory.TrajectoryConfig; -import edu.wpi.first.wpilibj.trajectory.TrajectoryGenerator; import java.util.List; /** @@ -34,7 +33,6 @@ import java.util.List; * thinks it ought to be. */ public class AutoController { - private Trajectory trajectory; private RamseteController ramsete = new RamseteController(); @@ -46,7 +44,6 @@ public class AutoController { Trajectory.State desiredDtState; public AutoController() { - // Change this trajectory if you need the robot to follow different paths. trajectory = TrajectoryGenerator.generateTrajectory( @@ -83,7 +80,6 @@ public class AutoController { * @return The commanded drivetrain motion */ public ChassisSpeeds getCurMotorCmds(Pose2d curEstPose) { - if (isRunning) { double elapsed = timer.get(); desiredDtState = trajectory.sample(elapsed); diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Constants.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Constants.java index 243862f63..a47ff6a2f 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Constants.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Constants.java @@ -14,14 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simposeest.robot; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.geometry.Translation2d; -import edu.wpi.first.wpilibj.util.Units; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.geometry.Translation2d; +import edu.wpi.first.math.util.Units; import org.photonvision.SimVisionTarget; /** @@ -31,7 +30,6 @@ import org.photonvision.SimVisionTarget; * at the field drawings 3) Match with how your vision coprocessor is configured. */ public class Constants { - ////////////////////////////////////////////////////////////////// // Drivetrain Physical ////////////////////////////////////////////////////////////////// diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Drivetrain.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Drivetrain.java index cbe1d45bd..ce042fe53 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Drivetrain.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Drivetrain.java @@ -14,18 +14,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simposeest.robot; +import edu.wpi.first.math.controller.PIDController; +import edu.wpi.first.math.controller.SimpleMotorFeedforward; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.kinematics.ChassisSpeeds; +import edu.wpi.first.math.kinematics.DifferentialDriveKinematics; +import edu.wpi.first.math.kinematics.DifferentialDriveWheelSpeeds; import edu.wpi.first.wpilibj.Encoder; -import edu.wpi.first.wpilibj.PWMVictorSPX; -import edu.wpi.first.wpilibj.SpeedControllerGroup; -import edu.wpi.first.wpilibj.controller.PIDController; -import edu.wpi.first.wpilibj.controller.SimpleMotorFeedforward; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.kinematics.ChassisSpeeds; -import edu.wpi.first.wpilibj.kinematics.DifferentialDriveKinematics; -import edu.wpi.first.wpilibj.kinematics.DifferentialDriveWheelSpeeds; +import edu.wpi.first.wpilibj.motorcontrol.MotorControllerGroup; +import edu.wpi.first.wpilibj.motorcontrol.PWMVictorSPX; /** * Implements a controller for the drivetrain. Converts a set of chassis motion commands into motor @@ -33,15 +32,14 @@ import edu.wpi.first.wpilibj.kinematics.DifferentialDriveWheelSpeeds; * speed. */ public class Drivetrain { - // PWM motor controller output definitions PWMVictorSPX leftLeader = new PWMVictorSPX(Constants.kDtLeftLeaderPin); PWMVictorSPX leftFollower = new PWMVictorSPX(Constants.kDtLeftFollowerPin); PWMVictorSPX rightLeader = new PWMVictorSPX(Constants.kDtRightLeaderPin); PWMVictorSPX rightFollower = new PWMVictorSPX(Constants.kDtRightFollowerPin); - SpeedControllerGroup leftGroup = new SpeedControllerGroup(leftLeader, leftFollower); - SpeedControllerGroup rightGroup = new SpeedControllerGroup(rightLeader, rightFollower); + MotorControllerGroup leftGroup = new MotorControllerGroup(leftLeader, leftFollower); + MotorControllerGroup rightGroup = new MotorControllerGroup(rightLeader, rightFollower); // Drivetrain wheel speed sensors // Used both for speed control and pose estimation. diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/DrivetrainPoseEstimator.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/DrivetrainPoseEstimator.java index 3b0510ac2..c1bf02169 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/DrivetrainPoseEstimator.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/DrivetrainPoseEstimator.java @@ -14,21 +14,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simposeest.robot; +import edu.wpi.first.math.Matrix; +import edu.wpi.first.math.VecBuilder; +import edu.wpi.first.math.estimator.DifferentialDrivePoseEstimator; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.kinematics.DifferentialDriveWheelSpeeds; +import edu.wpi.first.math.numbers.N1; +import edu.wpi.first.math.numbers.N3; +import edu.wpi.first.math.numbers.N5; +import edu.wpi.first.math.util.Units; import edu.wpi.first.wpilibj.AnalogGyro; import edu.wpi.first.wpilibj.Timer; -import edu.wpi.first.wpilibj.estimator.DifferentialDrivePoseEstimator; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.kinematics.DifferentialDriveWheelSpeeds; -import edu.wpi.first.wpilibj.util.Units; -import edu.wpi.first.wpiutil.math.Matrix; -import edu.wpi.first.wpiutil.math.VecBuilder; -import edu.wpi.first.wpiutil.math.numbers.N1; -import edu.wpi.first.wpiutil.math.numbers.N3; -import edu.wpi.first.wpiutil.math.numbers.N5; import org.photonvision.PhotonCamera; /** @@ -37,7 +36,6 @@ import org.photonvision.PhotonCamera; * filter. This in turn creates a best-guess at a Pose2d of where our drivetrain is currently at. */ public class DrivetrainPoseEstimator { - // Sensors used as part of the Pose Estimation private final AnalogGyro gyro = new AnalogGyro(Constants.kGyroPin); private PhotonCamera cam = new PhotonCamera(Constants.kCamName); @@ -75,7 +73,6 @@ public class DrivetrainPoseEstimator { */ public void update( DifferentialDriveWheelSpeeds actWheelSpeeds, double leftDist, double rightDist) { - m_poseEstimator.update(gyro.getRotation2d(), actWheelSpeeds, leftDist, rightDist); var res = cam.getLatestResult(); diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/OperatorInterface.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/OperatorInterface.java index c2e151cce..1f4441e72 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/OperatorInterface.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/OperatorInterface.java @@ -14,11 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simposeest.robot; -import edu.wpi.first.wpilibj.GenericHID; -import edu.wpi.first.wpilibj.SlewRateLimiter; +import edu.wpi.first.math.filter.SlewRateLimiter; import edu.wpi.first.wpilibj.XboxController; public class OperatorInterface { @@ -34,7 +32,7 @@ public class OperatorInterface { public double getFwdRevSpdCmd() { // Get the x speed. We are inverting this because Xbox controllers return // negative values when we push forward. - return -speedLimiter.calculate(opCtrl.getY(GenericHID.Hand.kLeft)) * Constants.kMaxSpeed; + return -speedLimiter.calculate(opCtrl.getLeftY()) * Constants.kMaxSpeed; } public double getRotateSpdCmd() { @@ -42,7 +40,7 @@ public class OperatorInterface { // positive value when we pull to the left (remember, CCW is positive in // mathematics). Xbox controllers return positive values when you pull to // the right by default. - return -rotLimiter.calculate(opCtrl.getX(GenericHID.Hand.kRight)) * Constants.kMaxAngularSpeed; + return -rotLimiter.calculate(opCtrl.getRightX()) * Constants.kMaxAngularSpeed; } public boolean getSimKickCmd() { diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/PoseTelemetry.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/PoseTelemetry.java index 02f9192b3..27e61c416 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/PoseTelemetry.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/PoseTelemetry.java @@ -14,16 +14,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simposeest.robot; -import edu.wpi.first.wpilibj.geometry.Pose2d; +import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.wpilibj.smartdashboard.Field2d; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; /** Reports our expected, desired, and actual poses to dashboards */ public class PoseTelemetry { - Field2d field = new Field2d(); Pose2d actPose = new Pose2d(); diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Robot.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Robot.java index fa94b5096..3e215c85f 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Robot.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/robot/Robot.java @@ -14,16 +14,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simposeest.robot; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.kinematics.ChassisSpeeds; import edu.wpi.first.wpilibj.TimedRobot; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.kinematics.ChassisSpeeds; import org.photonlib.examples.simposeest.sim.DrivetrainSim; public class Robot extends TimedRobot { - AutoController autoCtrl = new AutoController(); Drivetrain dt = new Drivetrain(); OperatorInterface opInf = new OperatorInterface(); diff --git a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/sim/DrivetrainSim.java b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/sim/DrivetrainSim.java index 9a0811e1b..1378a5aa4 100644 --- a/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/sim/DrivetrainSim.java +++ b/photonlib-java-examples/src/main/java/org/photonlib/examples/simposeest/sim/DrivetrainSim.java @@ -14,23 +14,22 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonlib.examples.simposeest.sim; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; +import edu.wpi.first.math.geometry.Transform2d; +import edu.wpi.first.math.geometry.Translation2d; +import edu.wpi.first.math.numbers.N2; +import edu.wpi.first.math.system.LinearSystem; +import edu.wpi.first.math.system.plant.DCMotor; +import edu.wpi.first.math.system.plant.LinearSystemId; import edu.wpi.first.wpilibj.DriverStation; import edu.wpi.first.wpilibj.RobotController; -import edu.wpi.first.wpilibj.geometry.Pose2d; -import edu.wpi.first.wpilibj.geometry.Rotation2d; -import edu.wpi.first.wpilibj.geometry.Transform2d; -import edu.wpi.first.wpilibj.geometry.Translation2d; import edu.wpi.first.wpilibj.simulation.AnalogGyroSim; import edu.wpi.first.wpilibj.simulation.DifferentialDrivetrainSim; import edu.wpi.first.wpilibj.simulation.EncoderSim; import edu.wpi.first.wpilibj.simulation.PWMSim; -import edu.wpi.first.wpilibj.system.LinearSystem; -import edu.wpi.first.wpilibj.system.plant.DCMotor; -import edu.wpi.first.wpilibj.system.plant.LinearSystemId; -import edu.wpi.first.wpiutil.math.numbers.N2; import org.photonlib.examples.simposeest.robot.Constants; import org.photonvision.SimVisionSystem; @@ -42,7 +41,6 @@ import org.photonvision.SimVisionSystem; * real motors/sensors/physics are used instead. */ public class DrivetrainSim { - // Simulated Sensors AnalogGyroSim gyroSim = new AnalogGyroSim(Constants.kGyroPin); EncoderSim leftEncoderSim = EncoderSim.createForChannel(Constants.kDtLeftEncoderPinA); @@ -100,11 +98,10 @@ public class DrivetrainSim { * physics forward by a single 20ms step. */ public void update() { - double leftMotorCmd = 0; double rightMotorCmd = 0; - if (DriverStation.getInstance().isEnabled() && !RobotController.isBrownedOut()) { + if (DriverStation.isEnabled() && !RobotController.isBrownedOut()) { // If the motor controllers are enabled... // Roughly model the effect of leader and follower motor pushing on the same // gearbox. diff --git a/scripts/install.sh b/scripts/install.sh index df3609203..67dc442d5 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -19,16 +19,16 @@ echo "JDK installation complete." echo "Downloading latest stable release of PhotonVision..." mkdir -p /opt/photonvision cd /opt/photonvision -curl -sk https://api.github.com/repos/photonvision/photonvision/releases/latest | - grep "browser_download_url.*jar" | - cut -d : -f 2,3 | - tr -d '"' | +curl -sk https://api.github.com/repos/photonvision/photonvision/releases/latest | + grep "browser_download_url.*jar" | + cut -d : -f 2,3 | + tr -d '"' | wget -qi - -O photonvision.jar echo "Downloaded latest stable release of PhotonVision." echo "Creating the PhotonVision systemd service..." -if service --status-all | grep -Fq 'photonvision'; then +if service --status-all | grep -Fq 'photonvision'; then systemctl stop photonvision systemctl disable photonvision rm /lib/systemd/system/photonvision.service @@ -50,7 +50,7 @@ ExecStop=/bin/systemctl kill photonvision Type=simple Restart=on-failure RestartSec=1 - + [Install] WantedBy=multi-user.target" >> photonvision.service cp photonvision.service /etc/systemd/system/photonvision.service diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index 95d63821a..64da17c01 100644 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -11,5 +11,5 @@ systemctl stop photonvision systemctl disable photonvision rm /lib/systemd/system/photonvision.service rm /etc/systemd/system/photonvision.service -systemctl dameon-relaod +systemctl dameon-relaod systemctl reset-failed diff --git a/shared/PhotonVersion.java.in b/shared/PhotonVersion.java.in index 3805b1393..832801b9d 100644 --- a/shared/PhotonVersion.java.in +++ b/shared/PhotonVersion.java.in @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package org.photonvision; /* diff --git a/shared/common.gradle b/shared/common.gradle index bc395c2f9..09a5dfeb1 100644 --- a/shared/common.gradle +++ b/shared/common.gradle @@ -26,27 +26,28 @@ dependencies { 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.cscore:cscore-jni:$wpilibVersion:linuxaarch64bionic" + implementation "edu.wpi.first.cscore:cscore-jni:$wpilibVersion:linuxraspbian" + implementation "edu.wpi.first.cscore:cscore-jni:$wpilibVersion:linuxx86-64" + implementation "edu.wpi.first.cscore:cscore-jni:$wpilibVersion:osxx86-64" + implementation "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.ntcore:ntcore-jni:$wpilibVersion:linuxaarch64bionic" + implementation "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:linuxraspbian" + implementation "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:linuxx86-64" + implementation "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:osxx86-64" + implementation "edu.wpi.first.ntcore:ntcore-jni:$wpilibVersion:windowsx86-64" - implementation "edu.wpi.first.thirdparty.frc2021.opencv:opencv-java:$opencvVersion" - compile "edu.wpi.first.thirdparty.frc2021.opencv:opencv-jni:$opencvVersion:linuxaarch64bionic" - compile "edu.wpi.first.thirdparty.frc2021.opencv:opencv-jni:$opencvVersion:linuxraspbian" - compile "edu.wpi.first.thirdparty.frc2021.opencv:opencv-jni:$opencvVersion:linuxx86-64" - compile "edu.wpi.first.thirdparty.frc2021.opencv:opencv-jni:$opencvVersion:osxx86-64" - compile "edu.wpi.first.thirdparty.frc2021.opencv:opencv-jni:$opencvVersion:windowsx86-64" + implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:$opencvVersion" + implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-jni:$opencvVersion:linuxaarch64bionic" + implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-jni:$opencvVersion:linuxraspbian" + implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-jni:$opencvVersion:linuxx86-64" + implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-jni:$opencvVersion:osxx86-64" + implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-jni:$opencvVersion:windowsx86-64" - implementation "edu.wpi.first.wpimath:wpimath-java:2021.3.1" + implementation "edu.wpi.first.wpimath:wpimath-java:2022.1.1-beta-2" + implementation "org.ejml:ejml-simple:0.41" // test stuff testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") diff --git a/shared/config.gradle b/shared/config.gradle index fbaa647c7..bdf11e74d 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -8,10 +8,10 @@ nativeUtils.withBionic() nativeUtils.wpi.configureDependencies { wpiVersion = wpilibVersion wpimathVersion = wpilibVersion - niLibVersion = "2020.10.1" - opencvVersion = "3.4.7-5" + niLibVersion = "2022.2.2" + opencvVersion = "4.5.2-1" googleTestVersion = "1.9.0-5-437e100-1" - imguiVersion = "1.79-1" + imguiVersion = "1.82-1" } // Configure warnings and errors diff --git a/test-resources/calibration/lifecam240p.json b/test-resources/calibration/lifecam240p.json index 349c450c8..954a1cc45 100644 --- a/test-resources/calibration/lifecam240p.json +++ b/test-resources/calibration/lifecam240p.json @@ -31,4 +31,4 @@ -1.462385758978924 ] } -} \ No newline at end of file +} diff --git a/test-resources/calibration/lifecam480p.json b/test-resources/calibration/lifecam480p.json index fff629bf6..a9a6ae4e4 100644 --- a/test-resources/calibration/lifecam480p.json +++ b/test-resources/calibration/lifecam480p.json @@ -31,4 +31,4 @@ 1.9833437176538498 ] } -} \ No newline at end of file +} diff --git a/test-resources/hardware/HardwareConfig.json b/test-resources/hardware/HardwareConfig.json index f6e92332e..e4cbdc65c 100644 --- a/test-resources/hardware/HardwareConfig.json +++ b/test-resources/hardware/HardwareConfig.json @@ -15,4 +15,4 @@ "ramUtilCommand" : "echo 10", "restartHardwareCommand" : "echo 10", "vendorFOV" : 40.0 -} \ No newline at end of file +} diff --git a/test-resources/testimages/2019/WPI/info.txt b/test-resources/testimages/2019/WPI/info.txt index cc4714e73..e2480914a 100644 --- a/test-resources/testimages/2019/WPI/info.txt +++ b/test-resources/testimages/2019/WPI/info.txt @@ -1,3 +1,3 @@ Taken on Microsoft LifeCam HD-3000 FOV = 68.5 -Credit to WPILib for these images. \ No newline at end of file +Credit to WPILib for these images. diff --git a/test-resources/testimages/2020/WPI/info.txt b/test-resources/testimages/2020/WPI/info.txt index cc4714e73..e2480914a 100644 --- a/test-resources/testimages/2020/WPI/info.txt +++ b/test-resources/testimages/2020/WPI/info.txt @@ -1,3 +1,3 @@ Taken on Microsoft LifeCam HD-3000 FOV = 68.5 -Credit to WPILib for these images. \ No newline at end of file +Credit to WPILib for these images.