Files
PhotonVision/photonlib-java-examples
Drew Williams 96de176ba2 Changes sim to use 36h11 tags (#1056)
Fixes #1041

---------

Co-authored-by: Drew Williams <DrewW@iARx.com>
Co-authored-by: Matt <matthew.morley.ca@gmail.com>
2024-01-02 08:09:32 -07:00
..

PhotonLib Java Examples

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.


getinrange

A simple demonstration of using PhotonVision's 2d target pitch to bring a differential drivetrain to a specific distance from a target.


aimandrange

A combination of the previous aimattarget and getinrange examples to simultaneously aim and get in range of a target.


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

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