Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 1.53 KB

File metadata and controls

50 lines (30 loc) · 1.53 KB

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.


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

Extendsaimattarget to add getting in range of the target.

Keyboard controls:

  • Translate field-relative: WASD
  • Rotate counter/clockwise: Q/E
  • Perform vision alignment: Z

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