-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
73 additions
and
4 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
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 @@ | ||
"""Use `AnyBatchValue` and `send_column` to send an entire column of custom data to Rerun.""" | ||
|
||
from __future__ import annotations | ||
|
||
import numpy as np | ||
import rerun as rr | ||
|
||
rr.init("rerun_example_any_batch_value_send_columns", spawn=True) | ||
|
||
N = 64 | ||
timestamps = np.arange(0, N) | ||
one_per_timestamp = np.sin(timestamps / 10.0) | ||
ten_per_timestamp = np.cos(np.arange(0, N * 10) / 100.0) | ||
|
||
rr.send_columns( | ||
"/", | ||
times=[rr.TimeSequenceColumn("step", timestamps)], | ||
components=[ | ||
# log one value per timestamp | ||
rr.AnyBatchValue("custom_component_single", one_per_timestamp), | ||
# log ten values per timestamp | ||
rr.AnyBatchValue("custom_component_multi", ten_per_timestamp).partition([10] * N), | ||
], | ||
) |
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,22 @@ | ||
"""Use `AnyValues` and `send_column` to send entire columns of custom data to Rerun.""" | ||
|
||
from __future__ import annotations | ||
|
||
import numpy as np | ||
import rerun as rr | ||
|
||
rr.init("rerun_example_any_values_send_columns", spawn=True) | ||
|
||
timestamps = np.arange(0, 64) | ||
|
||
# Log two components, named "sin" and "cos", with the corresponding values | ||
values = rr.AnyValues( | ||
sin=np.sin(timestamps / 10.0), | ||
cos=np.cos(timestamps / 10.0), | ||
) | ||
|
||
rr.send_columns( | ||
"/", | ||
times=[rr.TimeSequenceColumn("step", timestamps)], | ||
components=values.as_component_batches(), | ||
) |
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