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

Add blueprint to the RGBD example #5623

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion examples/python/rgbd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import numpy.typing as npt
import requests
import rerun as rr # pip install rerun-sdk
import rerun.blueprint as rrb
from tqdm import tqdm

DEPTH_IMAGE_SCALING: Final = 1e4
Expand Down Expand Up @@ -160,7 +161,20 @@ def main() -> None:
rr.script_add_args(parser)
args = parser.parse_args()

rr.script_setup(args, "rerun_example_rgbd")
rr.script_setup(
args,
"rerun_example_rgbd",
blueprint=rrb.Horizontal(
rrb.Spatial3DView(name="3D", origin="world"),
rrb.Vertical(
# Put the origin for both 2D spaces where the pinhole is logged. Doing so allows them to understand how they're connected to the 3D space.
# This enables interactions like clicking on a point in the 3D space to show the corresponding point in the 2D spaces and vice versa.
rrb.Spatial2DView(name="Depth & RGB", origin="world/camera/image"),
rrb.Spatial2DView(name="RGB", origin="world/camera/image", contents="world/camera/image/rgb"),
),
column_shares=[2, 1],
),
)
recording_path = ensure_recording_downloaded(args.recording)

log_nyud_data(
Expand Down
Loading