From 668822e12f331f84344ee8e82409290a77347add Mon Sep 17 00:00:00 2001 From: Filip Jeretina <59307111+zrezke@users.noreply.github.com> Date: Mon, 17 Jun 2024 16:14:33 +0200 Subject: [PATCH] Release 0.2.2 (#65) * OAK D SR POE and some reliability improvements (#35) * WIP add support for tof (oak d sr poe) * Accommodate new sdk, make tof stream show up, more or less properly. Still need to fix a few gui bugs. * Fixed gui bugs with which sensors are "AI capable" improved a bit on resolution search stability. did py-lints * install wheel from artifactory * Update rerun_py/depthai_viewer/_backend/device.py * Update rerun_py/depthai_viewer/_backend/device.py * Use sentry.luxonis * Added in the new tof_decoding. * Py lints * Fixed rebase issues * Fixed tiny1c temperature resolution. Bumped depthai tof decoding branch. Added new filters. Don't fail when sentry init fails. Likely fix viewer crashing when there is no internet available. * fix pylints * OAK-D-LR better default, fixed point cloud coloring when using albedo texture, aligned depth from ToF on oak d sr poe to CAM_B * Lints * Added --viewer-mode flag. * release-0.2.2, added --viewer-mode flag * Changelog --- CHANGELOG.md | 3 ++ Cargo.lock | 70 ++++++++++++++++++------------------- Cargo.toml | 54 ++++++++++++++-------------- crates/re_viewer/src/app.rs | 57 ++++++++++++++++-------------- crates/rerun/src/run.rs | 6 ++++ 5 files changed, 101 insertions(+), 89 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f7a42b815fb..164180e09c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Depthai Viewer changelog +## 0.2.2 +- Added `--viewer-mode` flag. Mostly intended for internal use, when using the viewer as if it was stock rerun (doesn't install the dependencies and doesn't try to connect to a device.). main benefit over stock rerun are albedo textured depth clouds. + ## 0.2.1 - Fixed point cloud coloring for RGB albedo textures. diff --git a/Cargo.lock b/Cargo.lock index dea60f8edfb6..931a277e9cb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -174,7 +174,7 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "api_demo" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "clap 4.4.11", @@ -1390,7 +1390,7 @@ dependencies = [ [[package]] name = "depthai-viewer" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "backtrace", @@ -1495,7 +1495,7 @@ dependencies = [ [[package]] name = "dna" -version = "0.2.1" +version = "0.2.2" dependencies = [ "depthai-viewer", "itertools", @@ -3105,7 +3105,7 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal" -version = "0.2.1" +version = "0.2.2" dependencies = [ "depthai-viewer", ] @@ -3118,7 +3118,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "minimal_options" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "clap 4.4.11", @@ -3599,7 +3599,7 @@ dependencies = [ [[package]] name = "objectron" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "clap 4.4.11", @@ -4324,7 +4324,7 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "raw_mesh" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "bytes", @@ -4371,7 +4371,7 @@ dependencies = [ [[package]] name = "re_analytics" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "crossbeam", @@ -4392,7 +4392,7 @@ dependencies = [ [[package]] name = "re_arrow_store" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ahash", "anyhow", @@ -4419,7 +4419,7 @@ dependencies = [ [[package]] name = "re_build_build_info" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "time", @@ -4427,18 +4427,18 @@ dependencies = [ [[package]] name = "re_build_info" -version = "0.2.1" +version = "0.2.2" [[package]] name = "re_build_web_viewer" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cargo_metadata", ] [[package]] name = "re_data_store" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ahash", "criterion", @@ -4461,14 +4461,14 @@ dependencies = [ [[package]] name = "re_error" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", ] [[package]] name = "re_format" -version = "0.2.1" +version = "0.2.2" dependencies = [ "arrow2", "arrow2_convert", @@ -4478,7 +4478,7 @@ dependencies = [ [[package]] name = "re_int_histogram" -version = "0.2.1" +version = "0.2.2" dependencies = [ "criterion", "insta", @@ -4489,7 +4489,7 @@ dependencies = [ [[package]] name = "re_log" -version = "0.2.1" +version = "0.2.2" dependencies = [ "env_logger", "js-sys", @@ -4502,7 +4502,7 @@ dependencies = [ [[package]] name = "re_log_encoding" -version = "0.2.1" +version = "0.2.2" dependencies = [ "criterion", "ehttp", @@ -4527,7 +4527,7 @@ dependencies = [ [[package]] name = "re_log_types" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ahash", "array-init", @@ -4566,7 +4566,7 @@ dependencies = [ [[package]] name = "re_memory" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ahash", "backtrace", @@ -4586,7 +4586,7 @@ dependencies = [ [[package]] name = "re_query" -version = "0.2.1" +version = "0.2.2" dependencies = [ "arrow2", "criterion", @@ -4604,7 +4604,7 @@ dependencies = [ [[package]] name = "re_renderer" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ahash", "anyhow", @@ -4657,7 +4657,7 @@ dependencies = [ [[package]] name = "re_sdk" -version = "0.2.1" +version = "0.2.2" dependencies = [ "arrow2_convert", "document-features", @@ -4677,7 +4677,7 @@ dependencies = [ [[package]] name = "re_sdk_comms" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ahash", "anyhow", @@ -4693,7 +4693,7 @@ dependencies = [ [[package]] name = "re_smart_channel" -version = "0.2.1" +version = "0.2.2" dependencies = [ "crossbeam", "instant", @@ -4701,7 +4701,7 @@ dependencies = [ [[package]] name = "re_string_interner" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ahash", "nohash-hasher", @@ -4712,7 +4712,7 @@ dependencies = [ [[package]] name = "re_tensor_ops" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ahash", "ndarray", @@ -4722,7 +4722,7 @@ dependencies = [ [[package]] name = "re_tuid" -version = "0.2.1" +version = "0.2.2" dependencies = [ "arrow2", "arrow2_convert", @@ -4736,7 +4736,7 @@ dependencies = [ [[package]] name = "re_ui" -version = "0.2.1" +version = "0.2.2" dependencies = [ "eframe", "egui", @@ -4755,7 +4755,7 @@ dependencies = [ [[package]] name = "re_viewer" -version = "0.2.1" +version = "0.2.2" dependencies = [ "ahash", "anyhow", @@ -4830,7 +4830,7 @@ dependencies = [ [[package]] name = "re_web_viewer_server" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cargo_metadata", "ctrlc", @@ -4847,7 +4847,7 @@ dependencies = [ [[package]] name = "re_ws_comms" -version = "0.2.1" +version = "0.2.2" dependencies = [ "anyhow", "bincode", @@ -4987,7 +4987,7 @@ dependencies = [ [[package]] name = "rerun_py" -version = "0.2.1" +version = "0.2.2" dependencies = [ "arrow2", "depthai-viewer", @@ -5106,7 +5106,7 @@ dependencies = [ [[package]] name = "run_wasm" -version = "0.2.1" +version = "0.2.2" dependencies = [ "cargo-run-wasm", "pico-args", @@ -5876,7 +5876,7 @@ dependencies = [ [[package]] name = "test_image_memory" -version = "0.2.1" +version = "0.2.2" dependencies = [ "depthai-viewer", "mimalloc", diff --git a/Cargo.toml b/Cargo.toml index 526b9d20f581..9575a8d28ed3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,39 +16,39 @@ include = ["../../LICENSE-APACHE", "../../LICENSE-MIT", "**/*.rs", "Cargo.toml"] license = "MIT OR Apache-2.0" repository = "https://github.com/rerun-io/rerun" rust-version = "1.74" -version = "0.2.1" +version = "0.2.2" [workspace.dependencies] # When using alpha-release, always use exact version, e.g. `version = "=0.x.y-alpha.z" # This is because we treat alpha-releases as incompatible, but semver doesn't. # In particular: if we compile rerun 0.3.0-alpha.0 we only want it to use # re_log_types 0.3.0-alpha.0, NOT 0.3.0-alpha.4 even though it is newer and semver-compatible. -re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.2.1" } -re_analytics = { path = "crates/re_analytics", version = "0.2.1" } -re_arrow_store = { path = "crates/re_arrow_store", version = "0.2.1" } -re_build_build_info = { path = "crates/re_build_build_info", version = "0.2.1" } -re_build_info = { path = "crates/re_build_info", version = "0.2.1" } -re_build_web_viewer = { path = "crates/re_build_web_viewer", version = "0.2.1", default-features = false } -re_data_store = { path = "crates/re_data_store", version = "0.2.1" } -re_error = { path = "crates/re_error", version = "0.2.1" } -re_format = { path = "crates/re_format", version = "0.2.1" } -re_int_histogram = { path = "crates/re_int_histogram", version = "0.2.1" } -re_log = { path = "crates/re_log", version = "0.2.1" } -re_log_encoding = { path = "crates/re_log_encoding", version = "0.2.1" } -re_log_types = { path = "crates/re_log_types", version = "0.2.1" } -re_memory = { path = "crates/re_memory", version = "0.2.1" } -re_query = { path = "crates/re_query", version = "0.2.1" } -re_renderer = { path = "crates/re_renderer", version = "0.2.1", default-features = false } -re_sdk = { path = "crates/re_sdk", version = "0.2.1" } -re_smart_channel = { path = "crates/re_smart_channel", version = "0.2.1" } -re_string_interner = { path = "crates/re_string_interner", version = "0.2.1" } -re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.2.1" } -re_tuid = { path = "crates/re_tuid", version = "0.2.1" } -re_ui = { path = "crates/re_ui", version = "0.2.1" } -re_viewer = { path = "crates/re_viewer", version = "0.2.1", default-features = false } -re_web_viewer_server = { path = "crates/re_web_viewer_server", version = "0.2.1" } -re_ws_comms = { path = "crates/re_ws_comms", version = "0.2.1" } -depthai-viewer = { path = "crates/rerun", version = "0.2.1" } +re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.2.2" } +re_analytics = { path = "crates/re_analytics", version = "0.2.2" } +re_arrow_store = { path = "crates/re_arrow_store", version = "0.2.2" } +re_build_build_info = { path = "crates/re_build_build_info", version = "0.2.2" } +re_build_info = { path = "crates/re_build_info", version = "0.2.2" } +re_build_web_viewer = { path = "crates/re_build_web_viewer", version = "0.2.2", default-features = false } +re_data_store = { path = "crates/re_data_store", version = "0.2.2" } +re_error = { path = "crates/re_error", version = "0.2.2" } +re_format = { path = "crates/re_format", version = "0.2.2" } +re_int_histogram = { path = "crates/re_int_histogram", version = "0.2.2" } +re_log = { path = "crates/re_log", version = "0.2.2" } +re_log_encoding = { path = "crates/re_log_encoding", version = "0.2.2" } +re_log_types = { path = "crates/re_log_types", version = "0.2.2" } +re_memory = { path = "crates/re_memory", version = "0.2.2" } +re_query = { path = "crates/re_query", version = "0.2.2" } +re_renderer = { path = "crates/re_renderer", version = "0.2.2", default-features = false } +re_sdk = { path = "crates/re_sdk", version = "0.2.2" } +re_smart_channel = { path = "crates/re_smart_channel", version = "0.2.2" } +re_string_interner = { path = "crates/re_string_interner", version = "0.2.2" } +re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.2.2" } +re_tuid = { path = "crates/re_tuid", version = "0.2.2" } +re_ui = { path = "crates/re_ui", version = "0.2.2" } +re_viewer = { path = "crates/re_viewer", version = "0.2.2", default-features = false } +re_web_viewer_server = { path = "crates/re_web_viewer_server", version = "0.2.2" } +re_ws_comms = { path = "crates/re_ws_comms", version = "0.2.2" } +depthai-viewer = { path = "crates/rerun", version = "0.2.2" } ahash = "0.8" anyhow = "1.0" diff --git a/crates/re_viewer/src/app.rs b/crates/re_viewer/src/app.rs index 7616b577ab9e..e6c68f8cc484 100644 --- a/crates/re_viewer/src/app.rs +++ b/crates/re_viewer/src/app.rs @@ -51,6 +51,7 @@ pub struct StartupOptions { pub memory_limit: re_memory::MemoryLimit, pub persist_state: bool, pub sdk_port: u32, + pub viewer_mode: bool, } #[derive(Clone, Default)] @@ -571,37 +572,39 @@ impl eframe::App for App { } dependency_installer.update(); } - match &mut self.backend_handle { - Some((handle, port)) => match handle.try_wait() { - Ok(status) => { - match status { - Some(_) => { - let _ = handle.kill(); // It will only Err in case the process is already dead (which is what we want anyway) - self.state.depthai_state.reset(); - re_log::debug!("Backend process has exited, restarting!"); - self.backend_handle = self.spawn_backend(&self.backend_environment); - } - None => { - if !self.state.depthai_state.backend_comms.ws.is_initialized() { - self.state.depthai_state.backend_comms.ws.connect(*port); + if !self.startup_options.viewer_mode { + match &mut self.backend_handle { + Some((handle, port)) => match handle.try_wait() { + Ok(status) => { + match status { + Some(_) => { + let _ = handle.kill(); // It will only Err in case the process is already dead (which is what we want anyway) + self.state.depthai_state.reset(); + re_log::debug!("Backend process has exited, restarting!"); + self.backend_handle = self.spawn_backend(&self.backend_environment); + } + None => { + if !self.state.depthai_state.backend_comms.ws.is_initialized() { + self.state.depthai_state.backend_comms.ws.connect(*port); + } } } } + Err(_) => { + } + }, + None => { + if self.backend_environment.are_requirements_installed() { + self.backend_handle = self.spawn_backend(&self.backend_environment); + } else { + re_log::debug!( + "Backend requirements not installed, starting dependency installer!" + ); + self.install_dependencies(); + } } - Err(_) => { - } - }, - None => { - if self.backend_environment.are_requirements_installed() { - self.backend_handle = self.spawn_backend(&self.backend_environment); - } else { - re_log::debug!( - "Backend requirements not installed, starting dependency installer!" - ); - self.install_dependencies(); - } - } - }; + }; + } } if self.startup_options.memory_limit.limit.is_none() { diff --git a/crates/rerun/src/run.rs b/crates/rerun/src/run.rs index 86ec67d4d5ac..b428e27464f9 100644 --- a/crates/rerun/src/run.rs +++ b/crates/rerun/src/run.rs @@ -121,6 +121,11 @@ struct Args { #[cfg(feature = "web_viewer")] #[clap(long, default_value_t = Default::default())] ws_server_port: RerunServerPort, + + /// Start the viewer in viewer mode. (No demo will try to run. This is close to being stock rerun.) + #[cfg(feature = "native_viewer")] + #[clap(long, default_value_t = Default::default())] + viewer_mode: bool, } #[derive(Debug, Clone, Subcommand)] @@ -297,6 +302,7 @@ async fn run_impl( #[cfg(feature = "native_viewer")] let startup_options = re_viewer::StartupOptions { persist_state: args.persist_state, + viewer_mode: args.viewer_mode, ..Default::default() };