## PhotonLib Java Examples ### Running examples For instructions on how to run these examples locally, see [Running Examples](https://docs.photonvision.org/en/latest/docs/contributing/photonvision/build-instructions.html#running-examples). --- ### [**`aimattarget`**](aimattarget) A simple demonstration of using PhotonVision's 2d target yaw to align a differential drivetrain with a target. --- ### [**`getinrange`**](getinrange) A simple demonstration of using PhotonVision's 2d target pitch to bring a differential drivetrain to a specific distance from a target. --- ### [**`aimandrange`**](aimandrange) A combination of the previous `aimattarget` and `getinrange` examples to simultaneously aim and get in range of a target. --- ### [**`simaimandrange`**](simaimandrange) The above `aimandrange` example with simulation support. **Keyboard controls:** - Drive forward/backward: W/S - Turn left/right: A/D - Perform vision alignment: Z --- ### [**`swervedriveposeestsim`**](swervedriveposeestsim) A minimal swerve drive example demonstrating the usage of PhotonVision for AprilTag vision estimation with a swerve drive pose estimator. The example also has simulation support with an approximation of swerve drive dynamics. **Keyboard controls:** - Translate field-relative: WASD - Rotate counter/clockwise: Q/E - Offset pose estimate: X