DeltaDizzy
d487e1c466
Fix deprecation warnings in PhotonLib examples ( #1699 )
...
The following deprecation warnings have been fixed:
- `SwerveModuleState.optimize(desiredState, currentRotation);`, which is
now an instance method
- `AprilTagFields.kDefaultField.loadAprilTagLayoutField();`, which is
now `AprilTagFieldLayout.loadField(AprilTagFields.kDefaultField);`
WIP:
- [x] C++
- [x] Python
2025-01-11 23:30:24 -05:00
mythgarr
159b848234
[python] Fix PhotonPipelineMetadata constructor arg order ( #1698 )
...
Relates to https://github.com/PhotonVision/photonvision/pull/1578
2025-01-11 23:29:19 -05:00
David Vo
53e6890f20
photon-serde: Relicense generated files under MIT ( #1709 )
2025-01-11 16:55:55 -07:00
Jochem
cc740c92c9
Added constructor overload to PhotonCameraSim for AprilTagFieldLayout ( #1692 )
2025-01-08 11:43:46 -07:00
Chris Gerth
6c7a174424
Adding timeSyncServer for Python ( #1675 )
2025-01-03 12:23:27 -06:00
Jade
7c254ec5dc
Change from k2024Crescendo to kDefaultField for AprilTagFieldLayout ( #1667 )
...
This reduces the things we need to update each year
Signed-off-by: Jade Turner <spacey-sooty@proton.me >
Co-authored-by: Matt <matthew.morley.ca@gmail.com >
2025-01-03 22:03:00 +08:00
Nolan Brown
b7a2636e97
[photon-lib] Fix sim tag ambiguity ( #1653 )
2024-12-29 17:43:55 -05:00
Jade
00d307439c
Remove duplicated dependencies blocks ( #1648 )
2024-12-25 12:25:12 -05:00
Jade
ffc4e06ac6
Move to main over master ( #1642 )
...
Resolves https://github.com/PhotonVision/photonvision/issues/251
---------
Signed-off-by: Jade Turner <spacey-sooty@proton.me >
2024-12-20 09:24:52 -08:00
Christopher Mahoney
08c62ab8cd
Java 17 ( #1440 )
...

JDK 11 References
https://github.com/search?q=org%3APhotonVision+jdk-11&type=code
JDK 17 References
https://github.com/search?q=org%3APhotonVision+jdk-17&type=code
TODO List (things we might need to update in other repos):
- []
ab5fa98d72/photonvision/src/modules/photonvision/start_chroot_script (L29)
- []
7f8d225445/stage2/01-sys-tweaks/00-packages (L34)
- []
ab5fa98d72/photonvision/src/modules/photonvision/install.sh (L11)
- []
a4e7ecb6e3/Makefile (L14)
Closes https://github.com/PhotonVision/photonvision/pull/1069
---------
Signed-off-by: Jade Turner <spacey-sooty@proton.me >
Co-authored-by: Jade <spacey-sooty@proton.me >
2024-12-17 17:01:19 +00:00
Craig Schardt
6a8d638853
Fix typehint problem with ndarrays ( #1631 )
...
mypy was inferring the wrong type for ndarrays in photonCameraSim.py.
This fixes the problem by adding typehints using numpy.typing.NDArray.
2024-12-09 05:21:37 +00:00
Craig Schardt
4997ad9115
Fix formating errors that are in master ( #1627 )
...
A few files with format mistakes were merged into master and they cause
spotless and wpiformat to fail. This PR fixes those files.
2024-12-06 22:21:05 +00:00
James Ward
1dbd2e5990
[python] Correct time units ( #1605 )
2024-11-28 16:12:52 +00:00
Lucien Morey
61552ad6ca
Tidy up of python autogenerated messages ( #1594 )
...
This fixes mostly formatting issues so there is no longer any diff with
things after rerunning the generation script. Yes, most of this can be
fixed by running wpiformat but that doesn't exist as a pre-commit hook
atm, so I think this is nicer.
It also removes any reference to the java encode/decode within the
python message gen
2024-11-21 04:43:33 +00:00
Lucien Morey
fa66ed866c
add file marker for type checking ( #1598 )
...
I think this is the correct way to do this based on my understanding of
the guide to making a [pep561 compliant
package](https://mypy.readthedocs.io/en/stable/installed_packages.html#creating-pep-561-compatible-packages )
and this example in
[black](https://github.com/psf/black/pull/1395/files ). Given that I get
all the type-checking info from a local installation, I don't know if
this is testable until it's published on Pypi.
resolves #1210
2024-11-21 04:43:05 +00:00
Lucien Morey
c536a1c312
add missing log and use logger over print ( #1596 )
...
This is closer to a port of the Java/C++ stuff and will mean we get a
more standard print output with the rest of the logging in the lib
2024-11-21 03:01:08 +00:00
James Ward
3a9d22c76b
Handle remote UUID mismatch properly ( #1590 )
...
Check for no response
Only throw if incorrect version, and not when missing
Resolves #1569
2024-11-18 21:28:07 -05:00
Matt
faa9eb0093
Disable VisionSystemSimTest entirely ( #1584 )
...
This test is still failing on main, see
https://github.com/PhotonVision/photonvision/actions/runs/11875827435/job/33093483193
2024-11-18 01:55:00 -05:00
Matt
478723ca2c
Skip Vision System Sim Tests on Windows ( #1581 )
2024-11-16 20:09:41 -08:00
Gold856
eff95c09f1
Clean up build ( #1572 )
...
Fixes #1564 . Also copies vendordep JSONs to the examples as advised by
Thad. Removes unused shared/javacpp/setupBuild.gradle. Also removes
unnecessary `chmod +x gradlew` from CI workflows.
2024-11-16 21:30:34 -05:00
Lucien Morey
097e641789
[Python] remove opencv dependency for robot installations ( #1580 )
2024-11-16 18:26:07 -08:00
James Ward
f107c94d05
[python] Fix population of metadata ( #1578 )
2024-11-16 18:25:43 -08:00
Lucien Morey
04191efc51
sphinxify java docs for python code ( #1575 )
2024-11-15 18:01:33 -08:00
Lucien Morey
dfed7e3621
Break up masssive python overload hacks ( #1573 )
...
What it says on the tin. This is all stuff from our initial effort to
port the sim things. Right now it is coupled to #1557 because this fixes
things up in that. Lets merge that one before dealing with this one
2024-11-14 14:59:55 -08:00
Lucien Morey
c50c657193
Add Python test harness for openCVHelp class ( #1557 )
2024-11-14 11:10:08 -05:00
Jade
5f3dc152c3
[photon-targeting] Remove dependency on wpilibc ( #1544 )
...
Closes https://github.com/PhotonVision/photonvision/pull/1543/files
Signed-off-by: Jade Turner <spacey-sooty@proton.me >
2024-11-14 00:25:32 -05:00
Lucien Morey
a64491a59e
[photonlibpy] add mypy to ci ( #1570 )
...
Co-authored-by: James Ward <james@thedropbears.org.au >
2024-11-13 10:39:02 -05:00
Lucien Morey
a7319ce1d6
[photonlibpy] bump python dependencies for 2025 ( #1567 )
...
I tasked my team with updating our upcoming Reefscape codebase to target
2025 packages, only to realise we have created an unsolvable dependency
nightmare with these things being neglected...
2024-11-13 10:38:44 -05:00
Lucien Morey
02c94ea7ed
[photonlibpy] stop getting full stack trace on test failure ( #1568 )
...
Signal/noise ratio is too low with this enabled. When dealing with #1567
I got ~46000 lines of errors going around in a circle rather than just
an import failure at the scope of each failed test
2024-11-13 10:38:17 -05:00
Gold856
c7ed37789e
[photon-targeting] Fix JNI loading ( #1563 )
2024-11-13 10:37:51 -05:00
James Ward
744e522aea
Correct yet more python type hinting ( #1555 )
2024-11-12 11:17:27 -05:00
David Vo
af03ae0a8b
photonlibpy: Fix some type check failures ( #1548 )
...
This fixes a variety of type check failures raised by both mypy and pyright. See #1548
2024-11-12 00:53:43 -05:00
Drew Williams
1fc93bd05d
[photonli?b C++] Fix rotation3d constructor ( #1553 )
...
Fixes #1552 -- mixed up rpy and a rotation vector
After changes:

2024-11-11 11:06:00 -05:00
Lucien Morey
b3d74e56a0
Add python simulation ( #1532 )
2024-11-10 14:16:02 -08:00
Gold856
152b4391b8
Remove unnecessary symbol exclusions ( #1542 )
2024-11-09 22:09:14 -08:00
Jade
d8de4a7863
[build] Update wpiformat to 2024.45 ( #1545 )
...
Signed-off-by: Jade Turner <spacey-sooty@proton.me >
2024-11-10 13:42:16 +08:00
Matt
14f7155a23
[TSP] Move Bind() to Start ( #1538 )
...
Fixes UB with static init. Turns out starting threads in static init doesn't work on windows.
2024-11-09 17:35:38 -05:00
Lucien Morey
d188c37466
Fix missing vars and catch bad shim ( #1541 )
...
I made a mistake when cherry-picking things into #1534 . Fixing it also
prompted me to regenerate message things without thinking even though it
wasn't needed here but it helped me catch an issue with a bad shim. I
must not have saved it properly on my computer and missed it before
review.
2024-11-09 17:32:35 -05:00
Lucien Morey
14fcc5d485
generate packing for python messages ( #1535 )
...
Generate packet serialization in Python, too.
2024-11-09 13:08:45 -05:00
Lucien Morey
1d8d934a8a
Enable Python tests, standardise variable spelling and fix arg checking ( #1533 )
...
I found these with a quick find-and-replace and checked against the inbuilt Python type checking. I am away from my robot and can't really
confirm there are no flow-on effects. There are no other active usages of the bad casing in the Python code, so we should be good. The generated serde messages already use this casing, so we don't need to update there.
2024-11-09 08:08:57 +08:00
Lucien Morey
bdb2949b4b
Stop type hinting members as optional in PhotonTrackedTarget ( #1539 )
...
List types should never be optional if sent to NT because an empty list conveys the same
thing.
The equivalent C++ struct takes the same approach with empty vectors rather than an optional vector.
2024-11-09 07:58:56 +08:00
Gold856
04ec99f17a
Add license to jars ( #1530 )
...
Fixes GPL violation, the license has been missing since 2024.
This also puts licenses in as many JARs and native library archives as possible (for good measure.)
2024-11-08 09:10:14 +08:00
Lucien Morey
150561abf2
Add missing var to dataclass ( #1534 )
2024-11-07 18:31:21 -05:00
Matt
fc8ecac376
Create TSP Server in C++ photonlib ( #1516 )
...
Automatically starts a TCP server in C++. Also adds warnings to Python.
2024-11-01 23:32:38 -07:00
Jade
75e2498f53
Fix typos ( #1508 )
...
Signed-off-by: Jade Turner <spacey-sooty@proton.me >
2024-11-01 23:51:16 -04:00
Matt
7a4ea3dd56
Assert that version checking won't throw on startup ( #1512 )
...
# Overview
Previously if the coproc came up later, getProperty would return the
string literal "null", which made us print the BFW. Add tests to make
sure that we don't do that anymore by rebooting a sim coproc +
robot in a combination of different orders.
2024-11-01 23:50:21 -04:00
Matt
37aaa49b32
Create timesync JNI for testing client ( #1433 )
2024-10-31 08:27:19 -07:00
Cameron (3539)
937bafa8e2
Bump to WPILib 2025 Beta 1 & remove C++ protobuf ( #1484 )
...
Remove C++ protobuf support until
https://github.com/wpilibsuite/allwpilib/issues/7250 is addressed.
Developers should upgrade to wpilib vscode 2025 beta 1.
---------
Co-authored-by: Matt <matthew.morley.ca@gmail.com >
2024-10-31 02:59:39 -04:00
Matt
7da2ec1948
Fix PhotonCamera typestring checks ( #1480 )
...
Previously NT would quietly drop readQueue changes.
2024-10-20 22:21:24 -07:00
Matt
a0c85fc95f
Create photon-targeting-JNI framework ( #1428 )
...
Initial framework for adding JNI libraries. Auto generated JNI headers and sticks native libraries into the JAR (and adds to class path for testing)
2024-09-23 22:44:09 -04:00