-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flesh out archetype docs and simple code examples for more types (#2467)
### What Continues following the pattern established from: - #2438 Contributes to: - #2382 Preview: - https://landing-2yxomjvlz-rerun.vercel.app/preview/d8d222a/docs/reference/data_types ### Checklist * [ ] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [ ] I've included a screenshot or gif (if applicable) <!-- This line will get updated when the PR build summary job finishes. --> PR Build Summary: https://build.rerun.io/pr/2467 <!-- pr-link-docs:start --> Docs preview: https://rerun.io/preview/5eba986/docs Examples preview: https://rerun.io/preview/5eba986/examples <!-- pr-link-docs:end --> --------- Co-authored-by: Nikolaus West <[email protected]> Co-authored-by: Nikolaus West <[email protected]>
- Loading branch information
1 parent
907c80d
commit 4b18c4b
Showing
16 changed files
with
291 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
"""Log a single arrow.""" | ||
import rerun as rr | ||
|
||
rr.init("arrow", spawn=True) | ||
|
||
rr.log_arrow("simple", origin=[0, 0, 0], vector=[1, 0, 1], width_scale=0.05) |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
"""Log a single oriented bounding box.""" | ||
import rerun as rr | ||
|
||
rr.init("box3d", spawn=True) | ||
|
||
rr.log_obb("simple", half_size=[2.0, 2.0, 1.0]) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"""Log a simple set of line segments.""" | ||
import rerun as rr | ||
|
||
rr.init("linesegments2d", spawn=True) | ||
|
||
rr.log_line_segments( | ||
"simple", | ||
[[0, 0], [2, 1], [4, -1], [6, 0]], | ||
) | ||
|
||
# Log an extra rect to set the view bounds | ||
rr.log_rect("bounds", [3, 0, 8, 6], rect_format=rr.RectFormat.XCYCWH) |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""Log a simple set of line segments.""" | ||
import rerun as rr | ||
|
||
rr.init("linesegments3d", spawn=True) | ||
|
||
rr.log_line_segments( | ||
"simple", | ||
[ | ||
[0, 0, 0], | ||
[0, 0, 1], | ||
[1, 0, 0], | ||
[1, 0, 1], | ||
[1, 1, 0], | ||
[1, 1, 1], | ||
[0, 1, 0], | ||
[0, 1, 1], | ||
], | ||
) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"""Log a simple line strip.""" | ||
import rerun as rr | ||
|
||
rr.init("linestrip2d", spawn=True) | ||
|
||
rr.log_line_strip( | ||
"simple", | ||
[[0, 0], [2, 1], [4, -1], [6, 0]], | ||
) | ||
|
||
# Log an extra rect to set the view bounds | ||
rr.log_rect("bounds", [3, 0, 8, 6], rect_format=rr.RectFormat.XCYCWH) |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""Log a simple line strip.""" | ||
import rerun as rr | ||
|
||
rr.init("linestrip3d", spawn=True) | ||
|
||
rr.log_line_strip( | ||
"simple", | ||
[ | ||
[0, 0, 0], | ||
[0, 0, 1], | ||
[1, 0, 0], | ||
[1, 0, 1], | ||
[1, 1, 0], | ||
[1, 1, 1], | ||
[0, 1, 0], | ||
[0, 1, 1], | ||
], | ||
) |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Log a simple colored triangle.""" | ||
import rerun as rr | ||
|
||
rr.init("mesh", spawn=True) | ||
|
||
rr.log_mesh( | ||
"triangle", | ||
positions=[ | ||
[0.0, 0.0, 0.0], | ||
[1.0, 0.0, 0.0], | ||
[0.0, 1.0, 0.0], | ||
], | ||
indices=[0, 1, 2], | ||
normals=[ | ||
[0.0, 0.0, 1.0], | ||
[0.0, 0.0, 1.0], | ||
[0.0, 0.0, 1.0], | ||
], | ||
vertex_colors=[ | ||
[255, 0, 0], | ||
[0, 255, 0], | ||
[0, 0, 255], | ||
], | ||
) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"""Log a simple rectangle.""" | ||
import rerun as rr | ||
|
||
rr.init("rect2d", spawn=True) | ||
|
||
rr.log_rect("simple", [-1, -1, 2, 2], rect_format=rr.RectFormat.XYWH) | ||
|
||
# Log an extra rect to set the view bounds | ||
rr.log_rect("bounds", [0, 0, 4, 3], rect_format=rr.RectFormat.XCYCWH) |
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
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
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
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
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
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
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
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
4b18c4b
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.
Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.25
.mono_points_arrow_batched/generate_message_bundles
28682650
ns/iter (± 1804092
)21617052
ns/iter (± 675155
)1.33
mono_points_arrow_batched/encode_total
35504867
ns/iter (± 1724381
)28282145
ns/iter (± 649308
)1.26
batch_points_arrow/encode_log_msg
92327
ns/iter (± 308
)73359
ns/iter (± 779
)1.26
This comment was automatically generated by workflow using github-action-benchmark.