mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
 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>
PhotonLib Java Examples
All examples demonstrate controlling a swerve drive with outputs from PhotonVision.
Simulation is available to demonstrate the concepts - swerve physics is approximated.
You can access a stream of what the simulated camera sees by going to https://localhost:1182 .
Running examples
For instructions on how to run these examples locally, see Running Examples.
aimattarget
A simple demonstration of using PhotonVision's 2d target yaw to align a differential drivetrain with a target.
Keyboard controls:
- Translate field-relative: WASD
- Rotate counter/clockwise: Q/E
- Perform vision alignment: Z
aimandrange
Extendsaimattarget to add getting in range of the target.
Keyboard controls:
- Translate field-relative: WASD
- Rotate counter/clockwise: Q/E
- Perform vision alignment: Z
poseest
The example also has simulation support with an approximation of swerve drive dynamics.
Keyboard controls:
- Translate field-relative: WASD
- Rotate counter/clockwise: Q/E
- Perform vision alignment: Z
- Offset pose estimate: X