-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Java Simulation Examples #913
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
4c2aa16
optional pnp results, pnp method simplification
amquake 209e184
solvepnp docs clarification
amquake b4a0c90
spotless
amquake 1511b2a
fix local tag image loading
amquake 5be4557
solvepnp square NaN retry
amquake c9d2f1e
spotless
amquake 2ea3453
Merge branch 'master' into 742-robustness
mcm001 c7cc564
Merge branch 'master' into 742-robustness
amquake 6b22823
use condition in result instead of Optional
amquake 4364ac2
publish sim intrinsics/distortion to camera
amquake 1f03b96
spotless
amquake ca49c23
Merge branch 'master' of https://github.com/PhotonVision/photonvision…
amquake 2e851a0
remember to commit, me
amquake a6eec79
spotless
amquake c270828
fix tests using target yaw/pitch
amquake 423712b
spotless
amquake c15f784
fix culled polygons joining, video sim tweaks
amquake 61b037d
dont do SQPNP on non-tag targets
amquake e8a0820
non-square target points bugfix
amquake 08bc306
cuboid target model
amquake bb1b8a4
standardize image operations on Point class
amquake a084abc
spotless
amquake 8885514
draw minarearect
amquake 24bf9ff
update apriltag example
amquake 76eb0f3
oops
amquake 74f1582
fix calculated center pt
amquake 4c99b78
revert docs note
amquake 8f1eb32
update wireframe dimensions
amquake dc5d12c
Merge branch 'master' into sim-draw-targets
amquake c9a3a67
init
amquake b266946
swervedriveposeestsim
amquake d0578f5
Update build.gradle
amquake 675baca
dont use java17 random
amquake a3a3cbf
remove apriltagExample and simposeest
amquake 5c96577
remove unused stubs
amquake 599a6d9
Update simaimandrange
amquake c33e806
swervedriveposeestsim keyboard control
amquake 02318be
Merge branch 'PhotonVision:master' into update-sim-examples
amquake d0f02ec
Create java-examples README.md
amquake e243cfe
hide keyboard settings
amquake c57370e
Revert "hide keyboard settings"
amquake 5b41657
avoid sticky field objects
amquake fcdf6f2
dont display target estimations with empty transforms
amquake dd37fe7
Update examples.txt
amquake aa521d3
spotless
amquake 3a3624a
wpiformat
amquake 2a6fa1b
Merge branch 'master' into update-sim-examples
amquake ed6aa15
Switch example build to search for folder names lol
mcm001 31e32b6
Merge branch 'master' into update-sim-examples
mcm001 fb081ef
Probably fix examples CI
mcm001 c8f6f5b
Run wpiformat
mcm001 1eb5b37
link example build instructions
amquake 3bc624c
example backlinks to index readme
amquake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## PhotonLib C++ 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). | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// These should be the only 2 non-project subdirectories in the examples folder | ||
// I could check for (it)/build.gradle to exist, but w/e | ||
def EXCLUDED_DIRS = ["bin", "build"] | ||
|
||
// List all non-hidden directories not in EXCUDED_DIRS | ||
ext.exampleFolderNames = file("${rootDir}") | ||
.listFiles() | ||
.findAll { | ||
return (it.isDirectory() | ||
&& !it.isHidden() | ||
&& !(it.name in EXCLUDED_DIRS) && !it.name.startsWith(".") | ||
&& it.toPath().resolve("build.gradle").toFile().exists()) | ||
} | ||
.collect { it.name } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
new File('examples.txt').eachLine { line -> include line } | ||
apply from: "examples.gradle" | ||
|
||
exampleFolderNames.each { line -> include line } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## **`aimandrange`** | ||
|
||
### See [PhotonLib Java Examples](./README.md#aimandrange) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## **`aimattarget`** | ||
|
||
### See [PhotonLib Java Examples](./README.md#aimattarget) |
6 changes: 0 additions & 6 deletions
6
photonlib-java-examples/apriltagExample/.wpilib/wpilib_preferences.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For docs PR: this list will need to be updated