Commit Graph

111 Commits

Author SHA1 Message Date
Matt
d9f99f9c9b Add calibration decimate dropdown (#739)
* Increase resized size to 640

* Add calibration decimation dropdown

* Update Calibrate3dPipeTest.java

* Only allow decimation down to >=320x240

* Update CamerasView.vue
2023-01-14 19:23:14 -06:00
Matt
073714f0bc [AprilTags] Reduce default iterations to 40 (#726)
Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com>
2023-01-11 16:32:31 -05:00
Jack
80e16ece87 Add hostname to camerapublisher mjpeg stream (#722)
Closes #721
2023-01-09 13:11:49 -05:00
Matt
86b9d4b037 Add 2023 pics to test mode (#720) 2023-01-07 20:48:21 -05:00
amquake
63b3cfe7e1 Remove distortion logs (#712)
* remove distortion logs

* spotless

* Run spotless

💀

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2023-01-06 23:09:58 -05:00
Matt
967be84b4b Expose detected tag corners (#702)
Removes GetCorners, replaces with getMinAreaRectCorners and getDetectedCorners
2023-01-06 22:20:27 -05:00
Nick Hadley
0f427bb52b Update PhotonCamera error messages to be more specific (#697)
Closes #692
2023-01-05 19:28:32 -05:00
Mohammad Durrani
05198ef294 Aruco Support for AprilTag Detection (Experimental) (#636)
Uses OpenCV's aruco module for AprilTag detection.
2023-01-05 13:25:44 -05:00
Matt
b263fe19cc Undistort corners in umich pose estimation (#699)
* Undistort corners in umich pose estimation

Add tag corner unit test

Delete hellooo.jpg

Update Draw3dTargetsPipe.java

Update FileFrameProvider.java

* Update AprilTagTest.java
2023-01-05 12:08:25 -06:00
Chris Gerth
326701b74f Bug Fix Grab Bag (#688)
* Reordered ov video modes to be lowest-to-highest res

* Save off sensor model on init. Guard against low, crashy exposures.

* Pulled in matt's fixups from https://github.com/PhotonVision/photon-libcamera-gl-driver/suites/10144555465/artifacts/495489276

* Further autoexposure tweaks for picam v1

* Allow undercores in camera rename

* Additional guarding against output images being empty

* lock out auto-exposure on ov9281's

* Guarding stream pipelines against empty frames from cameras. Rearranged driver stream to resize first, then draw crosshairs (matchces with other pipelines now).

* NT Priority fixup - if client is sending commands on NT, its nt value should win over anything done from the UI

* Synchronous pipline adjustmet fix, method cleanup

* lint

* circle pipe and data publish bugfixes

* lint

* Pulled in matt's latest .so and re-enabled auto exposure on 9281's
2023-01-03 21:53:04 -06:00
Mohammad Durrani
1ab5b66829 Clean up front end, remove decision margin and error bits, remove target family selector (#652)
* clean up front end ui

* address changes

* Further tweaks to camera default gains to help make sure users get a good first impression

* even more saner defaults

* Even even more camera sane defaults

* lint

* lint pt 2

* unit test fixup

Co-authored-by: Chris <chrisgerth010592@gmail.com>
2022-12-31 18:29:36 -05:00
Chris Gerth
d0bf64af6c Convert input/output image save to integers (#664)
Changes image saving technique to use integers, not booleans
2022-12-30 22:48:28 -05:00
Sriman Achanta
15fbe29d34 Remove redundant if check in OutputStreamPipeline (#660)
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2022-12-30 02:00:14 -05:00
Matt
3a10f49b54 Only run Apriltag pose estimation when enabled (#657)
Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
2022-12-28 13:32:38 -08:00
Matt
7ff630dc44 Replace MMAL driver with Libcamera (#491)
Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
2022-12-28 14:21:41 -05:00
Chris Gerth
cf1a45d35b Set a compression level to better optimize the latency of the stream by reducing the bytes sent (#656) 2022-12-27 15:55:43 -05:00
Matt
2ebc27aa3b Use refactored Apriltag API in WPILib (#644)
Bumps to a wpilib dev version, until they cut a new release. Should help address the random NPEs from the old JNI.

Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
2022-12-27 13:47:20 -05:00
Chris Gerth
b1905954bc Fix isRaspian() to properly detect Buster image (#637)
* Revised isRaspian() call to look in multiple spots to check if we're a Pi or not

* wpiformat

* linefeed fixup

* whoops

* WIP updating platform

* More platform fixups WIP

* Condensed metrics classes, but expanded the configuration to default to file, but fall back on hardcoded commands for certain platforms

* Migrate unixSupported to isLinux

* applied spotless

* wpiformat

* Linux metrics (#641)

* Move generic commands from PiCmds to LinuxCmds; have PiCmds inherit from LinuxCmds

* Better names for variables to save the total memory values

* Remove "Bionic" from the architecture; that is not actually determined.

* Trigger PhotonVision CI

* Dummy change to trigger CI

* Run format

Update index.html

Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com>
Co-authored-by: Paul Rensing <prensing@gmail.com>
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2022-12-26 22:51:34 -05:00
Mohammad Durrani
548f52e117 Allow JAR update/restart on all linux platforms (#651)
* Added linux support

* Changed to just check linux
2022-12-26 21:40:36 -05:00
Chris Gerth
1971744589 Revert to mjpeg (#645)
* Reverted to front end using MJPEG streams. Added FPS limiting to the stream.

* formatting

* fixup - got handlers getting called on error to reload

* revised architecture to let a click open a new tab

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2022-12-25 06:55:12 -08:00
Matt
6c51d8ab51 Update license on orthogonalizeRotationMatrix (#615)
Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com>
2022-12-25 00:08:09 -05:00
amquake
e1b39a1723 Prepare for config.json renaming cameraExtrinsics to distCoeffs (#612)
Doesn't actually rename in the JSON file yet, but fixes the name everywhere else
2022-12-25 00:01:24 -05:00
Chris Gerth
96006fc501 Fix misplaced crosshair when rotated +-90 degrees (#646) 2022-12-24 19:57:26 -05:00
Matt
4fd7533456 Manage network on all Linux platforms (#630) 2022-12-17 22:29:27 -06:00
shueja-personal
bb63af601d Update to wpilib 2023 beta 7 (#607)
We now need platform specific jars -- reworks actions to support that. Currently only generates 32 bit pi images.
2022-12-16 20:05:23 -05:00
sarah-e-c
ec7bef7a4b Logging for NTDataPublisher (#560)
* logging for NTDataPublisher

* logging name along with index

* formatting lol

* resolution logging

* Removed pipelineManager object from data publisher
2022-12-01 18:35:43 -06:00
Chris Gerth
678961e4f2 Websocket Stream Stats & Robustness Improvements (#605)
* wip support for a stats overlay

* WIP adding stream stats. But.... eeeh. Corporate.

* kbits over mbytes

* A ton more tweaks:

- Increased thread priority for streaming to reduce "stutter/slow" issues
- revised client side URL creation order to prevent the possibility of repeat-identical URL's
- Improved overlay to only be visible on mouseover, and fully centered in the screen

* wpiformat on js
2022-12-01 12:42:21 -06:00
Matt
dcad7f34a2 Fix thinclient address in dev builds and move thinclient (#586)
* Fix thinclient address in dev builds and move thinclient

Update USBFrameProvider.java

Create index.html

Update index.html

Null check stream to prevent spam

* Update main.yml

Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
2022-11-13 15:51:02 -06:00
Matt
72d8f49145 Add orthogonalizeRotationMatrix (#587)
* Add orthogonalizeRotationMatrix

* Update docstring

Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
2022-11-13 14:49:59 -06:00
Matt
c7aa84ca41 Add tag16h5 support (#584)
* Fix target dropdown

* Add hamming and decision margin to UI, pipeline

* Run spotless

* Update index.html

* Update index.html

* Implement second apriltag size
2022-11-10 18:48:41 -08:00
Matt
209cdbf45f Re-license apriltag code (#585)
Relicense under wpilib BSD license
2022-11-09 23:22:47 -05:00
Chris Gerth
a64697e714 Added proper state machine to websocket video stream to control connect/disconnect sequence better. (#561) 2022-11-03 15:05:17 -05:00
Jack
e971db2f52 Fix pipeline setting update not being sent if only autoexposure fails (#565) 2022-11-03 13:12:21 -04:00
Andrew Gasser
b1280e49d5 Ignore cameras with no supported VideoModes (#550) 2022-10-30 22:58:22 -04:00
Chris Gerth
aaac6a4fbb Add Websocket Camera Streaming (#529)
* WIP adding second websocket handling for cameras

* just more WIP

* even more wip. Most java-side framework completed, but not yet debugged

* IT LIVES. Still needs lots of cleanup. But we're transferring and displaying data!

* moved down an architecture layer. Improved multiple-camera handling

* Additional WIP to help improve smoothness and performance, though not yet tested

* bugfixes galore

* tweak compression

* spotless

* more tweaks for handling slow/intermittent streams

* wpilibformat maybe?

* clang-format maybe?

* WIP - adding thinclient. I don't like it yet, it should be more auto-generated than it is.

* thinclient formatting fixups

* Reduced amount of empty send data by limiting to only one stream per client (which is all we really need). Framerate is up slightly, overhead is down.

* bugfixes, faster streaming, better mjpeg compression settings, thinclient working

* spotless and formatting

* cmon wpiformat....

* re-added mjpg streams

* added a loading GIF to imporve the feeling of responsiveness

* formatting

* urlparams and built-in thinclient

* wpiformat

* prevent wpiformat complaints

* Removed uint8 array and base64 conversion from client side

* Synced up js implementations for ws streaming

* formatting/spotless
2022-10-30 13:16:17 -05:00
Chris Gerth
45d99f1f6b Added camera quirek to account for Facetime HD Cameras, and fix logging message (#551) 2022-10-30 14:13:55 -04:00
Chris Gerth
c4500ce12b Added throttling reasons and cpu uptime (#507)
* Added throttling reasons and cpu uptime

* spotless

* adding tooltips for the acronyms used

* Added icon for suggesting folks should attempt a hover-over for tooltip

* wip making the implementaiton more platform independent

* spotless

* wpiformat

* wpilibformat pt 2
2022-10-29 06:50:51 -04:00
Jack
81d19672d2 Change order of drawing to better show axes (#541) 2022-10-28 17:54:57 -05:00
Avery Black
5e604cf98d Remove 90 degree offset from UI (#533)
Removes offset originally added to offset broken backend code
2022-10-24 15:18:46 -04:00
Matt
2d7a88e231 Expose both pose solutions (#521)
* Half-add second pose

* add c++

* run wpiformat

* Fix c++
2022-10-22 06:42:45 -05:00
amquake
27198a3e32 Don't spam log on client connection retry (#530)
* dont spam log on connection retry

* Move print into ntTick

Update NetworkTablesManager.java

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2022-10-21 23:37:22 -04:00
Chris Gerth
c392d5fa4d Exclude more broken cameras (#527)
* Adding new broken cameras

* Fixed up snapcamera enumeration to actually detect snapcamera
2022-10-21 19:39:30 -04:00
Chris Gerth
ccd3a512d6 Add additional try/catch to prevent pigpio communication issues from crashing the main thread (#511) 2022-10-21 18:10:32 -04:00
Matt
bfc5e45cd0 Restart NT client every 5 seconds if not connected (#467)
Fun hack to get around photonvision not connecting if it boots before robot code starts

Co-authored-by: shueja-personal <32416547+shueja-personal@users.noreply.github.com>
2022-10-18 23:52:13 -04:00
Jack
a1b09100e0 Remove pitch camera configuration (#492)
* Remove pitch configuration from camera view

* Remove pitch config from backend; fix 'this' binding bug

* Stylistic choice to remove excessive whitespace br

* Spotless apply

* Spotless apply 2
2022-10-17 12:41:57 -04:00
Matt
07904589df Rotate all solvePNP-ed poses to be 180 about Z facing camera (#500)
* Rotate all solvePNP-ed poses to be 180 about Z facing camera

* Run spotless

* Fix test coordinate systems
2022-10-16 17:48:30 -07:00
Matt
87e7c3ca74 [Wip] Add auto exposure switch (#488)
* Add auto exposure switch

* Run wpiformat

* Update ZeroCopyPicamSource.java
2022-10-09 21:41:40 -05:00
Chris Gerth
4d5904dd6d Stream content reorg. (#489)
Revised stream and target draw logic to divide the streams by "Raw" and "Processed" and only draw the results on the "Processed" stream.

Should allow for input sterams to be recorded for raw camera input, and output for debug info.
2022-10-09 21:30:16 -04:00
Avery Black
9bf589ebc6 Disable auto focus on USB cameras by default (#487)
* Disable auto focus on USB cameras by default

* Remove extra log

* Implement camera quirk for auto focus

* Spotless apply
2022-10-09 17:49:58 -04:00
Matt
4ad9d97508 Fix AprilTag rotation reversal bug (#482)
Applies base rotation to apriltags to match solvepnp base rotation
2022-10-08 09:27:27 -04:00