Skip to content

Commit 148b343

Browse files
committed
Merge branch 'main' into grtlr/hybrid-latest-at-tagged
2 parents 90de052 + 7348f3e commit 148b343

File tree

190 files changed

+2541
-629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+2541
-629
lines changed

.typos.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
extend-exclude = [
77
".typos.toml",
88
"*.snap",
9-
"crates/viewer/re_ui/data/design_tokens.json",
109
"crates/viewer/re_ui/src/design_tokens.rs",
1110
"examples/assets",
11+
"rerun_cpp/src/rerun/archetypes/image.hpp", # TODO(emilk): remove once we remove from_greyscale8
12+
"rerun_cpp/src/rerun/archetypes/image_ext.cpp", # TODO(emilk): remove once we remove from_greyscale8
1213
"rerun_cpp/src/rerun/third_party/cxxopts.hpp",
1314
]
1415

@@ -74,6 +75,8 @@ flavour = "flavor"
7475
fulfil = "fufill"
7576
gaol = "jail"
7677
grey = "gray"
78+
greys = "grays"
79+
greyscale = "grayscale"
7780
harbour = "habor"
7881
honour = "honor"
7982
humour = "humor"

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@ _All four tetrahedron meshes on this screen share the same vertices and are inst
12591259
- Add an explicit "mode" view property to the dataframe view [#6927](https://github.com/rerun-io/rerun/pull/6927)
12601260
- Introduce a "Selectable Toggle" widget and use it for the 3D view's camera kind [#7064](https://github.com/rerun-io/rerun/pull/7064)
12611261
- Improve entity stats when hovered [#7074](https://github.com/rerun-io/rerun/pull/7074)
1262-
- Update the UI colors to use our (blueish) ramp instead of pure greys [#7075](https://github.com/rerun-io/rerun/pull/7075)
1262+
- Update the UI colors to use our (blueish) ramp instead of pure grays [#7075](https://github.com/rerun-io/rerun/pull/7075)
12631263
- Query editor for the dataframe view [#7071](https://github.com/rerun-io/rerun/pull/7071)
12641264
- Better ui for `Blob`s, especially those representing images [#7128](https://github.com/rerun-io/rerun/pull/7128)
12651265
- Add button for copying and saving images [#7156](https://github.com/rerun-io/rerun/pull/7156)

Cargo.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8123,15 +8123,13 @@ dependencies = [
81238123
"once_cell",
81248124
"parking_lot",
81258125
"pollster 0.4.0",
8126-
"re_build_info",
81278126
"re_capabilities",
81288127
"re_chunk",
81298128
"re_chunk_store",
81308129
"re_data_source",
81318130
"re_entity_db",
81328131
"re_format",
81338132
"re_log",
8134-
"re_log_encoding",
81358133
"re_log_types",
81368134
"re_math",
81378135
"re_query",

Cargo.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,83 @@ opt-level = 1 # Make debug builds run faster
378378
# Use the `debugging` profile (see below) if you need debug symbols.
379379
debug = false
380380

381+
382+
# Use the following command to grab the list of workspace crates:
383+
# cargo metadata --no-deps --format-version 1 | jq '.packages[].name' | rg '"re_'
384+
#
385+
# There is, as far we know, no way to do this without enumerating all crates manually.
386+
387+
[profile.dev.package]
388+
"re_analytics".debug = true
389+
"re_arrow_util".debug = true
390+
"re_auth".debug = true
391+
"re_blueprint_tree".debug = true
392+
"re_build_info".debug = true
393+
"re_build_tools".debug = true
394+
"re_byte_size".debug = true
395+
"re_capabilities".debug = true
396+
"re_case".debug = true
397+
"re_chunk".debug = true
398+
"re_chunk_store".debug = true
399+
"re_chunk_store_ui".debug = true
400+
"re_component_ui".debug = true
401+
"re_context_menu".debug = true
402+
"re_crash_handler".debug = true
403+
"re_data_loader".debug = true
404+
"re_data_source".debug = true
405+
"re_data_ui".debug = true
406+
"re_dataframe".debug = true
407+
"re_dataframe_ui".debug = true
408+
"re_datafusion".debug = true
409+
"re_dev_tools".debug = true
410+
"re_entity_db".debug = true
411+
"re_error".debug = true
412+
"re_format".debug = true
413+
"re_format_arrow".debug = true
414+
"re_grpc_client".debug = true
415+
"re_grpc_server".debug = true
416+
"re_int_histogram".debug = true
417+
"re_log".debug = true
418+
"re_log_encoding".debug = true
419+
"re_log_types".debug = true
420+
"re_memory".debug = true
421+
"re_protos".debug = true
422+
"re_protos_builder".debug = true
423+
"re_query".debug = true
424+
"re_redap_browser".debug = true
425+
"re_renderer".debug = true
426+
"re_renderer_examples".debug = true
427+
"re_sdk".debug = true
428+
"re_selection_panel".debug = true
429+
"re_smart_channel".debug = true
430+
"re_sorbet".debug = true
431+
"re_string_interner".debug = true
432+
"re_time_panel".debug = true
433+
"re_tracing".debug = true
434+
"re_tuid".debug = true
435+
"re_types".debug = true
436+
"re_types_builder".debug = true
437+
"re_types_core".debug = true
438+
"re_ui".debug = true
439+
"re_uri".debug = true
440+
"re_video".debug = true
441+
"re_view".debug = true
442+
"re_view_bar_chart".debug = true
443+
"re_view_dataframe".debug = true
444+
"re_view_graph".debug = true
445+
"re_view_map".debug = true
446+
"re_view_spatial".debug = true
447+
"re_view_tensor".debug = true
448+
"re_view_text_document".debug = true
449+
"re_view_text_log".debug = true
450+
"re_view_time_series".debug = true
451+
"re_viewer".debug = true
452+
"re_viewer_context".debug = true
453+
"re_viewport".debug = true
454+
"re_viewport_blueprint".debug = true
455+
"re_web_viewer_server".debug = true
456+
457+
381458
# panic = "abort" leads to better optimizations and smaller binaries (and is the default in Wasm anyways),
382459
# but it also means backtraces don't work with the `backtrace` library (https://github.com/rust-lang/backtrace-rs/issues/397).
383460
# egui has a feature where if you hold down all modifiers keys on your keyboard and hover any UI widget,

crates/store/re_data_loader/src/loader_lerobot.rs

Lines changed: 52 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
1-
use std::sync::Arc;
2-
use std::sync::mpsc::Sender;
3-
use std::thread;
1+
use std::{
2+
sync::{Arc, mpsc::Sender},
3+
thread,
4+
};
45

56
use anyhow::{Context as _, anyhow};
6-
use arrow::array::{
7-
ArrayRef, BinaryArray, FixedSizeListArray, Int64Array, RecordBatch, StringArray, StructArray,
7+
use arrow::{
8+
array::{
9+
ArrayRef, BinaryArray, FixedSizeListArray, Int64Array, RecordBatch, StringArray,
10+
StructArray,
11+
},
12+
compute::cast,
13+
datatypes::{DataType, Field},
814
};
9-
use arrow::compute::cast;
10-
use arrow::datatypes::{DataType, Field};
1115
use itertools::Either;
16+
1217
use re_arrow_util::ArrowArrayDowncastRef as _;
1318
use re_chunk::{
1419
ArrowArray, Chunk, ChunkId, EntityPath, RowId, TimeColumn, TimeInt, TimePoint, Timeline,
20+
TimelineName, external::nohash_hasher::IntMap,
1521
};
16-
use re_chunk::{TimelineName, external::nohash_hasher::IntMap};
17-
1822
use re_log_types::{ApplicationId, StoreId};
19-
use re_types::archetypes::{
20-
AssetVideo, DepthImage, EncodedImage, TextDocument, VideoFrameReference,
23+
use re_types::{
24+
Archetype, Component, ComponentBatch,
25+
archetypes::{
26+
AssetVideo, DepthImage, EncodedImage, Scalars, TextDocument, VideoFrameReference,
27+
},
28+
components::{Name, VideoTimestamp},
2129
};
22-
use re_types::components::{Name, Scalar, VideoTimestamp};
23-
use re_types::{Archetype, Component, ComponentBatch};
2430

2531
use crate::lerobot::{
2632
DType, EpisodeIndex, Feature, LeRobotDataset, TaskIndex, is_lerobot_dataset,
@@ -503,7 +509,23 @@ fn load_scalar(
503509
make_scalar_batch_entity_chunks(entity_path, feature, timelines, fixed_size_array)?;
504510
Ok(ScalarChunkIterator::Batch(Box::new(batch_chunks)))
505511
}
506-
DataType::Float32 => {
512+
DataType::List(_field) => {
513+
let list_array = data
514+
.column_by_name(feature_key)
515+
.and_then(|col| col.downcast_array_ref::<arrow::array::ListArray>())
516+
.ok_or_else(|| {
517+
DataLoaderError::Other(anyhow!("Failed to downcast feature to ListArray"))
518+
})?;
519+
520+
let sliced = extract_list_array_elements_as_f64(list_array).with_context(|| {
521+
format!("Failed to cast scalar feature {entity_path} to Float64")
522+
})?;
523+
524+
Ok(ScalarChunkIterator::Single(std::iter::once(
525+
make_scalar_entity_chunk(entity_path, timelines, &sliced)?,
526+
)))
527+
}
528+
DataType::Float32 | DataType::Float64 => {
507529
let feature_data = data.column_by_name(feature_key).ok_or_else(|| {
508530
DataLoaderError::Other(anyhow!(
509531
"Failed to get LeRobot dataset column data for: {:?}",
@@ -540,7 +562,7 @@ fn make_scalar_batch_entity_chunks(
540562

541563
let mut chunks = Vec::with_capacity(num_elements);
542564

543-
let sliced = extract_list_elements_as_f64(data)
565+
let sliced = extract_fixed_size_list_array_elements_as_f64(data)
544566
.with_context(|| format!("Failed to cast scalar feature {entity_path} to Float64"))?;
545567

546568
chunks.push(make_scalar_entity_chunk(
@@ -592,11 +614,7 @@ fn make_scalar_entity_chunk(
592614
ChunkId::new(),
593615
entity_path,
594616
timelines.clone(),
595-
std::iter::once((
596-
<Scalar as Component>::descriptor().clone(),
597-
data_field_array,
598-
))
599-
.collect(),
617+
std::iter::once((Scalars::descriptor_scalars().clone(), data_field_array)).collect(),
600618
)?)
601619
}
602620

@@ -610,7 +628,20 @@ fn extract_scalar_slices_as_f64(data: &ArrayRef) -> anyhow::Result<Vec<ArrayRef>
610628
.collect::<Vec<_>>())
611629
}
612630

613-
fn extract_list_elements_as_f64(data: &FixedSizeListArray) -> anyhow::Result<Vec<ArrayRef>> {
631+
fn extract_fixed_size_list_array_elements_as_f64(
632+
data: &FixedSizeListArray,
633+
) -> anyhow::Result<Vec<ArrayRef>> {
634+
(0..data.len())
635+
.map(|idx| {
636+
cast(&data.value(idx), &DataType::Float64)
637+
.with_context(|| format!("Failed to cast {:?} to Float64", data.data_type()))
638+
})
639+
.collect::<Result<Vec<_>, _>>()
640+
}
641+
642+
fn extract_list_array_elements_as_f64(
643+
data: &arrow::array::ListArray,
644+
) -> anyhow::Result<Vec<ArrayRef>> {
614645
(0..data.len())
615646
.map(|idx| {
616647
cast(&data.value(idx), &DataType::Float64)

crates/store/re_entity_db/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
pub mod entity_db;
88
pub mod entity_tree;
99
mod instance_path;
10+
mod store_bundle;
1011
mod time_histogram_per_timeline;
1112
mod times_per_timeline;
1213
mod versioned_instance_path;
@@ -15,6 +16,7 @@ pub use self::{
1516
entity_db::{DEFAULT_GC_TIME_BUDGET, EntityDb},
1617
entity_tree::EntityTree,
1718
instance_path::{InstancePath, InstancePathHash},
19+
store_bundle::{StoreBundle, StoreLoadError},
1820
time_histogram_per_timeline::{TimeHistogram, TimeHistogramPerTimeline},
1921
times_per_timeline::{TimeCounts, TimesPerTimeline},
2022
versioned_instance_path::{VersionedInstancePath, VersionedInstancePathHash},

crates/viewer/re_viewer_context/src/store_bundle.rs renamed to crates/store/re_entity_db/src/store_bundle.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
use itertools::Itertools as _;
22

3-
use re_entity_db::EntityDb;
43
use re_log_types::{StoreId, StoreKind};
54

5+
use crate::EntityDb;
6+
67
#[derive(thiserror::Error, Debug)]
78
pub enum StoreLoadError {
89
#[error(transparent)]
910
Decode(#[from] re_log_encoding::decoder::DecodeError),
1011

1112
#[error(transparent)]
12-
ChunkStore(#[from] re_entity_db::Error),
13+
ChunkStore(#[from] crate::Error),
1314
}
1415

1516
/// Stores many [`EntityDb`]s of recordings and blueprints.

crates/utils/re_log/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,15 @@ const CRATES_AT_WARN_LEVEL: &[&str] = &[
7171
];
7272

7373
/// Never log anything less serious than a `INFO` from these crates.
74+
///
75+
/// These creates are quite spammy on debug, drowning out what we care about:
7476
const CRATES_AT_INFO_LEVEL: &[&str] = &[
75-
// These are quite spammy on debug, drowning out what we care about:
77+
"datafusion_optimizer",
78+
"datafusion",
7679
"h2",
7780
"hyper",
7881
"prost_build",
82+
"sqlparser",
7983
"tower",
8084
"ureq",
8185
// only let rustls log in debug mode: https://github.com/rerun-io/rerun/issues/3104

crates/utils/re_video/src/decode/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! * is either 8 or 16
1515
//! * that's how the decoder stores for us but the per component we have either 8 or 10 or 12 bits -> see `picture.bits_per_component()`
1616
//! * `picture.pixel_layout()`
17-
//! * `4:0:0` greyscale
17+
//! * `4:0:0` grayscale
1818
//! * `4:2:0` half horizontal and half vertical resolution for chroma
1919
//! * `4:2:2` half horizontal resolution for chroma
2020
//! * `4:4:4` full resolution for chroma

crates/viewer/re_blueprint_tree/src/blueprint_tree.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,10 +1140,7 @@ fn add_new_view_or_container_menu_button(
11401140
ui: &mut egui::Ui,
11411141
) {
11421142
if ui
1143-
.add(egui::Button::image_and_text(
1144-
&re_ui::icons::ADD,
1145-
"Add view or container…",
1146-
))
1143+
.add(re_ui::icons::ADD.as_button_with_label(ui.design_tokens(), "Add view or container…"))
11471144
.clicked()
11481145
{
11491146
ui.close();
@@ -1188,7 +1185,8 @@ fn set_blueprint_to_default_menu_buttons(ctx: &ViewerContext<'_>, ui: &mut egui:
11881185
let mut response = ui
11891186
.add_enabled(
11901187
enabled,
1191-
egui::Button::image_and_text(&re_ui::icons::RESET, "Reset to default blueprint"),
1188+
re_ui::icons::RESET
1189+
.as_button_with_label(ui.design_tokens(), "Reset to default blueprint"),
11921190
)
11931191
.on_hover_text("Reset to the default blueprint for this app");
11941192

@@ -1214,7 +1212,8 @@ fn set_blueprint_to_auto_menu_button(ctx: &ViewerContext<'_>, ui: &mut egui::Ui)
12141212
if ui
12151213
.add_enabled(
12161214
enabled,
1217-
egui::Button::image_and_text(&re_ui::icons::RESET, "Reset to heuristic blueprint"),
1215+
re_ui::icons::RESET
1216+
.as_button_with_label(ui.design_tokens(), "Reset to heuristic blueprint"),
12181217
)
12191218
.on_hover_text("Re-populate viewport with automatically chosen views")
12201219
.clicked()
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)