-
Notifications
You must be signed in to change notification settings - Fork 5
Projection uncertainty #20
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
Open
mcm001
wants to merge
26
commits into
main
Choose a base branch
from
projection-uncertainty
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
9664cb3
Create projection-uncertainty Java JNI
mcm001 5056c0b
Delete pictures that we don't need
mcm001 6194f06
missing std-span
mcm001 8893959
loop 5 times, print speed, write out to file
mcm001 53901e8
run lint
mcm001 f71f581
delete unused functions
mcm001 138a0b2
batch solve
mcm001 21a5440
Revert "batch solve"
mcm001 4e0c767
remove sparsity debugs
mcm001 f500f9f
add back dead jni code
mcm001 80f96ac
add dep to gradle
mcm001 2eb67c5
whee
mcm001 1374d28
big ass dataset
mcm001 7d1e76f
new gitignore
mcm001 0fdd4b0
download whippymath
mcm001 cd491bb
linter!
mcm001 1b01b2c
remove fmt/ stuff
mcm001 f49c577
hmmm
mcm001 646eb18
print what
mcm001 0ee7f4c
dont link to fmtlib
mcm001 c4ffb83
hng
mcm001 f7160ae
run lint
mcm001 1640352
delete some code
mcm001 d1a5ab8
Delete silly comments
mcm001 11767e9
Clean things up
mcm001 4ee6e5c
ignore my deps, bruh
mcm001 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 hidden or 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 |
|---|---|---|
|
|
@@ -37,3 +37,5 @@ cmake_build/* | |
| bin/ | ||
|
|
||
| vcpkg_installed | ||
|
|
||
| .venv | ||
This file contains hidden or 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 hidden or 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,21 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "build-test", | ||
| "command": "cmake --build cmake_build/", | ||
| "type": "shell", | ||
| "args": [], | ||
| "problemMatcher": [ | ||
| "$tsc" | ||
| ], | ||
| "presentation": { | ||
| "reveal": "always" | ||
| }, | ||
| "group": { | ||
| "kind": "build", | ||
| "isDefault": true | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,32 @@ | ||
| import math | ||
|
|
||
| import matplotlib.pyplot as plt | ||
| import numpy as np | ||
|
|
||
| # Load CSV-like data | ||
| data = np.loadtxt("out", delimiter=",") | ||
|
|
||
| x = data[:, 0] | ||
| y = data[:, 1] | ||
| z = data[:, 2] | ||
|
|
||
| plt.figure() | ||
| plt.title("Projection Uncertainty (in pixels), looking out to infinity") | ||
|
|
||
| print(f"Mean={np.mean(z)}") | ||
|
|
||
| # Create contour plot with 1px increments | ||
| levels = np.arange(0, math.ceil(np.max(z)), 0.1) # 0, 1, 2, ..., 10 | ||
| contour = plt.tricontour(x, y, z, levels=levels, colors="black", linewidths=0.5) | ||
| contourf = plt.tricontourf(x, y, z, levels=levels, cmap="viridis") | ||
| plt.clabel(contour, inline=True, fontsize=8, fmt="%0.1f px") | ||
| plt.colorbar(contourf, label="Uncertainty (px)") | ||
|
|
||
| plt.xlabel("x") | ||
| plt.ylabel("y") | ||
| plt.gca().invert_yaxis() | ||
| plt.axis("equal") | ||
| plt.tight_layout() | ||
|
|
||
| # plt.show() | ||
| plt.savefig("heatmap.svg") |
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.
WPILib is C++ 20 and I feel like we are everywhere else, will this be fine?