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

Set visual 2D bounds from code #6127

Merged
merged 20 commits into from Apr 29, 2024
Merged

Set visual 2D bounds from code #6127

merged 20 commits into from Apr 29, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Apr 26, 2024

What

Usage:

rrb.Spatial2DView(visual_bounds=rrb.VisualBounds(min=[0.0, 0.0], max=[10.0, 20.0]))

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 🐍 Python API Python logging API 🟦 blueprint The data that defines our UI include in changelog labels Apr 26, 2024
Copy link

github-actions bot commented Apr 26, 2024

Deployed docs

Commit Link
ac3a440 https://landing-pgeam26ze-rerun.vercel.app/docs

@emilk emilk force-pushed the emilk/visual-2d-bounds branch 2 times, most recently from 4e0215b to a99e900 Compare April 26, 2024 11:47
@emilk
Copy link
Member Author

emilk commented Apr 26, 2024

$ pixi run py-build
$ _RERUN_TEST_FORCE_SAVE=foo.rrd pixi run python docs/snippets/all/annotation_context_rects.py
$ pixi run rerun print foo.rrd                                                                
…
Error: path: "foo.rrd" -> decode rrd message -> MsgPack error: unknown variant `RecoF`, expected `Recording` or `Blueprint` -> unknown variant `RecoF`, expected `Recording` or `Blueprint`

wth is happening here!? (works on main)

EDIT: unrelated issue fixed in #6120

@emilk emilk marked this pull request as ready for review April 29, 2024 12:47
@Wumpf Wumpf self-requested a review April 29, 2024 14:36
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.

nice! quite some re-usable goodies in there (:

@@ -77,14 +77,19 @@ impl LatestAtComponentResults {
re_log::debug_once!("Couldn't deserialize {component_name}: promise still pending",);
None
}
PromiseResult::Ready(data) if data.len() == 1 => Some(data[0].clone()),
PromiseResult::Ready(data) => {
Copy link
Member

Choose a reason for hiding this comment

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

ah so the warning we saw was simply a bug

@@ -52,7 +52,7 @@ impl From<AutoSizeUnit> for WidgetText {
}
}

/// TODO(andreas): Should turn this "inside out" - [`SpatialSpaceViewState`] should be used by [`View2DState`]/[`View3DState`], not the other way round.
/// TODO(andreas): Should turn this "inside out" - [`SpatialSpaceViewState`] should be used by [`View3DState`], not the other way round.
Copy link
Member

Choose a reason for hiding this comment

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

nice, progress :D

crates/re_types/definitions/rerun/components/aabb2d.fbs Outdated Show resolved Hide resolved

namespace rerun.datatypes;

// ---
Copy link
Member

Choose a reason for hiding this comment

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

you seem to be as undecided as me on keeping these clement'isms or not 😄 (you removed it in a different file in this PR but add it here)

docs/snippets/all/extra_values.py Show resolved Hide resolved
@emilk emilk merged commit f7b2bec into main Apr 29, 2024
39 checks passed
@emilk emilk deleted the emilk/visual-2d-bounds branch April 29, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟦 blueprint The data that defines our UI include in changelog 🐍 Python API Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reset individual blueprint properties to what was logged Configurable extent of 2D space views
2 participants