Commit Graph

1439 Commits

Author SHA1 Message Date
amquake
ce0d28da93 Update Java Simulation Examples (#913)
Removes apriltagExample and simposeest, replacing them with swervedriveposeestsim

---------

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2023-10-05 08:57:38 -04:00
Sriman Achanta
65d5494ab3 update ui ci names and levels (#929) 2023-10-01 21:28:07 -04:00
Sriman Achanta
5267b2c70d Temp fix to revert to hash URLs (#927) 2023-09-27 22:52:19 -04:00
amquake
3c85291610 Pi startup fix (#923) 2023-09-27 21:37:27 -04:00
Sriman Achanta
43eefcf1c5 Correctly stringify numbers in textboxes (#921)
* fix an issue where the fov isnt reset on error

* Fix issue with incorrectly reading fov on update

* Properly handle NPE in case of error

* Fix issue with vuetify comps not converting strings to numbers

* Formatting fixes
2023-09-26 08:02:18 -04:00
amquake
2cb87c5a88 Add Github Action check to make sure template UI is unchanged (#918) 2023-09-24 18:04:17 -04:00
Ryan Blue
9d0f1a34a8 Use MemAvailable rather than MemFree (#914)
Fixes linux metrics reporting to report mem free before swap starts, instead of physical unused ram
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
2023-09-23 10:36:38 -04:00
amquake
7f283640c4 [photonlib] Simulation Visualization Update (#895) 2023-09-19 19:10:04 -04:00
Mohammad Durrani
9e371de1cb Remove casts to double in SetLEDMode and set pipeline (#906)
* Remove casts to double

* Run wpiformat
2023-09-16 10:17:28 -04:00
Ryan Blue
9f3a735c59 Fix spotless divergence for FilterContoursPipe (#908)
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2023-09-12 06:57:01 -04:00
Matt
6e8e379b71 [photon-lib] Fix camera/distortion matrix mixup in C++ (#909) 2023-09-12 06:56:38 -04:00
Ryan Blue
f601275fb2 Only print publish URL for publish tasks (#907)
& fix spelling mistake
2023-09-07 20:35:26 -04:00
Matt
306677e56f Advanced networking settings (#899)
Exposes NetworkManager interface name and more robustly handles device/interface names internally.

---------

Co-authored-by: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com>
2023-09-01 15:58:35 -04:00
Sriman Achanta
08892b9e68 UI patches (#905)
- Show 0 clients when NT server props are undefined
- Add Prettier 

---------

Co-authored-by: Matthew Morley <matthew.morley.ca@gmail.com>
2023-08-31 16:56:58 -04:00
Ryan Blue
de394418f6 Improve docs for PhotonPoseEstimator (#901)
In particular, document that update() ensures that new data is only used once.
2023-08-30 18:49:26 -04:00
Sriman Achanta
8751764721 Update GeneralSettingsStore.ts (#900) 2023-08-22 15:34:45 -07:00
Matt
2f2396fe57 Fix frontend spelling of shouldManage (#898) 2023-08-21 16:47:28 -04:00
Sriman Achanta
fd8f16b615 Update index.html (#897) 2023-08-21 08:13:45 -07:00
Sriman Achanta
f623e4a1cc [PhotonClient] Vite and Typescript complete refactor (#884) 2023-08-20 22:51:35 -07:00
Sriman Achanta
8397b43bef Add photon-sever/lib to .gitignore (#890)
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2023-07-29 17:31:50 -04:00
Craig Schardt
24a0c9c270 Use correct package name (#891) 2023-07-27 07:24:12 -07:00
Matt
652a653c9a DIsable Mac photonlib builds (#889) 2023-07-25 08:41:52 -07:00
amquake
816bbca2f1 [photonlib] Simulation robustness (#874)
- `PNPResults` can now be empty (`isPresent` = false)
- solvePNP methods actually handle errors and return empty `PNPResults`
  - This reveals an odd error where some inputs to `solvePNP_SQUARE()` resulted in an estimated transform with NaN values, and attempts to handle it
- Overwrites java changes from #817 since #742 had duplicate fixes
- Minor bugfixes
2023-07-23 18:32:36 -07:00
Matt
454f8a1773 Install JRE instead of JDK in install script (#883)
Should reduce the size of packages needed to be downloaded
2023-07-21 06:13:36 -07:00
Sriman Achanta
dd9795028d Revert "Add checking of current and requested video_mode (#859)" (#887)
This reverts commit 013ff5e, which caused crashes with libcamera cameras.

More testing required to root-cause and fix this PR, but rolling back for testing for now.
2023-07-20 16:48:48 -07:00
Sriman Achanta
715ef62c85 Update backend to provide more useful info to frontend (#866) 2023-06-25 18:07:27 -07:00
amquake
7593c5ed05 Windows EOL spotless fix (#875)
Fixes spotless on windows flagging every line for being LF instead of CRLF. Developers may need to reclone to fix their local history.
2023-06-21 08:38:30 -07:00
amquake
f1cadc1e1e [WIP] Simulation Overhaul (#742)
### What does this do?

- Deprecates previous sim classes
- Has a `CameraProperties` class for describing a camera's basic/calibration info, and performance values for simulation. Calibration values can be loaded from the `config.json` in the settings exported by photonvision.
- `OpenCVHelp` provides convenience functions for using opencv methods with wpilib/photonvision classes, mainly to project 3d points to a camera's 2d image and perform solvePnP with the above camera calibration info.
  - `TargetModel`s describe the 3d shape of a target, both for projecting into the camera's 2d image and use in solvePnP.
- `PhotonCameraSim` uses camera properties to simulate how 3d targets would appear in its view, and has simulated noise, latency, and FPS. For apriltags, the best/alternate camera-to-target transform is also estimated with solvePnP.
  - `VideoSimUtil` has helper functions for drawing apriltags to a simulated raw and processed MJPEG stream for each camera using the projected tag corners.
- `VisionSystemSim` stores `VisionTargetSim`s and `PhotonCameraSim`s, and is periodically updated with the robot's simulated pose. When updating, camera sims are automatically processed and published with their visible targets from their respective poses with proper latency.

### What's still not working?

- Mac Arm builds are broken
- More examples
- Update website/docs
2023-06-18 18:54:12 -04:00
Sriman Achanta
4a94775639 Update PhotonPoseEstimator.java (#869) 2023-06-18 06:38:43 -05:00
Matt
f6756bdb9a Don't add bad corners to multi-tag solution (#817)
Closes #837


---------

Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
2023-06-18 01:16:10 -04:00
Matt
b1546b8038 Add SQL config manager (#818)
Serializes settings using a sqlite database instead of just putting them on the filesystem. Ideally since sqlite deals with filesystem robustness stuff this should work a lot better

Merging this now so we have lots of time to stabilize pre-beta
2023-06-18 00:47:18 -04:00
Sriman Achanta
f813048462 [PhotonClient] Fix misc bugs and dataflow errors (#861)
Fixes leftover bugs from #767 and #856

- Because new URLs aren't based on hash URL schemas, all the routes need to be updated to final paths instead of relative ones that were previously caught by the hash URL
- Fixed misc Vue warnings pointed out by @mcm001
2023-06-18 00:05:46 -04:00
Matt
013ff5e7c0 Add checking of current and requested video_mode (#859)
* (fix): Add checking of current to requested mode

* Create videoModeEquals

* Update OpenCvUtils.java

---------

Co-authored-by: Chirag Lamsal <chirag.lamsal@gmail.com>
2023-06-18 00:01:33 -04:00
Sriman Achanta
a723d3dc5c [PhotonPoseEstimator] Check for CalibData before adding Tags when using SolvePNP method (#826)
Closes #825 by re-organizing multi-tag strategy order. Should be NFC


---------

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2023-06-18 00:00:30 -04:00
Sriman Achanta
58419cfe38 Update vue-router to use HTML5 history (#856)
closes #855

Only issues I see is that only HTML5 History API supported browsers support this which is fine given that the only thing that doesn't is probably the laptop they use to flash routers at competitions.

The 404 page can be up for debate lol.
2023-06-10 17:15:28 -04:00
Sriman Achanta
7b8fb3385b [PhotonClient] Update dependencies to latest, update assets, and styling fixes (#767)
Currently, there is a difficult-to-reproduce bug where the backend reports that camera calibration was successful in logs via the logger but then throws an exception causing the backend to return a 500 error code with no request body which causes the frontend to interpret this as a failed calibration attempt. This ultimately leads to the entire instance of photonvision crashing and requiring the entire pi to be restarted. It is believed this issue resides inside the ConfigManager's saving action following the calibration update but is not confirmed.
2023-06-09 10:09:41 -07:00
Sriman Achanta
f63283e187 Change wpiformat CD to match wpilib (#858) 2023-06-08 23:45:07 -04:00
person4268
6d2eae7f20 Add ignored cameras regex to command-line arguemnts (#849)
This adds a regex that ignores cameras if they match it, for if you have another piece of software running that needs a second camera, or if you have a webcam in your laptop that cscore hates.
2023-06-03 21:04:04 -04:00
Doug Wegscheid
80f479344d Allow arbitrary networktables address (#764)
* Allow specifying NT server address by ip.
2023-05-12 18:01:09 -04:00
Stephen Day
6bdb158b33 Remove ErodeDilate from UI and ColoredShapePipeline (#829) 2023-04-18 18:50:01 -04:00
Sriman Achanta
c148331b69 Bump License year to 2023 (#841)
* Bump version

* remove year entirely
2023-04-18 18:49:40 -04:00
Murad
2d586fe1c0 Add PhotonPoseEstimator constructor without a PhotonCamera instance (#840)
- Made alternate constructor for ```PhotonPoseEstimator``` that doesn't need ```PhotonCamera```
- Changed ```update``` function to take in missing cameraMatrixData and coeffsData that were previously received from PhotonCamera.
- Changed the internal ```update``` and ```multiTagPNP``` function to take in cameraMatrixData & coeffsData
- If not needed for the specified strategy then the parameters are simply not used. Also if PhotonCamera is used in constructor it instead backs up to that.

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2023-04-18 13:50:23 -04:00
person4268
78ffa415fc Vendor fonts for offline usage (#839)
This should reduce loading time as browsers show a blank screen while they try and load the inaccessible Google Fonts. Fontsource simply provides an easy way to integrate the font without much work on our end.
2023-04-17 11:32:33 -04:00
David Vo
14224574cf Add missing PhotonCamera::GetCameraName impl (#844) 2023-04-17 11:27:40 -04:00
Matt
dcd917870c Properly assign camera index when connecting new camera (#819) 2023-03-01 16:05:30 -05:00
Matt
2b8f900768 Add checks for null in NTDataPublisher (#820) 2023-03-01 16:05:22 -05:00
Matt
0bb563a6e2 Save ConfigManager to disk on JVM exit (#821) 2023-03-01 16:05:03 -05:00
Matt
cdf045d887 Bump wpilib to 2023.4.2 (#815) 2023-02-27 08:30:06 -06:00
Mason Vogt
767c0471d9 Fix typo in calibration message (#814) 2023-02-26 22:39:46 -05:00
Matt
cf68f2a450 Bump wpilib to 2023.4.1 (#811) v2023.4.2 2023-02-19 12:46:12 -05:00