mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
## Description By hitting WPIlib's Artifactory Maven Central mirror instead of Maven Central, we should reduce the number of 403 flakes we see during workflow runs. This also removes jogamp from the repository list, as jogamp dependencies were removed in #1926. ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added --------- Co-authored-by: samfreund <samf.236@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