mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Update Java Simulation Examples (#913)
Removes apriltagExample and simposeest, replacing them with swervedriveposeestsim --------- Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This commit is contained in:
53
photonlib-java-examples/README.md
Normal file
53
photonlib-java-examples/README.md
Normal file
@@ -0,0 +1,53 @@
|
||||
## 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.
|
||||
|
||||
<img src="https://github-production-user-asset-6210df.s3.amazonaws.com/7953350/268856085-432a54b9-f596-4e30-8b57-a8f38f88f985.png" width=60% height=60%>
|
||||
|
||||
**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.
|
||||
|
||||
<img src="https://github-production-user-asset-6210df.s3.amazonaws.com/7953350/268862944-3392e69a-7705-4dbc-9eb8-0d03a6e27b9e.png" width=60% height=60%>
|
||||
|
||||
<img src="https://github-production-user-asset-6210df.s3.amazonaws.com/7953350/268857280-bae145b8-356e-4afb-b842-597dbea60df6.png" width=60% height=60%>
|
||||
|
||||
**Keyboard controls:**
|
||||
- Translate field-relative: WASD
|
||||
- Rotate counter/clockwise: Q/E
|
||||
- Offset pose estimate: X
|
||||
Reference in New Issue
Block a user