-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the example work with _RERUN_TEST_FORCE_SAVE
- Loading branch information
Showing
1 changed file
with
11 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
import rerun as rr | ||
import rerun.blueprint as rrb | ||
|
||
blueprint = rrb.Spatial2DView(background=[128, 0, 0], visual_bounds=rrb.VisualBounds(min=[-4.5, -2.5], max=[2.5, 2.5])) | ||
rr.init("rerun_example_annotation_context_rects", spawn=True, default_blueprint=blueprint) | ||
rr.init("rerun_example_annotation_context_rects", spawn=True) | ||
|
||
# Log an annotation context to assign a label and color to each class | ||
rr.log("/", rr.AnnotationContext([(1, "red", (255, 0, 0)), (2, "green", (0, 255, 0))]), static=True) | ||
|
||
# Log a batch of 2 rectangles with different `class_ids` | ||
rr.log("detections", rr.Boxes2D(mins=[[-2, -2], [0, 0]], sizes=[[3, 3], [2, 2]], class_ids=[1, 2])) | ||
|
||
# Create a Spatial3D View | ||
blueprint = rrb.Blueprint( | ||
rrb.Spatial3DView( | ||
origin="/points", | ||
background=[80, 80, 80], | ||
) | ||
) | ||
|
||
rr.send_blueprint(rrb.Spatial2DView(visual_bounds=rrb.VisualBounds(min=[-4.5, -2.5], max=[2.5, 2.5]))) |