From 59e189d4a546d7fc29f49dbe26d09f8304df7f4e Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Wed, 19 Apr 2023 17:09:41 +0200 Subject: [PATCH 01/19] changelog --- CHANGELOG.md | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 161 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a7093067a19..57865fcbe0e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,172 @@ ## [Unreleased](https://github.com/rerun-io/rerun/compare/latest...HEAD) … +## [0.5.0](https://github.com/rerun-io/rerun/compare/v0.4.0...v0.5.0) - Jupyter MVP, GPU-based picking & colormapping, new datastore! + +### Overview & Highlights + +This new release adds MVP support for embedding Rerun in Jupyter notebooks, and brings significant performance improvements across all layers of the stack. + +* Rerun can now be embedded in Jupyter notebooks + * Tested with Jupyter Notebook Classic, Jupyter Lab, VSCode & Google Colab; checkout our [How-to guide](https://www.rerun.io/docs/howto/notebook) + * Try it out live on [Google Colab](https://colab.research.google.com/drive/1R9I7s4o6wydQC_zkybqaSRFTtlEaked_?usp=sharing) +* All colormapping tasks are now done directly on the GPU + * This yields _very significant_ performance improvements for colormapping heavy workload (e.g. segmentation) + * Try it out in our new [`segment_anything` example](https://www.rerun.io/docs/getting-started/examples#segment-anything) that shows off the latest models from Meta AI +* GPU picking & hovering now works with all of our primitives, including meshes & depth clouds + * This fixes all the shortcomings of the previous CPU-based system + * Rerun's automatic backprojection of depth textures ("depth clouds") is now feature complete + * Try it out in our updated [`nyud` example](https://www.rerun.io/docs/getting-started/examples#nyud) +* Our datastore has been completely revamped to more closely match our latest data model + * This yields _very significant_ performance improvements for workloads with many events + * Checkout [this post](https://github.com/rerun-io/rerun/issues/1619#issuecomment-1511046649) for a detailed walkthrough of the changes + +### In Detail + +#### 🐍 Python SDK +- Document that we also accept colors in 0-1 floats [#1740](https://github.com/rerun-io/rerun/pull/1740) +- Don't initialize an SDK session if we are only going to be launching the app [#1768](https://github.com/rerun-io/rerun/pull/1768) +- Allow torch tensors for `log_rigid3` [#1769](https://github.com/rerun-io/rerun/pull/1769) +- Always send `recording_id` as part of `LogMsg` [#1778](https://github.com/rerun-io/rerun/pull/1778) +- New `reset_time` API [#1826](https://github.com/rerun-io/rerun/pull/1826) [#1854](https://github.com/rerun-io/rerun/pull/1854) +- Always flush when we remove a sink [#1830](https://github.com/rerun-io/rerun/pull/1830) + +#### πŸͺ³ Bug Fixes +- Fix broken outlines (hover/select effect) for lines [#1724](https://github.com/rerun-io/rerun/pull/1724) +- Fix logged obb being displayed with half of the requested size [#1749](https://github.com/rerun-io/rerun/pull/1749) (thanks [@BenjaminDev](https://github.com/BenjaminDev)!) +- Fix `log_obb` usage [#1761](https://github.com/rerun-io/rerun/pull/1761) +- Always create the `log_time` timeline [#1763](https://github.com/rerun-io/rerun/pull/1763) +- Fix undo/redo selection shortcut/action changing selection history without changing selection [#1765](https://github.com/rerun-io/rerun/pull/1765) +- Fix various crashes [#1780](https://github.com/rerun-io/rerun/pull/1780) +- Fix crash when trying to do picking on depth clouds [d94ca3dd35e73e1984ccb969d0c7abd0d3e0faa9](https://github.com/rerun-io/rerun/commit/d94ca3dd35e73e1984ccb969d0c7abd0d3e0faa9) +- ci: fix benchmarks [#1799](https://github.com/rerun-io/rerun/pull/1799) +- ci: fix `cargo deny` [#1806](https://github.com/rerun-io/rerun/pull/1806) +- Fix "too many points" crash [#1822](https://github.com/rerun-io/rerun/pull/1822) +- Allow re-use of `RowId`s if no conflict is possible [#1832](https://github.com/rerun-io/rerun/pull/1832) +- Reduce memory used by staging belts on Web [#1836](https://github.com/rerun-io/rerun/pull/1836) +- Test and handle all tensor dtypes as images [#1840](https://github.com/rerun-io/rerun/pull/1840) +- Fix the python build when running without `web_viewer` enabled [#1856](https://github.com/rerun-io/rerun/pull/1856) +- Error instead of `expect` inside `msg_encode` [#1857](https://github.com/rerun-io/rerun/pull/1857) +- Fix shutdown race condition in `re_sdk_comms` client [#1861](https://github.com/rerun-io/rerun/pull/1861) +- Fix broken instance picking in presence of images [#1876](https://github.com/rerun-io/rerun/pull/1876) +- Make sure JPEGs are always decoded [#1884](https://github.com/rerun-io/rerun/pull/1884) +- Fix crash when saving store to file [#1909](https://github.com/rerun-io/rerun/pull/1909) +- Don't clean up `LogDb`s that only contain a `BeginRecordingMsg` [#1914](https://github.com/rerun-io/rerun/pull/1914) +- Fix picking entities with image + another object (or label) twice [#1908](https://github.com/rerun-io/rerun/pull/1908) +- Fix double clicking camera no longer focusing on said camera [#1911](https://github.com/rerun-io/rerun/pull/1911) + +#### πŸš€ Performance Improvements +- batching 4: retire `MsgBundle` + batching support in transport layer [#1679](https://github.com/rerun-io/rerun/pull/1679) +- Optimize the depth-cloud shader when `depth=0` [#1729](https://github.com/rerun-io/rerun/pull/1729) +- `arrow2_convert` primitive (de)serialization benchmarks [#1742](https://github.com/rerun-io/rerun/pull/1742) +- `arrow2` `estimated_bytes_size` benchmarks [#1743](https://github.com/rerun-io/rerun/pull/1743) +- `arrow2` erased refcounted clones benchmarks [#1745](https://github.com/rerun-io/rerun/pull/1745) +- benchmarks for common vector ops across `smallvec`/`tinyvec`/std [#1747](https://github.com/rerun-io/rerun/pull/1747) +- Columnar `TimePoint`s in data tables and during transport [#1767](https://github.com/rerun-io/rerun/pull/1767) +- Compile with `panic = "abort"` [#1813](https://github.com/rerun-io/rerun/pull/1813) +- Process 2D points per entities like 3D points [#1820](https://github.com/rerun-io/rerun/pull/1820) +- re_query: use latest data types (`DataRow`/`DataCell`) [#1828](https://github.com/rerun-io/rerun/pull/1828) +- Depth cloud textures are now cached frame-to-frame [#1913](https://github.com/rerun-io/rerun/pull/1913) + +#### πŸ§‘β€πŸ« Examples +- Add new `ARKitScenes` example [#1538](https://github.com/rerun-io/rerun/pull/1538) (thanks [@pablovela5620](https://github.com/pablovela5620)!) +- New example code for Facebook research's `segment-anything` [#1788](https://github.com/rerun-io/rerun/pull/1788) +- Add `minimal_options` example for Rust SDK [#1773](https://github.com/rerun-io/rerun/pull/1773) (thanks [@h3mosphere](https://github.com/h3mosphere)!) +- Remove manual depth projection from `car` and `nyud` examples [#1869](https://github.com/rerun-io/rerun/pull/1869) +- Always spawn instead of fork in multiprocessing example [#1922](https://github.com/rerun-io/rerun/pull/1922) +- Add `--num-frames` arg to canny (webcam) example [#1923](https://github.com/rerun-io/rerun/pull/1923) + +#### πŸ“š Docs +- Add `typing_extensions` to `requirements-doc.txt` [#1786](https://github.com/rerun-io/rerun/pull/1786) +- Fix typos in notebook readme [#1852](https://github.com/rerun-io/rerun/pull/1852) +- Update docs related to notebook [#1915](https://github.com/rerun-io/rerun/pull/1915) + +#### πŸ–Ό UI Improvements +- Hover rays for tracked 3D cameras [#1751](https://github.com/rerun-io/rerun/pull/1751) +- Collapse space-view by default if there is only one child [#1762](https://github.com/rerun-io/rerun/pull/1762) +- Option to show scene bounding box [#1770](https://github.com/rerun-io/rerun/pull/1770) +- Assign default colors to class-ids when annotation context is missing [#1783](https://github.com/rerun-io/rerun/pull/1783) +- Add Restart command and keyboard shortcut for moving time to start of timeline [#1802](https://github.com/rerun-io/rerun/pull/1802) (thanks [@h3mosphere](https://github.com/h3mosphere)!) +- New option to disable persistant storage [#1825](https://github.com/rerun-io/rerun/pull/1825) +- Show previews of colormaps when selecting them [#1846](https://github.com/rerun-io/rerun/pull/1846) +- Smooth out scroll wheel input for camera zooming [#1920](https://github.com/rerun-io/rerun/pull/1920) + +#### πŸ€·β€β™‚οΈ Other Viewer Improvements +- Change `EntityPathHash` to be 64 bit [#1723](https://github.com/rerun-io/rerun/pull/1723) +- Central `GpuReadback` handling for re_viewer, experimental space view screenshots [#1717](https://github.com/rerun-io/rerun/pull/1717) +- Readback depth from GPU picking [#1752](https://github.com/rerun-io/rerun/pull/1752) +- Use GPU picking for points, streamline/share picking code some more [#1814](https://github.com/rerun-io/rerun/pull/1814) +- Use GPU picking for line(like) primitives, fix `interactive` flags [#1829](https://github.com/rerun-io/rerun/pull/1829) +- Use GPU colormapping when showing images in the GUI [#1865](https://github.com/rerun-io/rerun/pull/1865) + +#### πŸ•ΈοΈ Web +- Make CI publish `latest` tagged web-viewer to `app.rerun.io` [#1725](https://github.com/rerun-io/rerun/pull/1725) +- Implement `re_tuid::Tuid::random()` on web [#1796](https://github.com/rerun-io/rerun/pull/1796) +- Refactor the relationship between the assorted web / websocket servers [#1844](https://github.com/rerun-io/rerun/pull/1844) +- Notebooks: make `presentation_id` consistent and use data-attribute for rrd [#1881](https://github.com/rerun-io/rerun/pull/1881) + +#### 🎨 Renderer Improvements +- GPU based picking with points [#1721](https://github.com/rerun-io/rerun/pull/1721) +- improved renderer label handling [#1731](https://github.com/rerun-io/rerun/pull/1731) +- Improved readback data handling [#1734](https://github.com/rerun-io/rerun/pull/1734) +- GPU based mesh picking [#1737](https://github.com/rerun-io/rerun/pull/1737) +- Improve dealing with raw buffers for texture read/write [#1744](https://github.com/rerun-io/rerun/pull/1744) +- GPU colormapping, first step [#1835](https://github.com/rerun-io/rerun/pull/1835) +- GPU tensor colormapping [#1841](https://github.com/rerun-io/rerun/pull/1841) +- GPU picking for depth clouds [#1849](https://github.com/rerun-io/rerun/pull/1849) +- Implement billinear filtering of textures [#1850](https://github.com/rerun-io/rerun/pull/1850) [#1859](https://github.com/rerun-io/rerun/pull/1859) [#1860](https://github.com/rerun-io/rerun/pull/1860) +- Refactor: remove `GpuTexture2DHandle::invalid` [#1866](https://github.com/rerun-io/rerun/pull/1866) +- Fix filtering artifact for non-color images [#1886](https://github.com/rerun-io/rerun/pull/1886) +- Refactor: Add helper functions to `GpuTexture2DHandle` [#1900](https://github.com/rerun-io/rerun/pull/1900) + +#### πŸ›’ Datastore Improvements +- Datastore: revamp bench suite [#1733](https://github.com/rerun-io/rerun/pull/1733) +- Datastore revamp 1: new indexing model & core datastructures [#1727](https://github.com/rerun-io/rerun/pull/1727) +- Datastore revamp 2: serialization & formatting [#1735](https://github.com/rerun-io/rerun/pull/1735) +- Datastore revamp 3: efficient incremental stats [#1739](https://github.com/rerun-io/rerun/pull/1739) +- Datastore revamp 4: sunset `MsgId` [#1785](https://github.com/rerun-io/rerun/pull/1785) +- Datastore revamp 5: `DataStore::to_data_tables()` [#1791](https://github.com/rerun-io/rerun/pull/1791) +- Datastore revamp 6: sunset `LogMsg` storage + save store to disk [#1795](https://github.com/rerun-io/rerun/pull/1795) +- Datastore revamp 7: garbage collection [#1801](https://github.com/rerun-io/rerun/pull/1801) +- Incremental metadata registry stats [#1833](https://github.com/rerun-io/rerun/pull/1833) + +#### ✨ Other Enhancement +- Don't run 3rd party bench suites on CI [#1787](https://github.com/rerun-io/rerun/pull/1787) + +#### πŸ—£ Merged RFCs +- RFC: datastore state of the union & end-to-end batching [#1610](https://github.com/rerun-io/rerun/pull/1610) + +#### πŸ§‘β€πŸ’» Dev-experience +- Post-release cleanup [#1726](https://github.com/rerun-io/rerun/pull/1726) +- Remove unnecessary dependencies [#1711](https://github.com/rerun-io/rerun/pull/1711) (thanks [@vsuryamurthy](https://github.com/vsuryamurthy)!) +- Use copilot markers in PR template [#1784](https://github.com/rerun-io/rerun/pull/1784) +- re_format: barebone support for custom formatting [#1776](https://github.com/rerun-io/rerun/pull/1776) +- Refactor: Add new helper crate `re_log_encoding` [#1772](https://github.com/rerun-io/rerun/pull/1772) +- `setup_web.sh` supports pacman package manager [#1797](https://github.com/rerun-io/rerun/pull/1797) (thanks [@urholaukkarinen](https://github.com/urholaukkarinen)!) +- Add `rerun --strict`: crash if any warning or error is logged [#1812](https://github.com/rerun-io/rerun/pull/1812) +- End-to-end testing of python logging -> store ingestion [#1817](https://github.com/rerun-io/rerun/pull/1817) +- Fix e2e test on CI: Don't try to re-build `rerun-sdk` [#1821](https://github.com/rerun-io/rerun/pull/1821) +- Install the rerun-sdk in CI using `--no-index` and split out linux wheel build to run first [#1838](https://github.com/rerun-io/rerun/pull/1838) +- Remove more unused dependencies [#1863](https://github.com/rerun-io/rerun/pull/1863) +- Improve end-to-end testing slightly [#1862](https://github.com/rerun-io/rerun/pull/1862) +- Turn off benchmarks comment in each PR [#1872](https://github.com/rerun-io/rerun/pull/1872) +- Fix double-negation in `scripts/run_python_e2e_test.py` [#1896](https://github.com/rerun-io/rerun/pull/1896) +- Improve PR template with better comment, and no copilot by default [#1901](https://github.com/rerun-io/rerun/pull/1901) +- Optimize `generate_changelog.py` [#1912](https://github.com/rerun-io/rerun/pull/1912) + +#### πŸ€·β€β™‚οΈ Other +- Fix videos for GitHub in `CHANGELOG.md` [af7d3b192157f942e35f64d3561a9a8dbcc18bfa](https://github.com/rerun-io/rerun/commit/af7d3b192157f942e35f64d3561a9a8dbcc18bfa) +- Remove `TensorTrait` [#1819](https://github.com/rerun-io/rerun/pull/1819) +- Disable wheel tests for `x86_64-apple-darwin` [#1853](https://github.com/rerun-io/rerun/pull/1853) +- Update `enumflags2` to non-yanked version [#1874](https://github.com/rerun-io/rerun/pull/1874) + + ## [0.4.0](https://github.com/rerun-io/rerun/compare/v0.3.1...v0.4.0) - Outlines, web viewer and performance improvements https://user-images.githubusercontent.com/1220815/228241887-03b311e2-80e9-4541-9281-6d334a15ab04.mp4 -## Overview & Highlights +### Overview & Highlights * Add support for mesh vertex colors [#1671](https://github.com/rerun-io/rerun/pull/1671) * Lower memory use [#1535](https://github.com/rerun-io/rerun/pull/1535) * Improve garbage collection [#1560](https://github.com/rerun-io/rerun/pull/1560) From 59c174f8e20d6db9153b636268d33f3bf6c42781 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Wed, 19 Apr 2023 17:11:14 +0200 Subject: [PATCH 02/19] 0.5.0-alpha.0 --- Cargo.lock | 70 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 54 ++++++++++++++++++++--------------------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 60f09380c940..c6800487fafc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,7 @@ checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" [[package]] name = "api_demo" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "anyhow", "clap 4.1.4", @@ -1278,7 +1278,7 @@ dependencies = [ [[package]] name = "dna" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "itertools", "rand", @@ -2708,7 +2708,7 @@ dependencies = [ [[package]] name = "minimal" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "rerun", ] @@ -2721,7 +2721,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "minimal_options" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "anyhow", "clap 4.1.4", @@ -3134,7 +3134,7 @@ dependencies = [ [[package]] name = "objectron" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "anyhow", "clap 4.1.4", @@ -3730,7 +3730,7 @@ dependencies = [ [[package]] name = "raw_mesh" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "anyhow", "bytes", @@ -3770,7 +3770,7 @@ dependencies = [ [[package]] name = "re_analytics" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "anyhow", "crossbeam", @@ -3791,7 +3791,7 @@ dependencies = [ [[package]] name = "re_arrow_store" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "ahash 0.8.2", "anyhow", @@ -3818,7 +3818,7 @@ dependencies = [ [[package]] name = "re_build_build_info" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "anyhow", "time 0.3.20", @@ -3826,18 +3826,18 @@ dependencies = [ [[package]] name = "re_build_info" -version = "0.4.0" +version = "0.5.0-alpha.0" [[package]] name = "re_build_web_viewer" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "cargo_metadata", ] [[package]] name = "re_data_store" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "ahash 0.8.2", "criterion", @@ -3860,14 +3860,14 @@ dependencies = [ [[package]] name = "re_error" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "anyhow", ] [[package]] name = "re_format" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "arrow2", "arrow2_convert", @@ -3877,7 +3877,7 @@ dependencies = [ [[package]] name = "re_int_histogram" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "criterion", "insta", @@ -3888,7 +3888,7 @@ dependencies = [ [[package]] name = "re_log" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "env_logger", "js-sys", @@ -3901,7 +3901,7 @@ dependencies = [ [[package]] name = "re_log_encoding" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "criterion", "ehttp", @@ -3926,7 +3926,7 @@ dependencies = [ [[package]] name = "re_log_types" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "ahash 0.8.2", "array-init", @@ -3964,7 +3964,7 @@ dependencies = [ [[package]] name = "re_memory" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "ahash 0.8.2", "backtrace", @@ -3984,7 +3984,7 @@ dependencies = [ [[package]] name = "re_query" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "arrow2", "criterion", @@ -4002,7 +4002,7 @@ dependencies = [ [[package]] name = "re_renderer" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4055,7 +4055,7 @@ dependencies = [ [[package]] name = "re_sdk" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "arrow2_convert", "document-features", @@ -4075,7 +4075,7 @@ dependencies = [ [[package]] name = "re_sdk_comms" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4091,7 +4091,7 @@ dependencies = [ [[package]] name = "re_smart_channel" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "crossbeam", "instant", @@ -4099,7 +4099,7 @@ dependencies = [ [[package]] name = "re_string_interner" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "ahash 0.8.2", "nohash-hasher", @@ -4110,7 +4110,7 @@ dependencies = [ [[package]] name = "re_tensor_ops" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "ahash 0.8.2", "ndarray", @@ -4120,7 +4120,7 @@ dependencies = [ [[package]] name = "re_tuid" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "arrow2", "arrow2_convert", @@ -4134,7 +4134,7 @@ dependencies = [ [[package]] name = "re_ui" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "eframe", "egui", @@ -4152,7 +4152,7 @@ dependencies = [ [[package]] name = "re_viewer" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4212,7 +4212,7 @@ dependencies = [ [[package]] name = "re_web_viewer_server" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "cargo_metadata", "ctrlc", @@ -4229,7 +4229,7 @@ dependencies = [ [[package]] name = "re_ws_comms" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "anyhow", "bincode", @@ -4301,7 +4301,7 @@ checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" [[package]] name = "rerun" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "anyhow", "backtrace", @@ -4333,7 +4333,7 @@ dependencies = [ [[package]] name = "rerun_py" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "arrow2", "document-features", @@ -4437,7 +4437,7 @@ dependencies = [ [[package]] name = "run_wasm" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "cargo-run-wasm", "pico-args", @@ -4991,7 +4991,7 @@ dependencies = [ [[package]] name = "test_image_memory" -version = "0.4.0" +version = "0.5.0-alpha.0" dependencies = [ "mimalloc", "re_format", diff --git a/Cargo.toml b/Cargo.toml index ca517c5fe998..983336ab949a 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.67" -version = "0.4.0" +version = "0.5.0-alpha.0" [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_analytics = { path = "crates/re_analytics", version = "0.4.0" } -re_arrow_store = { path = "crates/re_arrow_store", version = "0.4.0" } -re_build_build_info = { path = "crates/re_build_build_info", version = "0.4.0" } -re_build_info = { path = "crates/re_build_info", version = "0.4.0" } -re_build_web_viewer = { path = "crates/re_build_web_viewer", version = "0.4.0" } -re_data_store = { path = "crates/re_data_store", version = "0.4.0" } -re_error = { path = "crates/re_error", version = "0.4.0" } -re_format = { path = "crates/re_format", version = "0.4.0" } -re_int_histogram = { path = "crates/re_int_histogram", version = "0.4.0" } -re_log = { path = "crates/re_log", version = "0.4.0" } -re_log_encoding = { path = "crates/re_log_encoding", version = "0.4.0" } -re_log_types = { path = "crates/re_log_types", version = "0.4.0" } -re_memory = { path = "crates/re_memory", version = "0.4.0" } -re_query = { path = "crates/re_query", version = "0.4.0" } -re_renderer = { path = "crates/re_renderer", version = "0.4.0" } -re_sdk = { path = "crates/re_sdk", version = "0.4.0" } -re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.4.0" } -re_smart_channel = { path = "crates/re_smart_channel", version = "0.4.0" } -re_string_interner = { path = "crates/re_string_interner", version = "0.4.0" } -re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.4.0" } -re_tuid = { path = "crates/re_tuid", version = "0.4.0" } -re_ui = { path = "crates/re_ui", version = "0.4.0" } -re_viewer = { path = "crates/re_viewer", version = "0.4.0" } -re_web_viewer_server = { path = "crates/re_web_viewer_server", version = "0.4.0" } -re_ws_comms = { path = "crates/re_ws_comms", version = "0.4.0" } -rerun = { path = "crates/rerun", version = "0.4.0" } +re_analytics = { path = "crates/re_analytics", version = "0.5.0-alpha.0" } +re_arrow_store = { path = "crates/re_arrow_store", version = "0.5.0-alpha.0" } +re_build_build_info = { path = "crates/re_build_build_info", version = "0.5.0-alpha.0" } +re_build_info = { path = "crates/re_build_info", version = "0.5.0-alpha.0" } +re_build_web_viewer = { path = "crates/re_build_web_viewer", version = "0.5.0-alpha.0" } +re_data_store = { path = "crates/re_data_store", version = "0.5.0-alpha.0" } +re_error = { path = "crates/re_error", version = "0.5.0-alpha.0" } +re_format = { path = "crates/re_format", version = "0.5.0-alpha.0" } +re_int_histogram = { path = "crates/re_int_histogram", version = "0.5.0-alpha.0" } +re_log = { path = "crates/re_log", version = "0.5.0-alpha.0" } +re_log_encoding = { path = "crates/re_log_encoding", version = "0.5.0-alpha.0" } +re_log_types = { path = "crates/re_log_types", version = "0.5.0-alpha.0" } +re_memory = { path = "crates/re_memory", version = "0.5.0-alpha.0" } +re_query = { path = "crates/re_query", version = "0.5.0-alpha.0" } +re_renderer = { path = "crates/re_renderer", version = "0.5.0-alpha.0" } +re_sdk = { path = "crates/re_sdk", version = "0.5.0-alpha.0" } +re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.5.0-alpha.0" } +re_smart_channel = { path = "crates/re_smart_channel", version = "0.5.0-alpha.0" } +re_string_interner = { path = "crates/re_string_interner", version = "0.5.0-alpha.0" } +re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.5.0-alpha.0" } +re_tuid = { path = "crates/re_tuid", version = "0.5.0-alpha.0" } +re_ui = { path = "crates/re_ui", version = "0.5.0-alpha.0" } +re_viewer = { path = "crates/re_viewer", version = "0.5.0-alpha.0" } +re_web_viewer_server = { path = "crates/re_web_viewer_server", version = "0.5.0-alpha.0" } +re_ws_comms = { path = "crates/re_ws_comms", version = "0.5.0-alpha.0" } +rerun = { path = "crates/rerun", version = "0.5.0-alpha.0" } ahash = "0.8" anyhow = "1.0" From 91621538d92e126da3a261738e61fe655457520f Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Wed, 19 Apr 2023 17:33:15 +0200 Subject: [PATCH 03/19] more changelog --- CHANGELOG.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57865fcbe0e9..5b1fcb5e4d67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,7 +90,7 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and - Option to show scene bounding box [#1770](https://github.com/rerun-io/rerun/pull/1770) - Assign default colors to class-ids when annotation context is missing [#1783](https://github.com/rerun-io/rerun/pull/1783) - Add Restart command and keyboard shortcut for moving time to start of timeline [#1802](https://github.com/rerun-io/rerun/pull/1802) (thanks [@h3mosphere](https://github.com/h3mosphere)!) -- New option to disable persistant storage [#1825](https://github.com/rerun-io/rerun/pull/1825) +- New option to disable persistent storage [#1825](https://github.com/rerun-io/rerun/pull/1825) - Show previews of colormaps when selecting them [#1846](https://github.com/rerun-io/rerun/pull/1846) - Smooth out scroll wheel input for camera zooming [#1920](https://github.com/rerun-io/rerun/pull/1920) @@ -134,7 +134,6 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and - Incremental metadata registry stats [#1833](https://github.com/rerun-io/rerun/pull/1833) #### ✨ Other Enhancement -- Don't run 3rd party bench suites on CI [#1787](https://github.com/rerun-io/rerun/pull/1787) #### πŸ—£ Merged RFCs - RFC: datastore state of the union & end-to-end batching [#1610](https://github.com/rerun-io/rerun/pull/1610) @@ -159,10 +158,13 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and #### πŸ€·β€β™‚οΈ Other - Fix videos for GitHub in `CHANGELOG.md` [af7d3b192157f942e35f64d3561a9a8dbcc18bfa](https://github.com/rerun-io/rerun/commit/af7d3b192157f942e35f64d3561a9a8dbcc18bfa) +- Don't run 3rd party bench suites on CI [#1787](https://github.com/rerun-io/rerun/pull/1787) - Remove `TensorTrait` [#1819](https://github.com/rerun-io/rerun/pull/1819) - Disable wheel tests for `x86_64-apple-darwin` [#1853](https://github.com/rerun-io/rerun/pull/1853) - Update `enumflags2` to non-yanked version [#1874](https://github.com/rerun-io/rerun/pull/1874) - +- Collect extra egui features into the main `Cargo.toml` [#1926](https://github.com/rerun-io/rerun/pull/1926) +- `just rs-run-all` [b14087b40bd805c95f030a4c7d3fb7a0482e13f4](https://github.com/rerun-io/rerun/commit/b14087b40bd805c95f030a4c7d3fb7a0482e13f4) +- `just py-run-all-{native|web|rrd}` [#1927](https://github.com/rerun-io/rerun/pull/1927) ## [0.4.0](https://github.com/rerun-io/rerun/compare/v0.3.1...v0.4.0) - Outlines, web viewer and performance improvements From e2fa88e58d4176777c858d0c3ea707849d953033 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Wed, 19 Apr 2023 17:54:16 +0200 Subject: [PATCH 04/19] re_format: fix implicit recursive feature flags --- crates/re_format/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/re_format/Cargo.toml b/crates/re_format/Cargo.toml index 198768511bc0..b502f8f6eb4e 100644 --- a/crates/re_format/Cargo.toml +++ b/crates/re_format/Cargo.toml @@ -19,4 +19,4 @@ all-features = true arrow2.workspace = true arrow2_convert.workspace = true comfy-table.workspace = true -re_tuid.workspace = true +re_tuid = { workspace = true, features = ["arrow2_convert"] } From 687a9825a9d3f53b7789b0a9359b6520b0c6a61a Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Wed, 19 Apr 2023 18:04:04 +0200 Subject: [PATCH 05/19] publish_crates.sh: fix crate ordering --- scripts/publish_crates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish_crates.sh b/scripts/publish_crates.sh index 1c52ca6cc140..7a52ccf5e012 100755 --- a/scripts/publish_crates.sh +++ b/scripts/publish_crates.sh @@ -95,11 +95,11 @@ cargo publish $FLAGS -p re_build_build_info cargo publish $FLAGS -p re_log cargo publish $FLAGS -p re_int_histogram cargo publish $FLAGS -p re_error +cargo publish $FLAGS -p re_tuid cargo publish $FLAGS -p re_format cargo publish $FLAGS -p re_string_interner cargo publish $FLAGS -p re_analytics cargo publish $FLAGS -p re_memory -cargo publish $FLAGS -p re_tuid cargo publish $FLAGS -p re_log_types cargo publish $FLAGS -p re_smart_channel cargo publish $FLAGS -p re_log_encoding From ccf376f929d865b50ebeb91b731f52a51bb74db5 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Wed, 19 Apr 2023 12:38:28 -0400 Subject: [PATCH 06/19] Join threads at end of multi-threading example (#1934) --- examples/python/multithreading/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/python/multithreading/main.py b/examples/python/multithreading/main.py index 35c1a674ed71..61244e1722b3 100755 --- a/examples/python/multithreading/main.py +++ b/examples/python/multithreading/main.py @@ -27,11 +27,16 @@ def main() -> None: rr.script_setup(args, "multithreading") + threads = [] for i in range(10): t = threading.Thread( target=rect_logger, args=("thread/{}".format(i), [random.randrange(255) for _ in range(3)]) ) t.start() + threads.append(t) + + for t in threads: + t.join() rr.script_teardown(args) From 1af508002e4117cff12e90e8a3c11cb219daa31b Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Wed, 19 Apr 2023 16:12:29 -0400 Subject: [PATCH 07/19] Add argument parsing to the rerun_demo (#1925) --- rerun_py/rerun_sdk/rerun_demo/__main__.py | 34 ++++++++++++++++++----- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/rerun_py/rerun_sdk/rerun_demo/__main__.py b/rerun_py/rerun_sdk/rerun_demo/__main__.py index ce5a5b34fdf4..dcb58f23d1ef 100644 --- a/rerun_py/rerun_sdk/rerun_demo/__main__.py +++ b/rerun_py/rerun_sdk/rerun_demo/__main__.py @@ -5,15 +5,16 @@ import sys -def run_cube(): +def run_cube(args: argparse.Namespace): import math import numpy as np import rerun as rr - rr.init("Cube", spawn=True, default_enabled=True) from rerun_demo.data import build_color_grid + rr.script_setup(args, "Cube") + STEPS = 100 twists = math.pi * np.sin(np.linspace(0, math.tau, STEPS)) / 4 for t in range(STEPS): @@ -21,10 +22,25 @@ def run_cube(): cube = build_color_grid(10, 10, 10, twist=twists[t]) rr.log_points("cube", positions=cube.positions, colors=cube.colors, radii=0.5) + rr.script_teardown(args) + -def run_colmap(): +def run_colmap(args): from rerun import bindings, unregister_shutdown # type: ignore[attr-defined] + serve_opts = [] + + # TODO(https://github.com/rerun-io/rerun/issues/1924): The need to special-case + # this flag conversion is a bit awkward. + if args.connect or args.addr: + print("Connecting to external viewer is only supported with the --cube demo.", file=sys.stderr) + exit(1) + if args.save: + print("Saving an RRD file is only supported from the --cube demo.", file=sys.stderr) + exit(1) + if args.serve: + serve_opts.append("--web-viewer") + # We don't need to call shutdown in this case. Rust should be handling everything unregister_shutdown() @@ -33,11 +49,13 @@ def run_colmap(): print("No demo file found at {}. Package was built without demo support".format(rrd_file), file=sys.stderr) exit(1) else: - exit(bindings.main([sys.argv[0], str(rrd_file)])) + exit(bindings.main([sys.argv[0], str(rrd_file)] + serve_opts)) def main() -> None: - parser = argparse.ArgumentParser(description="Run rerun example programs") + import rerun as rr + + parser = argparse.ArgumentParser(description="Run rerun example programs.") group = parser.add_mutually_exclusive_group() @@ -53,16 +71,18 @@ def main() -> None: help="Run the COLMAP data demo", ) + rr.script_add_args(parser) + args = parser.parse_args() if not any([args.cube, args.colmap]): args.cube = True if args.cube: - run_cube() + run_cube(args) elif args.colmap: - run_colmap() + run_colmap(args) if __name__ == "__main__": From b0d986a5ec7fbe79cfe34c7af75695da10fc5ffe Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Thu, 20 Apr 2023 02:58:57 -0400 Subject: [PATCH 08/19] More robust wait for exit condition during .serve() (#1939) * More robust wait for exit condition during .serve() * lint --- rerun_py/rerun_sdk/rerun/script_helpers.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rerun_py/rerun_sdk/rerun/script_helpers.py b/rerun_py/rerun_sdk/rerun/script_helpers.py index 8b59133dd090..3504d9d74593 100644 --- a/rerun_py/rerun_sdk/rerun/script_helpers.py +++ b/rerun_py/rerun_sdk/rerun/script_helpers.py @@ -91,10 +91,10 @@ def script_teardown(args: Namespace) -> None: """ if args.serve: - import signal - from threading import Event + import time - exit = Event() - signal.signal(signal.SIGINT, lambda sig, frame: exit.set()) - print("Sleeping while serving the web viewer. Abort with Ctrl-C") - exit.wait() + try: + while True: + time.sleep(1) + except KeyboardInterrupt: + print("Ctrl-C received. Exiting.") From acf1c29f22069c5734fa8bc28c839965680c5503 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Thu, 20 Apr 2023 09:00:26 +0200 Subject: [PATCH 09/19] Use zipfile python library instead of `unzip` command in arkitscene (#1936) * Use zipfile python library instead of `unzip` command in arkitscene Windows doesn't have unzip! * Nit: import sort order --------- Co-authored-by: Nikolaus West --- examples/python/arkitscenes/download_dataset.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/python/arkitscenes/download_dataset.py b/examples/python/arkitscenes/download_dataset.py index d2f5e2cbe62a..cc2e59d2cc5d 100644 --- a/examples/python/arkitscenes/download_dataset.py +++ b/examples/python/arkitscenes/download_dataset.py @@ -3,6 +3,7 @@ import math import os import subprocess +import zipfile from pathlib import Path from typing import Final, List, Optional @@ -121,9 +122,9 @@ def download_file(url: str, file_name: str, dst: Path) -> bool: def unzip_file(file_name: str, dst: Path, keep_zip: bool = True) -> bool: filepath = os.path.join(dst, file_name) print(f"Unzipping zip file {filepath}") - command = f"unzip -oq {filepath} -d {dst}" try: - subprocess.check_call(command, shell=True) + with zipfile.ZipFile(filepath, "r") as zip_ref: + zip_ref.extractall(dst) except Exception as error: print(f"Error unzipping {filepath}, error: {error}") return False From 45c11bc81504d192634d463240a4a51cb4f6abf5 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Thu, 20 Apr 2023 09:02:28 +0200 Subject: [PATCH 10/19] Fix annotation images sometimes drawn in the background. (#1933) This caused fairly ugly rendering whenever that happened. Also cleaned up redundant image/textured_rect defintions in spatial scene buildup --- crates/re_renderer/src/renderer/rectangles.rs | 6 +- .../src/ui/view_spatial/scene/mod.rs | 17 ++-- .../src/ui/view_spatial/scene/picking.rs | 28 ++----- .../src/ui/view_spatial/scene/primitives.rs | 22 ++---- .../view_spatial/scene/scene_part/images.rs | 79 ++++++++++--------- crates/re_viewer/src/ui/view_spatial/ui.rs | 6 +- .../src/ui/view_spatial/ui_renderer_bridge.rs | 6 +- 7 files changed, 73 insertions(+), 91 deletions(-) diff --git a/crates/re_renderer/src/renderer/rectangles.rs b/crates/re_renderer/src/renderer/rectangles.rs index 799655ecf78c..f138f566b17e 100644 --- a/crates/re_renderer/src/renderer/rectangles.rs +++ b/crates/re_renderer/src/renderer/rectangles.rs @@ -33,7 +33,7 @@ use super::{ }; /// Texture filter setting for magnification (a texel covers several pixels). -#[derive(Debug)] +#[derive(Debug, Clone, Copy)] pub enum TextureFilterMag { Linear, Nearest, @@ -41,7 +41,7 @@ pub enum TextureFilterMag { } /// Texture filter setting for minification (several texels fall to one pixel). -#[derive(Debug)] +#[derive(Debug, Clone, Copy)] pub enum TextureFilterMin { Linear, Nearest, @@ -98,6 +98,7 @@ impl ColormappedTexture { } } +#[derive(Clone)] pub struct TexturedRect { /// Top left corner position in world space. pub top_left_corner_position: glam::Vec3, @@ -114,6 +115,7 @@ pub struct TexturedRect { pub options: RectangleOptions, } +#[derive(Clone)] pub struct RectangleOptions { pub texture_filter_magnification: TextureFilterMag, pub texture_filter_minification: TextureFilterMin, diff --git a/crates/re_viewer/src/ui/view_spatial/scene/mod.rs b/crates/re_viewer/src/ui/view_spatial/scene/mod.rs index 0afad5c77dd3..8bb3c28e9010 100644 --- a/crates/re_viewer/src/ui/view_spatial/scene/mod.rs +++ b/crates/re_viewer/src/ui/view_spatial/scene/mod.rs @@ -7,7 +7,7 @@ use re_log_types::{ component_types::{ClassId, InstanceKey, KeypointId}, DecodedTensor, MeshId, }; -use re_renderer::{Color32, OutlineMaskPreference, Size}; +use re_renderer::{renderer::TexturedRect, Color32, OutlineMaskPreference, Size}; use crate::{ misc::{mesh_loader::LoadedMesh, SpaceViewHighlights, TransformCache, ViewerContext}, @@ -63,15 +63,11 @@ pub struct Image { pub tensor: DecodedTensor, - /// If this is a depth map, how long is a meter? - /// - /// For example, with a `u16` dtype one might have - /// `meter == 1000.0` for millimeter precision - /// up to a ~65m range. - pub meter: Option, - /// A thing that provides additional semantic context for your dtype. pub annotations: Arc, + + /// Textured rectangle for the renderer. + pub textured_rect: TexturedRect, } pub enum UiLabelTarget { @@ -104,9 +100,6 @@ pub struct SceneSpatialUiData { /// Picking any any of these rects cause the referred instance to be hovered. /// Only use this for 2d overlays! pub pickable_ui_rects: Vec<(egui::Rect, InstancePathHash)>, - - /// Images are a special case of rects where we're storing some extra information to allow miniature previews etc. - pub images: Vec, } pub struct SceneSpatial { @@ -231,7 +224,7 @@ impl SceneSpatial { return SpatialNavigationMode::ThreeD; } - if !self.ui.images.is_empty() { + if !self.primitives.images.is_empty() { return SpatialNavigationMode::TwoD; } if self.num_logged_3d_objects == 0 { diff --git a/crates/re_viewer/src/ui/view_spatial/scene/picking.rs b/crates/re_viewer/src/ui/view_spatial/scene/picking.rs index ddf73c2fdfbf..8d8325fdff1a 100644 --- a/crates/re_viewer/src/ui/view_spatial/scene/picking.rs +++ b/crates/re_viewer/src/ui/view_spatial/scene/picking.rs @@ -2,10 +2,10 @@ use ahash::HashSet; use re_data_store::InstancePathHash; -use re_log_types::{component_types::InstanceKey, EntityPathHash}; +use re_log_types::component_types::InstanceKey; use re_renderer::PickingLayerProcessor; -use super::{SceneSpatialPrimitives, SceneSpatialUiData}; +use super::{Image, SceneSpatialPrimitives, SceneSpatialUiData}; use crate::{ misc::instance_hash_conversions::instance_path_hash_from_picking_layer_id, ui::view_spatial::eye::Eye, @@ -116,11 +116,7 @@ impl PickingContext { self, previous_picking_result, ); - let mut rect_hits = picking_textured_rects( - self, - &primitives.textured_rectangles, - &primitives.textured_rectangles_ids, - ); + let mut rect_hits = picking_textured_rects(self, &primitives.images); rect_hits.sort_by(|a, b| b.depth_offset.cmp(&a.depth_offset)); let ui_rect_hits = picking_ui_rects(self, ui_data); @@ -241,23 +237,13 @@ fn picking_gpu( } } -fn picking_textured_rects( - context: &PickingContext, - textured_rectangles: &[re_renderer::renderer::TexturedRect], - textured_rectangles_ids: &[EntityPathHash], -) -> Vec { +fn picking_textured_rects(context: &PickingContext, images: &[Image]) -> Vec { crate::profile_function!(); let mut hits = Vec::new(); - for (rect, id) in textured_rectangles - .iter() - .zip(textured_rectangles_ids.iter()) - { - if !id.is_some() { - continue; - } - + for image in images { + let rect = &image.textured_rect; let rect_plane = macaw::Plane3::from_normal_point( rect.extent_u.cross(rect.extent_v).normalize(), rect.top_left_corner_position, @@ -277,7 +263,7 @@ fn picking_textured_rects( if (0.0..=1.0).contains(&u) && (0.0..=1.0).contains(&v) { hits.push(PickingRayHit { instance_path_hash: InstancePathHash { - entity_path_hash: *id, + entity_path_hash: image.ent_path.hash(), instance_key: InstanceKey::from_2d_image_coordinate( [ (u * rect.colormapped_texture.texture.width() as f32) as u32, diff --git a/crates/re_viewer/src/ui/view_spatial/scene/primitives.rs b/crates/re_viewer/src/ui/view_spatial/scene/primitives.rs index 392f0bde4fa1..407d1eec47fa 100644 --- a/crates/re_viewer/src/ui/view_spatial/scene/primitives.rs +++ b/crates/re_viewer/src/ui/view_spatial/scene/primitives.rs @@ -1,6 +1,6 @@ use egui::Color32; use re_data_store::EntityPath; -use re_log_types::{component_types::InstanceKey, EntityPathHash}; +use re_log_types::component_types::InstanceKey; use re_renderer::{ renderer::{DepthClouds, MeshInstance}, LineStripSeriesBuilder, PointCloudBuilder, @@ -20,11 +20,7 @@ pub struct SceneSpatialPrimitives { /// Estimated bounding box of all data in scene coordinates. Accumulated. pub(super) bounding_box: macaw::BoundingBox, - // TODO(andreas): Storing extra data like so is unsafe and not future proof either - // (see also above comment on the need to separate cpu-readable data) - pub textured_rectangles_ids: Vec, - pub textured_rectangles: Vec, - + pub images: Vec, pub line_strips: LineStripSeriesBuilder, pub points: PointCloudBuilder, pub meshes: Vec, @@ -44,8 +40,7 @@ impl SceneSpatialPrimitives { pub fn new(re_ctx: &mut re_renderer::RenderContext) -> Self { Self { bounding_box: macaw::BoundingBox::nothing(), - textured_rectangles_ids: Default::default(), - textured_rectangles: Default::default(), + images: Default::default(), line_strips: LineStripSeriesBuilder::new(re_ctx) .radius_boost_in_ui_points_for_outlines(SIZE_BOOST_IN_POINTS_FOR_LINE_OUTLINES), points: PointCloudBuilder::new(re_ctx) @@ -68,8 +63,7 @@ impl SceneSpatialPrimitives { pub fn num_primitives(&self) -> usize { let Self { bounding_box: _, - textured_rectangles, - textured_rectangles_ids: _, + images, line_strips, points, meshes, @@ -77,7 +71,7 @@ impl SceneSpatialPrimitives { any_outlines: _, } = &self; - textured_rectangles.len() + images.len() + line_strips.vertices.len() + points.vertices.len() + meshes.len() @@ -89,8 +83,7 @@ impl SceneSpatialPrimitives { let Self { bounding_box, - textured_rectangles_ids: _, - textured_rectangles, + images, line_strips, points, meshes, @@ -100,7 +93,8 @@ impl SceneSpatialPrimitives { *bounding_box = macaw::BoundingBox::nothing(); - for rect in textured_rectangles { + for image in images { + let rect = &image.textured_rect; bounding_box.extend(rect.top_left_corner_position); bounding_box.extend(rect.top_left_corner_position + rect.extent_u); bounding_box.extend(rect.top_left_corner_position + rect.extent_v); diff --git a/crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs b/crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs index 17821d2f475e..f86dc4538777 100644 --- a/crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs +++ b/crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs @@ -25,9 +25,7 @@ use crate::{ use super::ScenePart; -#[allow(clippy::too_many_arguments)] -fn push_tensor_texture( - scene: &mut SceneSpatial, +fn to_textured_rect( ctx: &mut ViewerContext<'_>, annotations: &Annotations, world_from_obj: glam::Mat4, @@ -35,10 +33,10 @@ fn push_tensor_texture( tensor: &DecodedTensor, multiplicative_tint: egui::Rgba, outline_mask: OutlineMaskPreference, -) { +) -> Option { crate::profile_function!(); - let Some([height, width, _]) = tensor.image_height_width_channels() else { return; }; + let Some([height, width, _]) = tensor.image_height_width_channels() else { return None; }; let debug_name = ent_path.to_string(); let tensor_stats = ctx.cache.tensor_stats(tensor); @@ -68,7 +66,7 @@ fn push_tensor_texture( re_renderer::renderer::TextureFilterMin::Linear }; - let textured_rect = re_renderer::renderer::TexturedRect { + Some(re_renderer::renderer::TexturedRect { top_left_corner_position: world_from_obj.transform_point3(glam::Vec3::ZERO), extent_u: world_from_obj.transform_vector3(glam::Vec3::X * width as f32), extent_v: world_from_obj.transform_vector3(glam::Vec3::Y * height as f32), @@ -80,15 +78,11 @@ fn push_tensor_texture( depth_offset: -1, // Push to background. Mostly important for mouse picking order! outline_mask, }, - }; - scene.primitives.textured_rectangles.push(textured_rect); - scene - .primitives - .textured_rectangles_ids - .push(ent_path.hash()); + }) } Err(err) => { re_log::error_once!("Failed to create texture from tensor for {debug_name:?}: {err}"); + None } } } @@ -99,15 +93,17 @@ fn handle_image_layering(scene: &mut SceneSpatial) { // Handle layered rectangles that are on (roughly) the same plane and were logged in sequence. // First, group by similar plane. // TODO(andreas): Need planes later for picking as well! - let rects_grouped_by_plane = { + let images_grouped_by_plane = { let mut cur_plane = macaw::Plane3::from_normal_dist(Vec3::NAN, std::f32::NAN); let mut rectangle_group = Vec::new(); scene .primitives - .textured_rectangles - .iter_mut() + .images + .drain(..) // We rebuild the list as we might reorder as well! .batching(move |it| { - for rect in it.by_ref() { + for image in it { + let rect = &image.textured_rect; + let prev_plane = cur_plane; cur_plane = macaw::Plane3::from_normal_point( rect.extent_u.cross(rect.extent_v).normalize(), @@ -119,10 +115,10 @@ fn handle_image_layering(scene: &mut SceneSpatial) { && prev_plane.normal.dot(cur_plane.normal) < 0.99 && (prev_plane.d - cur_plane.d) < 0.01 { - let previous_group = std::mem::replace(&mut rectangle_group, vec![rect]); + let previous_group = std::mem::replace(&mut rectangle_group, vec![image]); return Some(previous_group); } - rectangle_group.push(rect); + rectangle_group.push(image); } if !rectangle_group.is_empty() { Some(rectangle_group.drain(..).collect()) @@ -130,14 +126,19 @@ fn handle_image_layering(scene: &mut SceneSpatial) { None } }) - }; - // Then, change opacity & transformation for planes within group except the base plane. - for mut grouped_rects in rects_grouped_by_plane { - let total_num_images = grouped_rects.len(); - for (idx, rect) in grouped_rects.iter_mut().enumerate() { + } + .collect_vec(); + + // Then, for each planar group do resorting and change transparency. + for mut grouped_images in images_grouped_by_plane { + // Class id images should generally come last as they typically have large areas being zeroed out (which maps to fully transparent). + grouped_images.sort_by_key(|image| image.tensor.meaning == TensorDataMeaning::ClassId); + + let total_num_images = grouped_images.len(); + for (idx, image) in grouped_images.iter_mut().enumerate() { // Set depth offset for correct order and avoid z fighting when there is a 3d camera. // Keep behind depth offset 0 for correct picking order. - rect.options.depth_offset = + image.textured_rect.options.depth_offset = (idx as isize - total_num_images as isize) as re_renderer::DepthOffset; // make top images transparent @@ -146,8 +147,14 @@ fn handle_image_layering(scene: &mut SceneSpatial) { } else { 1.0 / total_num_images.at_most(20) as f32 }; // avoid precision problems in framebuffer - rect.options.multiplicative_tint = rect.options.multiplicative_tint.multiply(opacity); + image.textured_rect.options.multiplicative_tint = image + .textured_rect + .options + .multiplicative_tint + .multiply(opacity); } + + scene.primitives.images.extend(grouped_images); } } @@ -190,16 +197,6 @@ impl ImagesPart { }; let annotations = scene.annotation_map.find(ent_path); - - // TODO(jleibs): Meter should really be its own component - let meter = tensor.meter; - scene.ui.images.push(Image { - ent_path: ent_path.clone(), - tensor: tensor.clone(), - meter, - annotations: annotations.clone(), - }); - let entity_highlight = highlights.entity_outline_mask(ent_path.hash()); if *properties.backproject_depth.get() && tensor.meaning == TensorDataMeaning::Depth { @@ -234,8 +231,7 @@ impl ImagesPart { DefaultColor::OpaqueWhite, ); - push_tensor_texture( - scene, + if let Some(textured_rect) = to_textured_rect( ctx, &annotations, world_from_obj, @@ -243,7 +239,14 @@ impl ImagesPart { &tensor, color.into(), entity_highlight.overall, - ); + ) { + scene.primitives.images.push(Image { + ent_path: ent_path.clone(), + tensor, + annotations, + textured_rect, + }); + } } Ok(()) diff --git a/crates/re_viewer/src/ui/view_spatial/ui.rs b/crates/re_viewer/src/ui/view_spatial/ui.rs index 49209bb1b32e..da463eaa588b 100644 --- a/crates/re_viewer/src/ui/view_spatial/ui.rs +++ b/crates/re_viewer/src/ui/view_spatial/ui.rs @@ -755,7 +755,7 @@ pub fn picking( || *ent_properties.backproject_depth.get() { scene - .ui + .primitives .images .iter() .find(|image| image.ent_path == instance_path.entity_path) @@ -790,7 +790,7 @@ pub fn picking( )); response = if let Some((image, coords)) = picked_image_with_coords { - if let Some(meter) = image.meter { + if let Some(meter) = image.tensor.meter { if let Some(raw_value) = image.tensor.get(&[ picking_context.pointer_in_space2d.y.round() as _, picking_context.pointer_in_space2d.x.round() as _, @@ -840,7 +840,7 @@ pub fn picking( &image.tensor, &tensor_stats, &image.annotations, - image.meter, + image.tensor.meter, &debug_name, [coords[0] as _, coords[1] as _], ); diff --git a/crates/re_viewer/src/ui/view_spatial/ui_renderer_bridge.rs b/crates/re_viewer/src/ui/view_spatial/ui_renderer_bridge.rs index 513abdf82430..e02885290f73 100644 --- a/crates/re_viewer/src/ui/view_spatial/ui_renderer_bridge.rs +++ b/crates/re_viewer/src/ui/view_spatial/ui_renderer_bridge.rs @@ -32,7 +32,11 @@ pub fn fill_view_builder( .queue_draw(&primitives.points.to_draw_data(render_ctx)?) .queue_draw(&RectangleDrawData::new( render_ctx, - &primitives.textured_rectangles, + &primitives + .images + .iter() + .map(|image| image.textured_rect.clone()) + .collect::>(), )?); if matches!(background, ScreenBackground::GenericSkybox) { From 71a882bb05dbc40aadd7086e98523ada4e516404 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Thu, 20 Apr 2023 09:02:55 +0200 Subject: [PATCH 11/19] Fix backslashes in arkitscene rigid transformation path (#1938) * Fix backslashes in arkitscene rigid transformation path Should be fixed properly by https://github.com/rerun-io/rerun/issues/1937 * Use PosixPath instead of .replace("\\", "/") --------- Co-authored-by: Nikolaus West --- examples/python/arkitscenes/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/python/arkitscenes/main.py b/examples/python/arkitscenes/main.py index 9b9e00632539..b90ec3e0c70a 100755 --- a/examples/python/arkitscenes/main.py +++ b/examples/python/arkitscenes/main.py @@ -2,7 +2,7 @@ import argparse import json import os -from pathlib import Path +from pathlib import Path, PosixPath from typing import Any, Dict, List, Tuple import cv2 @@ -251,7 +251,7 @@ def log_camera( rr.log_rigid3( # pathlib makes it easy to get the parent, but log_rigid requires a string - str(Path(entity_id).parent), + str(PosixPath(entity_id).parent), child_from_parent=camera_from_world, xyz="RDF", # X=Right, Y=Down, Z=Forward ) From 369084a2b4971fa6d8a91d5fda3902204971aab2 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Thu, 20 Apr 2023 09:14:48 +0200 Subject: [PATCH 12/19] changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b1fcb5e4d67..2781b25818e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and - Always send `recording_id` as part of `LogMsg` [#1778](https://github.com/rerun-io/rerun/pull/1778) - New `reset_time` API [#1826](https://github.com/rerun-io/rerun/pull/1826) [#1854](https://github.com/rerun-io/rerun/pull/1854) - Always flush when we remove a sink [#1830](https://github.com/rerun-io/rerun/pull/1830) +- More robust wait for exit condition during .serve() [#1939](https://github.com/rerun-io/rerun/pull/1939) #### πŸͺ³ Bug Fixes - Fix broken outlines (hover/select effect) for lines [#1724](https://github.com/rerun-io/rerun/pull/1724) @@ -57,6 +58,9 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and - Don't clean up `LogDb`s that only contain a `BeginRecordingMsg` [#1914](https://github.com/rerun-io/rerun/pull/1914) - Fix picking entities with image + another object (or label) twice [#1908](https://github.com/rerun-io/rerun/pull/1908) - Fix double clicking camera no longer focusing on said camera [#1911](https://github.com/rerun-io/rerun/pull/1911) +- Fix annotation images sometimes drawn in the background [#1933](https://github.com/rerun-io/rerun/pull/1933) +- Use `zipfile` python library instead of `unzip` command in `arkitscene` demo [#1936](https://github.com/rerun-io/rerun/pull/1936) +- Fix backslashes in `arkitscene` rigid transformation path [#1938](https://github.com/rerun-io/rerun/pull/1938) #### πŸš€ Performance Improvements - batching 4: retire `MsgBundle` + batching support in transport layer [#1679](https://github.com/rerun-io/rerun/pull/1679) @@ -78,6 +82,8 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and - Remove manual depth projection from `car` and `nyud` examples [#1869](https://github.com/rerun-io/rerun/pull/1869) - Always spawn instead of fork in multiprocessing example [#1922](https://github.com/rerun-io/rerun/pull/1922) - Add `--num-frames` arg to canny (webcam) example [#1923](https://github.com/rerun-io/rerun/pull/1923) +- Add argument parsing to `rerun_demo` [#1925](https://github.com/rerun-io/rerun/pull/1925) +- Join threads at end of `multithreading` example [#1934](https://github.com/rerun-io/rerun/pull/1934) #### πŸ“š Docs - Add `typing_extensions` to `requirements-doc.txt` [#1786](https://github.com/rerun-io/rerun/pull/1786) From 9d5083f2798baef63dd97fa257ef5bb1454c1afe Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Thu, 20 Apr 2023 10:09:45 +0200 Subject: [PATCH 13/19] Fix hover/select highlights when picking single points in a scene with multiple point clouds (#1942) Batch vertex offset for single highlights wasn't correctly computed. Different parts of the code made different assumptions what offsets referred to --- crates/re_renderer/src/renderer/point_cloud.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/re_renderer/src/renderer/point_cloud.rs b/crates/re_renderer/src/renderer/point_cloud.rs index 639db5a17ceb..03611b80a256 100644 --- a/crates/re_renderer/src/renderer/point_cloud.rs +++ b/crates/re_renderer/src/renderer/point_cloud.rs @@ -130,7 +130,7 @@ pub struct PointCloudBatchInfo { /// Defines an outline mask for an individual vertex ranges. /// - /// Vertex ranges are *not* relative within the current batch, but relates to the draw data vertex buffer. + /// Vertex ranges are relative within the current batch. /// /// Having many of these individual outline masks can be slow as they require each their own uniform buffer & draw call. /// This feature is meant for a limited number of "extra selections" @@ -455,6 +455,8 @@ impl PointCloudDrawData { )); for (range, _) in &batch_info.additional_outline_mask_ids_vertex_ranges { + let range = (range.start + start_point_for_next_batch) + ..(range.end + start_point_for_next_batch); batches_internal.push(point_renderer.create_point_cloud_batch( ctx, format!("{:?} strip-only {:?}", batch_info.label, range).into(), From a96607d3fccd579f1d3e6ee2bdb70fe6ae49f097 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Thu, 20 Apr 2023 10:11:23 +0200 Subject: [PATCH 14/19] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2781b25818e6..2e9504c7f799 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and - Fix annotation images sometimes drawn in the background [#1933](https://github.com/rerun-io/rerun/pull/1933) - Use `zipfile` python library instead of `unzip` command in `arkitscene` demo [#1936](https://github.com/rerun-io/rerun/pull/1936) - Fix backslashes in `arkitscene` rigid transformation path [#1938](https://github.com/rerun-io/rerun/pull/1938) +- Fix hover/select highlights when picking single points in a scene with multiple point clouds [#1942](https://github.com/rerun-io/rerun/pull/1942) #### πŸš€ Performance Improvements - batching 4: retire `MsgBundle` + batching support in transport layer [#1679](https://github.com/rerun-io/rerun/pull/1679) From 427d19582129e0b9ea72881059d7123db5112e4b Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Thu, 20 Apr 2023 12:02:57 +0200 Subject: [PATCH 15/19] Fix hovering depth clouds (#1943) We didn't add to `scene.primitives.image`. Instead of adding to this list, it is instead now no longer needed for picking since we can very easily query for tensor again. --- .../src/ui/view_spatial/scene/mod.rs | 3 - .../view_spatial/scene/scene_part/images.rs | 1 - crates/re_viewer/src/ui/view_spatial/ui.rs | 77 ++++++++++--------- 3 files changed, 42 insertions(+), 39 deletions(-) diff --git a/crates/re_viewer/src/ui/view_spatial/scene/mod.rs b/crates/re_viewer/src/ui/view_spatial/scene/mod.rs index 8bb3c28e9010..81c2688a943a 100644 --- a/crates/re_viewer/src/ui/view_spatial/scene/mod.rs +++ b/crates/re_viewer/src/ui/view_spatial/scene/mod.rs @@ -63,9 +63,6 @@ pub struct Image { pub tensor: DecodedTensor, - /// A thing that provides additional semantic context for your dtype. - pub annotations: Arc, - /// Textured rectangle for the renderer. pub textured_rect: TexturedRect, } diff --git a/crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs b/crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs index f86dc4538777..078574468943 100644 --- a/crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs +++ b/crates/re_viewer/src/ui/view_spatial/scene/scene_part/images.rs @@ -243,7 +243,6 @@ impl ImagesPart { scene.primitives.images.push(Image { ent_path: ent_path.clone(), tensor, - annotations, textured_rect, }); } diff --git a/crates/re_viewer/src/ui/view_spatial/ui.rs b/crates/re_viewer/src/ui/view_spatial/ui.rs index da463eaa588b..efe2b655f6d5 100644 --- a/crates/re_viewer/src/ui/view_spatial/ui.rs +++ b/crates/re_viewer/src/ui/view_spatial/ui.rs @@ -754,28 +754,29 @@ pub fn picking( let picked_image_with_coords = if hit.hit_type == PickingHitType::TexturedRect || *ent_properties.backproject_depth.get() { - scene - .primitives - .images - .iter() - .find(|image| image.ent_path == instance_path.entity_path) - .and_then(|image| { - // If we're here because of back-projection, but this wasn't actually a depth image, drop out. - // (the back-projection property may be true despite this not being a depth image!) - if hit.hit_type != PickingHitType::TexturedRect - && *ent_properties.backproject_depth.get() - && image.tensor.meaning != TensorDataMeaning::Depth - { - return None; - } - image.tensor.image_height_width_channels().map(|[_, w, _]| { + query_latest_single::( + &ctx.log_db.entity_db, + &instance_path.entity_path, + &ctx.current_query(), + ) + .and_then(|tensor| { + // If we're here because of back-projection, but this wasn't actually a depth image, drop out. + // (the back-projection property may be true despite this not being a depth image!) + if hit.hit_type != PickingHitType::TexturedRect + && *ent_properties.backproject_depth.get() + && tensor.meaning != TensorDataMeaning::Depth + { + None + } else { + tensor.image_height_width_channels().map(|[_, w, _]| { let coordinates = hit .instance_path_hash .instance_key .to_2d_image_coordinate(w); - (image, coordinates) + (tensor, coordinates) }) - }) + } + }) } else { None }; @@ -789,9 +790,9 @@ pub fn picking( instance_path.clone(), )); - response = if let Some((image, coords)) = picked_image_with_coords { - if let Some(meter) = image.tensor.meter { - if let Some(raw_value) = image.tensor.get(&[ + response = if let Some((tensor, coords)) = picked_image_with_coords { + if let Some(meter) = tensor.meter { + if let Some(raw_value) = tensor.get(&[ picking_context.pointer_in_space2d.y.round() as _, picking_context.pointer_in_space2d.x.round() as _, ]) { @@ -815,10 +816,10 @@ pub fn picking( &ctx.current_query(), ); - if let [h, w, ..] = image.tensor.shape() { + if let Some([h, w, ..]) = tensor.image_height_width_channels() { ui.separator(); ui.horizontal(|ui| { - let (w, h) = (w.size as f32, h.size as f32); + let (w, h) = (w as f32, h as f32); if *state.nav_mode.get() == SpatialNavigationMode::TwoD { let rect = egui::Rect::from_min_size( egui::Pos2::ZERO, @@ -826,24 +827,30 @@ pub fn picking( ); data_ui::image::show_zoomed_image_region_area_outline( ui, - &image.tensor, + &tensor, [coords[0] as _, coords[1] as _], space_from_ui.inverse().transform_rect(rect), ); } - let tensor_stats = *ctx.cache.tensor_stats(&image.tensor); - let debug_name = image.ent_path.to_string(); - data_ui::image::show_zoomed_image_region( - ctx.render_ctx, - ui, - &image.tensor, - &tensor_stats, - &image.annotations, - image.tensor.meter, - &debug_name, - [coords[0] as _, coords[1] as _], - ); + let tensor_name = instance_path.to_string(); + match ctx.cache.decode.try_decode_tensor_if_necessary(tensor) { + Ok(decoded_tensor) => + data_ui::image::show_zoomed_image_region( + ctx.render_ctx, + ui, + &decoded_tensor, + ctx.cache.tensor_stats(&decoded_tensor), + &scene.annotation_map.find(&instance_path.entity_path), + decoded_tensor.meter, + &tensor_name, + [coords[0] as _, coords[1] as _], + ), + Err(err) => + re_log::warn_once!( + "Encountered problem decoding tensor at path {tensor_name}: {err}" + ), + } }); } }); From ea1b7da1365ef2bf79faf344fdb0662bfba7ac30 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Thu, 20 Apr 2023 12:05:19 +0200 Subject: [PATCH 16/19] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e9504c7f799..4ccfb255c68b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and - Use `zipfile` python library instead of `unzip` command in `arkitscene` demo [#1936](https://github.com/rerun-io/rerun/pull/1936) - Fix backslashes in `arkitscene` rigid transformation path [#1938](https://github.com/rerun-io/rerun/pull/1938) - Fix hover/select highlights when picking single points in a scene with multiple point clouds [#1942](https://github.com/rerun-io/rerun/pull/1942) +- Fix hovering depth clouds [#1943](https://github.com/rerun-io/rerun/pull/1943) #### πŸš€ Performance Improvements - batching 4: retire `MsgBundle` + batching support in transport layer [#1679](https://github.com/rerun-io/rerun/pull/1679) From 62716ba5674dcf7cc0edd81878f2fff8e2ac9e63 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Thu, 20 Apr 2023 15:13:08 +0200 Subject: [PATCH 17/19] 2.5GB before GC kick in on web (#1944) --- crates/re_viewer/src/web.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/re_viewer/src/web.rs b/crates/re_viewer/src/web.rs index 58dcec080ce2..01e33d523548 100644 --- a/crates/re_viewer/src/web.rs +++ b/crates/re_viewer/src/web.rs @@ -38,7 +38,7 @@ pub async fn start( let startup_options = crate::StartupOptions { memory_limit: re_memory::MemoryLimit { // On wasm32 we only have 4GB of memory to play around with. - limit: Some(3_500_000_000), + limit: Some(2_500_000_000), }, persist_state, }; From 0e55854c81489c1777749d010f1d0c349b51f345 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Thu, 20 Apr 2023 15:45:24 +0200 Subject: [PATCH 18/19] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ccfb255c68b..5d2060d7981b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -115,6 +115,7 @@ This new release adds MVP support for embedding Rerun in Jupyter notebooks, and - Implement `re_tuid::Tuid::random()` on web [#1796](https://github.com/rerun-io/rerun/pull/1796) - Refactor the relationship between the assorted web / websocket servers [#1844](https://github.com/rerun-io/rerun/pull/1844) - Notebooks: make `presentation_id` consistent and use data-attribute for rrd [#1881](https://github.com/rerun-io/rerun/pull/1881) +- 2.5GB before GC kick in on web [#1944](https://github.com/rerun-io/rerun/pull/1944) #### 🎨 Renderer Improvements - GPU based picking with points [#1721](https://github.com/rerun-io/rerun/pull/1721) From de38609ad34b12444d8b2f3a19320e931c30307a Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Thu, 20 Apr 2023 15:53:20 +0200 Subject: [PATCH 19/19] 0.5.0 --- Cargo.lock | 70 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 54 ++++++++++++++++++++--------------------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c6800487fafc..d7917e62575f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,7 @@ checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" [[package]] name = "api_demo" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "anyhow", "clap 4.1.4", @@ -1278,7 +1278,7 @@ dependencies = [ [[package]] name = "dna" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "itertools", "rand", @@ -2708,7 +2708,7 @@ dependencies = [ [[package]] name = "minimal" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "rerun", ] @@ -2721,7 +2721,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "minimal_options" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "anyhow", "clap 4.1.4", @@ -3134,7 +3134,7 @@ dependencies = [ [[package]] name = "objectron" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "anyhow", "clap 4.1.4", @@ -3730,7 +3730,7 @@ dependencies = [ [[package]] name = "raw_mesh" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "anyhow", "bytes", @@ -3770,7 +3770,7 @@ dependencies = [ [[package]] name = "re_analytics" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "anyhow", "crossbeam", @@ -3791,7 +3791,7 @@ dependencies = [ [[package]] name = "re_arrow_store" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "ahash 0.8.2", "anyhow", @@ -3818,7 +3818,7 @@ dependencies = [ [[package]] name = "re_build_build_info" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "anyhow", "time 0.3.20", @@ -3826,18 +3826,18 @@ dependencies = [ [[package]] name = "re_build_info" -version = "0.5.0-alpha.0" +version = "0.5.0" [[package]] name = "re_build_web_viewer" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "cargo_metadata", ] [[package]] name = "re_data_store" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "ahash 0.8.2", "criterion", @@ -3860,14 +3860,14 @@ dependencies = [ [[package]] name = "re_error" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "anyhow", ] [[package]] name = "re_format" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "arrow2", "arrow2_convert", @@ -3877,7 +3877,7 @@ dependencies = [ [[package]] name = "re_int_histogram" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "criterion", "insta", @@ -3888,7 +3888,7 @@ dependencies = [ [[package]] name = "re_log" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "env_logger", "js-sys", @@ -3901,7 +3901,7 @@ dependencies = [ [[package]] name = "re_log_encoding" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "criterion", "ehttp", @@ -3926,7 +3926,7 @@ dependencies = [ [[package]] name = "re_log_types" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "ahash 0.8.2", "array-init", @@ -3964,7 +3964,7 @@ dependencies = [ [[package]] name = "re_memory" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "ahash 0.8.2", "backtrace", @@ -3984,7 +3984,7 @@ dependencies = [ [[package]] name = "re_query" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "arrow2", "criterion", @@ -4002,7 +4002,7 @@ dependencies = [ [[package]] name = "re_renderer" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4055,7 +4055,7 @@ dependencies = [ [[package]] name = "re_sdk" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "arrow2_convert", "document-features", @@ -4075,7 +4075,7 @@ dependencies = [ [[package]] name = "re_sdk_comms" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4091,7 +4091,7 @@ dependencies = [ [[package]] name = "re_smart_channel" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "crossbeam", "instant", @@ -4099,7 +4099,7 @@ dependencies = [ [[package]] name = "re_string_interner" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "ahash 0.8.2", "nohash-hasher", @@ -4110,7 +4110,7 @@ dependencies = [ [[package]] name = "re_tensor_ops" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "ahash 0.8.2", "ndarray", @@ -4120,7 +4120,7 @@ dependencies = [ [[package]] name = "re_tuid" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "arrow2", "arrow2_convert", @@ -4134,7 +4134,7 @@ dependencies = [ [[package]] name = "re_ui" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "eframe", "egui", @@ -4152,7 +4152,7 @@ dependencies = [ [[package]] name = "re_viewer" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "ahash 0.8.2", "anyhow", @@ -4212,7 +4212,7 @@ dependencies = [ [[package]] name = "re_web_viewer_server" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "cargo_metadata", "ctrlc", @@ -4229,7 +4229,7 @@ dependencies = [ [[package]] name = "re_ws_comms" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "anyhow", "bincode", @@ -4301,7 +4301,7 @@ checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" [[package]] name = "rerun" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "anyhow", "backtrace", @@ -4333,7 +4333,7 @@ dependencies = [ [[package]] name = "rerun_py" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "arrow2", "document-features", @@ -4437,7 +4437,7 @@ dependencies = [ [[package]] name = "run_wasm" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "cargo-run-wasm", "pico-args", @@ -4991,7 +4991,7 @@ dependencies = [ [[package]] name = "test_image_memory" -version = "0.5.0-alpha.0" +version = "0.5.0" dependencies = [ "mimalloc", "re_format", diff --git a/Cargo.toml b/Cargo.toml index 983336ab949a..c0c8e9b928b1 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.67" -version = "0.5.0-alpha.0" +version = "0.5.0" [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_analytics = { path = "crates/re_analytics", version = "0.5.0-alpha.0" } -re_arrow_store = { path = "crates/re_arrow_store", version = "0.5.0-alpha.0" } -re_build_build_info = { path = "crates/re_build_build_info", version = "0.5.0-alpha.0" } -re_build_info = { path = "crates/re_build_info", version = "0.5.0-alpha.0" } -re_build_web_viewer = { path = "crates/re_build_web_viewer", version = "0.5.0-alpha.0" } -re_data_store = { path = "crates/re_data_store", version = "0.5.0-alpha.0" } -re_error = { path = "crates/re_error", version = "0.5.0-alpha.0" } -re_format = { path = "crates/re_format", version = "0.5.0-alpha.0" } -re_int_histogram = { path = "crates/re_int_histogram", version = "0.5.0-alpha.0" } -re_log = { path = "crates/re_log", version = "0.5.0-alpha.0" } -re_log_encoding = { path = "crates/re_log_encoding", version = "0.5.0-alpha.0" } -re_log_types = { path = "crates/re_log_types", version = "0.5.0-alpha.0" } -re_memory = { path = "crates/re_memory", version = "0.5.0-alpha.0" } -re_query = { path = "crates/re_query", version = "0.5.0-alpha.0" } -re_renderer = { path = "crates/re_renderer", version = "0.5.0-alpha.0" } -re_sdk = { path = "crates/re_sdk", version = "0.5.0-alpha.0" } -re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.5.0-alpha.0" } -re_smart_channel = { path = "crates/re_smart_channel", version = "0.5.0-alpha.0" } -re_string_interner = { path = "crates/re_string_interner", version = "0.5.0-alpha.0" } -re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.5.0-alpha.0" } -re_tuid = { path = "crates/re_tuid", version = "0.5.0-alpha.0" } -re_ui = { path = "crates/re_ui", version = "0.5.0-alpha.0" } -re_viewer = { path = "crates/re_viewer", version = "0.5.0-alpha.0" } -re_web_viewer_server = { path = "crates/re_web_viewer_server", version = "0.5.0-alpha.0" } -re_ws_comms = { path = "crates/re_ws_comms", version = "0.5.0-alpha.0" } -rerun = { path = "crates/rerun", version = "0.5.0-alpha.0" } +re_analytics = { path = "crates/re_analytics", version = "0.5.0" } +re_arrow_store = { path = "crates/re_arrow_store", version = "0.5.0" } +re_build_build_info = { path = "crates/re_build_build_info", version = "0.5.0" } +re_build_info = { path = "crates/re_build_info", version = "0.5.0" } +re_build_web_viewer = { path = "crates/re_build_web_viewer", version = "0.5.0" } +re_data_store = { path = "crates/re_data_store", version = "0.5.0" } +re_error = { path = "crates/re_error", version = "0.5.0" } +re_format = { path = "crates/re_format", version = "0.5.0" } +re_int_histogram = { path = "crates/re_int_histogram", version = "0.5.0" } +re_log = { path = "crates/re_log", version = "0.5.0" } +re_log_encoding = { path = "crates/re_log_encoding", version = "0.5.0" } +re_log_types = { path = "crates/re_log_types", version = "0.5.0" } +re_memory = { path = "crates/re_memory", version = "0.5.0" } +re_query = { path = "crates/re_query", version = "0.5.0" } +re_renderer = { path = "crates/re_renderer", version = "0.5.0" } +re_sdk = { path = "crates/re_sdk", version = "0.5.0" } +re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.5.0" } +re_smart_channel = { path = "crates/re_smart_channel", version = "0.5.0" } +re_string_interner = { path = "crates/re_string_interner", version = "0.5.0" } +re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.5.0" } +re_tuid = { path = "crates/re_tuid", version = "0.5.0" } +re_ui = { path = "crates/re_ui", version = "0.5.0" } +re_viewer = { path = "crates/re_viewer", version = "0.5.0" } +re_web_viewer_server = { path = "crates/re_web_viewer_server", version = "0.5.0" } +re_ws_comms = { path = "crates/re_ws_comms", version = "0.5.0" } +rerun = { path = "crates/rerun", version = "0.5.0" } ahash = "0.8" anyhow = "1.0"