Skip to content
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

Allow any pan/zoom in 2D spatial views #6089

Merged
merged 20 commits into from
Apr 25, 2024
Merged

Allow any pan/zoom in 2D spatial views #6089

merged 20 commits into from
Apr 25, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Apr 23, 2024

What

By default the bounds are centered:

Before:
Screenshot 2024-04-24 at 11 46 47

After:
Screenshot 2024-04-24 at 11 45 41

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

@emilk emilk added ui concerns graphical user interface include in changelog labels Apr 23, 2024
@emilk emilk marked this pull request as ready for review April 24, 2024 12:10
@Wumpf Wumpf self-requested a review April 24, 2024 12:13
@Wumpf
Copy link
Member

Wumpf commented Apr 24, 2024

the default bounds isn't dealing correctly with principal point yet:
image

notice there's a black bar at the bottom - this is before doing any panning/zooming etc., freshly reset

@emilk emilk marked this pull request as draft April 24, 2024 12:17
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah didn't notice this got drafted and started a review. Didn't come all that far yet :)

crates/re_space_view_spatial/src/space_view_2d.rs Outdated Show resolved Hide resolved
Co-authored-by: Andreas Reich <[email protected]>
@emilk
Copy link
Member Author

emilk commented Apr 24, 2024

I re-drafted it once you started finding bugs

@emilk emilk force-pushed the emilk/new-2d-bounds branch from 5222453 to bdf6843 Compare April 24, 2024 18:31
@emilk
Copy link
Member Author

emilk commented Apr 24, 2024

I think I fixed it now, but will add a test tomorrow, and add some comments for future improvements

@emilk emilk force-pushed the emilk/new-2d-bounds branch from 89d594f to 60aea9d Compare April 25, 2024 06:37
@emilk emilk marked this pull request as ready for review April 25, 2024 07:07
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few more things to clean up but then we're good to go!
Very happy to finally get this in, this gets is a much better position to do further improvements in 2D land

crates/re_renderer/src/view_builder.rs Show resolved Hide resolved
crates/re_renderer/src/view_builder.rs Show resolved Hide resolved
@@ -11,7 +11,7 @@ workspace = true

[dependencies]
re_log = { workspace = true, features = ["setup"] }
rerun = { path = "../../../crates/rerun", features = ["web_viewer"] }
rerun = { path = "../../../crates/rerun", features = ["clap", "web_viewer"] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not seeing any corresponding code changes, was it broken somehow?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, running this test standalone did not compile.

scripts/ci/rust_checks.py doesn't cover tests/rust, just examples/rust

Comment on lines +101 to +102
# Intentionally off-center to demonstrate that we support it
principal_point=[0.45 * img_depth.shape[1], 0.55 * img_depth.shape[0]],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trying to process whether this makes e.g. length of depth rays incorrect for the data at hand 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't know the true pinhole for the dataset, anything we use is a guess

crates/re_space_view_spatial/src/ui_2d.rs Outdated Show resolved Hide resolved
crates/re_space_view_spatial/src/ui_2d.rs Show resolved Hide resolved
@emilk emilk merged commit 10753fa into main Apr 25, 2024
34 checks passed
@emilk emilk deleted the emilk/new-2d-bounds branch April 25, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog ui concerns graphical user interface
Projects
None yet
2 participants