-
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.
add minimal_options py example and use it in e2e suite (catches 2fast…
…2log races(
- Loading branch information
Showing
4 changed files
with
28 additions
and
0 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,23 @@ | ||
#!/usr/bin/env python3 | ||
|
||
"""Demonstrates the most barebone usage of the Rerun SDK, with standard options.""" | ||
|
||
|
||
import argparse | ||
|
||
import numpy as np | ||
import rerun as rr | ||
|
||
parser = argparse.ArgumentParser(description="Logs rich data using the Rerun SDK.") | ||
rr.script_add_args(parser) | ||
args, unknown = parser.parse_known_args() | ||
[__import__("logging").warning(f"unknown arg: {arg}") for arg in unknown] | ||
|
||
rr.script_setup(args, "minimal_options") | ||
|
||
positions = np.vstack([xyz.ravel() for xyz in np.mgrid[3 * [slice(-5, 5, 10j)]]]).T | ||
colors = np.vstack([rgb.ravel() for rgb in np.mgrid[3 * [slice(0, 255, 10j)]]]).astype(np.uint8).T | ||
|
||
rr.log_points("my_points", positions=positions, colors=colors) | ||
|
||
rr.script_teardown(args) |
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,2 @@ | ||
numpy | ||
rerun-sdk |
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