Files
PhotonVision/photon-server/src/main/java/org/photonvision/server/SocketHandler.java

302 lines
15 KiB
Java
Raw Normal View History

/*
* Copyright (C) 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 <https://www.gnu.org/licenses/>.
*/
2020-06-27 14:58:03 -07:00
package org.photonvision.server;
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.javalin.websocket.*;
import java.io.IOException;
import java.nio.ByteBuffer;
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
import org.apache.commons.lang3.tuple.Pair;
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
import org.msgpack.jackson.dataformat.MessagePackFactory;
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
import org.photonvision.common.dataflow.DataChangeDestination;
import org.photonvision.common.dataflow.DataChangeService;
import org.photonvision.common.dataflow.events.IncomingWebSocketEvent;
import org.photonvision.common.logging.LogGroup;
import org.photonvision.common.logging.Logger;
import org.photonvision.vision.pipeline.PipelineType;
import org.photonvision.vision.processes.PipelineManager;
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
@SuppressWarnings("rawtypes")
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
public class SocketHandler {
private final Logger logger = new Logger(SocketHandler.class, LogGroup.WebServer);
private final List<WsContext> users = new CopyOnWriteArrayList<>();
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
private final ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory());
private final DataChangeService dcService = DataChangeService.getInstance();
@SuppressWarnings("FieldCanBeLocal")
private final UIOutboundSubscriber uiOutboundSubscriber = new UIOutboundSubscriber(this);
public static class UIMap extends HashMap<String, Object> {}
abstract static class SelectiveBroadcastPair extends Pair<UIMap, WsContext> {}
private static class ThreadSafeSingleton {
private static final SocketHandler INSTANCE = new SocketHandler();
}
public static SocketHandler getInstance() {
return SocketHandler.ThreadSafeSingleton.INSTANCE;
}
private SocketHandler() {
dcService.addSubscribers(
uiOutboundSubscriber,
new UIInboundSubscriber()); // Subscribe outgoing messages to the data change service
}
public void onConnect(WsConnectContext context) {
context.session.setIdleTimeout(Long.MAX_VALUE); // TODO: determine better value
var host = context.session.getRemote().getInetSocketAddress().getHostName();
logger.info("New websocket connection from " + host);
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
users.add(context);
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
dcService.publishEvent(
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_GENSETTINGS, "userConnected", context));
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
}
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
protected void onClose(WsCloseContext context) {
var host = context.session.getRemote().getInetSocketAddress().getHostName();
var reason = context.reason() != null ? context.reason() : "Connection closed by client";
logger.info("Closing websocket connection from " + host + " for reason: " + reason);
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
users.remove(context);
}
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
@SuppressWarnings({"unchecked"})
public void onBinaryMessage(WsBinaryMessageContext context) {
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
try {
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
Map<String, Object> deserializedData =
objectMapper.readValue(context.data(), new TypeReference<>() {});
// Special case the current camera index
var camIndexValue = deserializedData.get("cameraIndex");
Integer cameraIndex = null;
if (camIndexValue instanceof Integer) {
cameraIndex = (Integer) camIndexValue;
deserializedData.remove("cameraIndex");
}
for (Map.Entry<String, Object> entry : deserializedData.entrySet()) {
try {
var entryKey = entry.getKey();
var entryValue = entry.getValue();
var socketMessageType = SocketMessageType.fromEntryKey(entryKey);
logger.debug(
"Got WS message: ["
+ socketMessageType
+ "] ==> ["
+ entryKey
+ "], ["
+ entryValue
+ "]");
if (socketMessageType == null) {
logger.warn("Got unknown socket message type: " + entryKey);
continue;
}
switch (socketMessageType) {
case SMT_DRIVERMODE:
{
// TODO: what is this event?
var data = (HashMap<String, Object>) entryValue;
var dmExpEvent =
new IncomingWebSocketEvent<Integer>(
DataChangeDestination.DCD_ACTIVEMODULE, "driverExposure", data);
var dmBrightEvent =
new IncomingWebSocketEvent<Integer>(
DataChangeDestination.DCD_ACTIVEMODULE, "driverBrightness", data);
var dmIsDriverEvent =
new IncomingWebSocketEvent<Boolean>(
DataChangeDestination.DCD_ACTIVEMODULE, "isDriver", data);
dcService.publishEvents(dmExpEvent, dmBrightEvent, dmIsDriverEvent);
break;
}
case SMT_CHANGECAMERANAME:
{
var ccnEvent =
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_ACTIVEMODULE,
"cameraNickname",
(String) entryValue,
cameraIndex,
context);
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
dcService.publishEvent(ccnEvent);
break;
}
case SMT_CHANGEPIPELINENAME:
{
var cpnEvent =
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_ACTIVEMODULE,
"pipelineName",
(String) entryValue,
cameraIndex,
context);
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
dcService.publishEvent(cpnEvent);
break;
}
case SMT_ADDNEWPIPELINE:
{
// HashMap<String, Object> data = (HashMap<String,
// Object>) entryValue;
// var type = (PipelineType)
// data.get("pipelineType");
// var name = (String) data.get("pipelineName");
var type = PipelineType.Reflective;
var name = (String) entryValue;
var newPipelineEvent =
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_ACTIVEMODULE,
"newPipelineInfo",
Pair.of(name, type),
cameraIndex,
context);
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
dcService.publishEvent(newPipelineEvent);
break;
}
case SMT_COMMAND:
{
var cmd = SocketMessageCommandType.fromEntryKey((String) entryValue);
switch (cmd) {
case SMCT_DELETECURRENTPIPELINE:
{
var deleteCurrentPipelineEvent =
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_ACTIVEMODULE,
"deleteCurrPipeline",
0,
cameraIndex,
context);
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
dcService.publishEvent(deleteCurrentPipelineEvent);
break;
}
case SMCT_SAVE:
{
var saveEvent =
new IncomingWebSocketEvent<>(DataChangeDestination.DCD_OTHER, "save", 0);
dcService.publishEvent(saveEvent);
break;
}
}
break;
}
case SMT_CURRENTCAMERA:
{
var changeCurrentCameraEvent =
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_OTHER, "changeUICamera", (Integer) entryValue);
dcService.publishEvent(changeCurrentCameraEvent);
break;
}
case SMT_CURRENTPIPELINE:
{
var changePipelineEvent =
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_ACTIVEMODULE,
"changePipeline",
(Integer) entryValue,
cameraIndex,
context);
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
dcService.publishEvent(changePipelineEvent);
break;
}
case SMT_ISPNPCALIBRATION:
{
var changePipelineEvent =
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_ACTIVEMODULE,
"changePipeline",
PipelineManager.CAL_3D_INDEX,
cameraIndex,
context);
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
dcService.publishEvent(changePipelineEvent);
break;
}
case SMT_TAKECALIBRATIONSNAPSHOT:
{
var takeCalSnapshotEvent =
new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_ACTIVEMODULE,
"takeCalSnapshot",
0,
cameraIndex,
context);
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
dcService.publishEvent(takeCalSnapshotEvent);
break;
}
case SMT_PIPELINESETTINGCHANGE:
{
HashMap<String, Object> data = (HashMap<String, Object>) entryValue;
if (data.size() >= 2) {
var cameraIndex2 = (int) data.get("cameraIndex");
for (var dataEntry : data.entrySet()) {
if (dataEntry.getKey().equals("cameraIndex")) {
continue;
}
var pipelineSettingChangeEvent =
new IncomingWebSocketEvent(
DataChangeDestination.DCD_ACTIVEPIPELINESETTINGS,
dataEntry.getKey(),
dataEntry.getValue(),
cameraIndex2,
context);
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
dcService.publishEvent(pipelineSettingChangeEvent);
}
} else {
logger.warn("Unknown message for PSC: " + data.keySet().iterator().next());
}
break;
}
}
} catch (Exception ex) {
logger.error("unknown booboo");
ex.printStackTrace();
}
}
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
} catch (IOException e) {
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
// TODO: log
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
e.printStackTrace();
}
}
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
// TODO: change to use the DataFlow system
private void sendMessage(Object message, WsContext user) throws JsonProcessingException {
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
ByteBuffer b = ByteBuffer.wrap(objectMapper.writeValueAsBytes(message));
user.send(b);
}
Bootup sprint (#18) * Did some stuff * Fix gradle, start implementing mjpeg frame consumer * Did some stuff * bade changes * rename camera config to USBCameraConfiguration, add name * unrename cameraconfiguration * Add pub/sub framework * Add setResolution to mjpeg frame consumer * add NTDataConsumer * Add some totally broken hsv hacks * Start refactoring UI data * Update index.js * Commit and push, he says * Fix up some errors * Fix input tab * Fix fps * Update index.js * Add pipeline field setting, update PipelineManager, fix nullpointers and USBCameraSettables * Change v-model to point to data() * update hsv to use mutations * Work on saving, fix hsv * Rename shouldErode/shouldDilate to erode and dilate * Hook all the tabs up to the Store * Change handleData to handlePipelineData * camera quirk redo, add ICCSub to SocketHandler * Fix some property names * Fixed tons of naming in UI, fix backend for multi-val PSCs, fix PSC enums * change pipeline type to an int in store * Fix mutation naming * Attempt threshold fix * Update SocketHandler.java * Add truthy data sending * Start adding logging support * [UI] Add delay to slider input boxes (#1) * [UI] [Backend] potentially fix camera settings, various logging tweaks * Don't release raw input mat * add setVideoModeIndex to vision settables * Implement pipeline index in socket handler, add framework for renaming/changing pipes * (ish) get pipeline change working * Create index.html * Cleanups, fix pipeline index bug, fix stream res for MJPG, add dashboard stream (unused) * Refactor UI to use mutatePipeline, send pipeline results * Update NetworkConfig.java * Change double to number * Run spotless * Fix reversal of large/small comparators * Fix left/right * Fix pitch/yaw calculation bug, fix area bug * Use Vue.set instead of assignment This fixes {{ }} * Update App.vue * run spotless * Actually add pipelines and reassign indecies * Delete old pipeline configs Fixes duplication on renaming pipeline * Start working on deleting pipes * Fix camera nickname change * run spotless * Fix some test stuff * Update VisionModuleManagerTest.java * vision source manager test is still broken * Fix VisionSourceManager test * Apply spotless 2 electric boogaloo Co-authored-by: Banks Troutman <btrout.dhrs@gmail.com> Co-authored-by: Declan Freeman-Gleason <declanfreemangleason@gmail.com> Co-authored-by: Aaryan Agrawal <54345060+13Ducks@users.noreply.github.com>
2020-07-07 01:01:58 -07:00
// TODO: change to use the DataFlow system
public void broadcastMessage(Object message, WsContext userToSkip)
Module bringup (#95) * Merge to fix git history commit df76353dd5d4c9db7d4843c63bae2dcaf4a9b478 Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 12:21:31 2020 -0700 Add skeleton Manager and Server Skeleton VisionModule/VisionModuleManager/Visionprocess Add blank temp data class, flesh out VisionModule more added server and socket handler template Create Logger class Run spotless Add async to Logger Revert "Add async to Logger" This reverts commit 130df7b895dc73db6e4c0b7b101d383a2952b49e. Add asyncronous file appending commit 621e3a829ddace486680a9198538cfad278076da Author: Matt <matthew.morley.ca@gmail.com> Date: Sun Apr 12 09:04:52 2020 -0700 Add offset method to get2020Target commit 75e104770f36084a19fbf98e2470b937203e8dc0 Merge: 292071a 525cf52 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:33:12 2020 -0700 Merge branch 'logging' into pipeline-bringup commit 292071adefd90c85355859a5407e9ab786aa2436 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:32:25 2020 -0700 Update .gitignore commit a31f64fb65d42a81d1ecf0b4a8ebf03869c4ba03 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 21:31:17 2020 -0700 Refactor calibration into `common.calibration` commit eb91324a263025afdd7fd59a5001c9e95f3d3e6c Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:52 2020 -0700 run spotless commit a6e3f0dda55964c8fb1819ad9386bb21de58cdf9 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 16:48:28 2020 -0700 Fix JSON mat bug and lifecam default calibration for tests, fix 3d drawing commit f2d5caea43747c80c9d7417b4ffda32dad95cd71 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:47:12 2020 -0700 Implement solvePNP, bounding box top and bottom commit bbf1ea445d72876d5e3c53ae3f41be68adf401ca Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:32 2020 -0700 Add lifecam calibration data commit 82684920224e5f5ba2924106cbe09beb3d30d42e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 15:46:20 2020 -0700 Update geometry classes commit cab6a68184b74055ae088d59660ecd7ddff58400 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 12:23:04 2020 -0700 Clean up draw 3d, fix convex hull bug in corner detection commit bb3c247e398b72e93c77ece8c97929982edded3e Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:44:57 2020 -0700 Update Contour.java commit 94c9b1dd342b17ceed5dca1020f1253cd6f59f62 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:41:05 2020 -0700 Make Draw2dContours pipe respect showMultiple commit 0f231888accb19d4018ee2a2c1ccee5e28b48f69 Author: Matt <matthew.morley.ca@gmail.com> Date: Sat Apr 11 11:40:38 2020 -0700 Add point detection, fix convex hull calculation in Contour commit ef360ba7f814fad74b2f07025c08634f09eacf97 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Fri Apr 10 04:51:50 2020 -0400 Add ContourShape class for approxPolyDp Start on ColoredShape tracking commit a4e9dd3d4221085e76425e99496bc7d03536a689 Author: Matt <matthew.morley.ca@gmail.com> Date: Thu Apr 9 20:53:14 2020 -0700 Create CornerDetectionPipe based on old solvePNPPipe commit 88cae18d63f8045a77e5c394af6b3f4d2fab98db Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 20:19:57 2020 -0400 Add perimeter, MatOfPoint2f getters to Contour commit 525cf52ec4ac204f7996310fa3d12ad127362bf7 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:56:57 2020 -0700 Add slv4j logger to replace the current debugLogger I'm waiting on stuff to be less skeletoned to add more commit 50e70b907317e630ee66fb12b31d0b216e331156 Author: Matt <matthew.morley.ca@gmail.com> Date: Tue Mar 31 10:40:42 2020 -0700 Add logback commit b739ba287829c07a13079434751214e4ad4e769f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:51:22 2020 -0400 various cleanups, add DummyFrameConsumer commit 91c36cb60ee4d40ac3715e3c7f4249e172b15e2b Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Thu Apr 9 00:48:42 2020 -0400 Add CVMat, ReflectionUtils to help track rogue Mats commit 7999c9ee935052436d44ff51d64d60a266aad1fd Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:48:02 2020 -0700 Apply spotless commit c39d9dc6fd13aedd2f684d8b2654f8a277ccf587 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:45:19 2020 -0700 Resolve memory leaks due to unnecessary instantiation of Points commit 7b507da3c860c2a68d70d968224648819695c489 Author: Matt <matthew.morley.ca@gmail.com> Date: Wed Apr 8 21:29:53 2020 -0700 Fix ConcurrentModificationException bug in group contours pipe with potential targets commit d5c7b26f73f9c74bb2b29723f9987c3f66f8c288 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:49:10 2020 -0400 Refactor CVPipeline, add ReflectivePipelineTest commit 2e6a64862cc9c27faf30545cbf89053a4e9a9ed7 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:48:50 2020 -0400 add TestUtils class, move testimages commit 6653eb981224f4851cb2ad1219c6ebe08ca70b8f Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Wed Apr 8 03:45:11 2020 -0400 add Releasable interface, implement in classes commit ef1e3024a1ef8fdfee58d4a8ef00b8aa96146721 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 19:53:41 2020 -0400 Move test images commit e25e736741d7432fca42a32f707099e62a1e5a14 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 18:42:43 2020 -0400 Apply Spotless commit ff5cee953f80b59b938df5c1a6e1bef4e9fb6573 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:52:06 2020 -0400 Finish ReflectivePipeline, various tweaks commit 7e6e65127a54ec784d048914fb49ca23b6ee4d29 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Tue Apr 7 01:49:14 2020 -0400 Add FrameStaticProperties as member in Frame Add FrameStaticProperties as member in Frame commit 09bf8cb500d89b8f3e11afe5e4d2c56d42ce18f9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 17:45:25 2020 -0400 Add crosshair to DriverMode, cleanups commit 570531afb28e422f1e866454cfb8f5b745979ec9 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Mon Apr 6 14:10:39 2020 -0400 Add DriverPipeline classes, apply spotless commit 0376bdbdcb6bb9e468d353fff24d4c2ac1a0684a Author: ori agranat <oriagranat9@gmail.com> Date: Mon Apr 6 11:48:36 2020 +0300 updated Largest ContourSortMode and added centermost commit 378ba923c06b9a68f4db4972ef5f2b643d8051fd Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:51 2020 -0400 Add pipeline classes, settings, separate enums commit 3b41afe125d8cf34e71bcd9c30d85f4f7dac30a8 Author: Banks Troutman <btrout.dhrs@gmail.com> Date: Sun Apr 5 23:29:32 2020 -0400 Refactor package structure, various cleanups * Apply spotless, attempt fix for SolvePNPTest * Fix SolvePNP Draw, fix 2019 PNP * Add active mat count to CVMat prints, fix NPE in contour release * Change providers/consumers to extend Provider/Supplier classes * ModuleManager bringup, spotless applied * Pipeline Test fixes and cleanups * Add getName to FrameProvider, set thread name in VisionRunner * VisionModuleManager test * God * Apply Spotless
2020-05-25 14:55:03 -04:00
throws JsonProcessingException {
for (WsContext user : users) {
if (user != userToSkip) {
sendMessage(message, user);
}
}
}
}