From 5ad01b5bdcf35bf4855ec26a994ebd6ef176ff98 Mon Sep 17 00:00:00 2001 From: cc Date: Tue, 20 Oct 2026 00:23:34 -0700 Subject: [PATCH 1/2] refactor(mapping): encode ray-tracing maps and regions with CDR --- .github/workflows/message-codegen.yml | 13 ++ dimos/mapping/ray_tracing/module.py | 20 +- dimos/mapping/ray_tracing/rust/Cargo.lock | 102 +++++++- dimos/mapping/ray_tracing/rust/Cargo.toml | 24 +- dimos/mapping/ray_tracing/rust/flake.nix | 25 +- dimos/mapping/ray_tracing/rust/src/lib.rs | 2 + dimos/mapping/ray_tracing/rust/src/module.rs | 221 +++++++++++------- dimos/mapping/ray_tracing/rust/src/wire.rs | 214 +++++++++++++++++ .../ray_tracing/test_generated_native.py | 210 +++++++++++++++++ dimos/mapping/ray_tracing/test_transformer.py | 54 +++-- dimos/mapping/ray_tracing/test_viz.py | 21 +- dimos/mapping/ray_tracing/transformer.py | 26 ++- dimos/mapping/ray_tracing/utils/loaded_map.py | 9 +- .../ray_tracing/utils/test_loaded_map.py | 32 ++- dimos/mapping/ray_tracing/viz.py | 14 +- dimos/navigation/global_planner/test_viz.py | 11 +- dimos/spec/mapping.py | 4 +- 17 files changed, 835 insertions(+), 167 deletions(-) create mode 100644 dimos/mapping/ray_tracing/rust/src/wire.rs create mode 100644 dimos/mapping/ray_tracing/test_generated_native.py diff --git a/.github/workflows/message-codegen.yml b/.github/workflows/message-codegen.yml index 5acb961be2c..99c30ab6288 100644 --- a/.github/workflows/message-codegen.yml +++ b/.github/workflows/message-codegen.yml @@ -21,6 +21,8 @@ on: - dimos/memory/** - dimos/mapping/occupancy/** - dimos/mapping/voxels/** + - dimos/mapping/ray_tracing/** + - dimos/spec/mapping.py - dimos/navigation/base.py - dimos/navigation/tf_pose.py - dimos/navigation/spec.py @@ -340,3 +342,14 @@ jobs: if: runner.os == 'Linux' run: | .native-review/bin/python -I -c 'import dimos.messages.dimos_msgs.msg; import pytest; import sys; raise SystemExit(pytest.main(sys.argv[1:]))' --noconftest --import-mode=importlib -o addopts='' -q "$PWD/dimos/msgs/test_regions.py" + - name: Verify generated ray-tracing maps, region keys and native interoperability + if: runner.os == 'Linux' + run: | + cargo test --locked --manifest-path dimos/mapping/ray_tracing/rust/Cargo.toml --lib --jobs 2 + cargo clippy --locked --manifest-path dimos/mapping/ray_tracing/rust/Cargo.toml --all-targets --jobs 2 -- -D warnings + cargo build --locked --manifest-path dimos/mapping/ray_tracing/rust/Cargo.toml --bin voxel_ray_tracing --jobs 2 + .venv/bin/maturin build --locked --profile dev --manifest-path dimos/mapping/ray_tracing/rust/py/Cargo.toml --jobs 2 --out build/mapper-python-wheels --interpreter .native-review/bin/python + .native-review/bin/python -m pip install --no-deps build/mapper-python-wheels/*.whl + export DIMOS_NATIVE_RAY_TRACING_BINARY="$PWD/dimos/mapping/ray_tracing/rust/target/debug/voxel_ray_tracing" + .native-review/bin/python -I -c 'from dimos.mapping.ray_tracing import module,transformer,viz; from dimos.mapping.ray_tracing.utils import loaded_map; import dimos_voxel_ray_tracing; import pytest; import sys; assert all("site-packages" in str(value.__file__) for value in (module,transformer,viz,loaded_map,dimos_voxel_ray_tracing)); raise SystemExit(pytest.main(sys.argv[1:]))' --noconftest --import-mode=importlib -o addopts='' -o $'markers=skipif_aarch64: optional architecture case\nskipif_macos: optional architecture case' -q "$PWD/dimos/mapping/ray_tracing/test_generated_native.py" "$PWD/dimos/mapping/ray_tracing/test_transformer.py" "$PWD/dimos/mapping/ray_tracing/test_viz.py" "$PWD/dimos/mapping/ray_tracing/utils/test_loaded_map.py" "$PWD/dimos/navigation/global_planner/test_viz.py" + MYPYPATH="$PWD/build/message-source/python" .native-review/bin/python -m mypy --follow-imports=silent dimos/mapping/ray_tracing/{module,transformer,viz}.py dimos/mapping/ray_tracing/utils/loaded_map.py dimos/spec/mapping.py diff --git a/dimos/mapping/ray_tracing/module.py b/dimos/mapping/ray_tracing/module.py index 16bd93fb535..80d14374d9e 100644 --- a/dimos/mapping/ray_tracing/module.py +++ b/dimos/mapping/ray_tracing/module.py @@ -18,10 +18,10 @@ from typing import TYPE_CHECKING from dimos.core.native_module import NativeModule, NativeModuleConfig -from dimos.core.stream import In, Out -from dimos.msgs.geometry_msgs.PoseStamped import PoseStamped -from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 -from dimos.msgs.tf2_msgs.TFMessage import TFMessage +from dimos.core.stream import IO, In, Out +from dimos.messages.dimos_msgs.msg import PointCloudRegion, RegionBounds +from dimos.messages.sensor_msgs.msg import PointCloud2 +from dimos.messages.tf2_msgs.msg import TFMessage from dimos.spec import mapping # Max stamp gap between a cloud and the transform used to register it (s). @@ -97,18 +97,18 @@ class RayTracingVoxelMap(NativeModule, mapping.GlobalPointcloud): # An externally loaded map cloud, placed by the latest tf world_frame -> # cloud frame_id. Only the first cloud seeds the map. loaded_map: In[PointCloud2] - tf: In[TFMessage] + tf: IO[TFMessage] global_map: Out[PointCloud2] local_map: Out[PointCloud2] local_map_fine: Out[PointCloud2] - region_bounds: Out[PoseStamped] + region_bounds: Out[RegionBounds] # One region of a seeded map as it lands, gated like local_map. seed_bounds # carries its cylinder like region_bounds. - seed_map: Out[PointCloud2] - seed_bounds: Out[PoseStamped] + seed_map: Out[PointCloudRegion] + seed_bounds: Out[RegionBounds] # The map for viewers, one region cell per message with the cell packed in - # the header seq. - map_regions: Out[PointCloud2] + # the explicit region_id. + map_regions: Out[PointCloudRegion] if TYPE_CHECKING: diff --git a/dimos/mapping/ray_tracing/rust/Cargo.lock b/dimos/mapping/ray_tracing/rust/Cargo.lock index 4412e44ee34..2be24ec3959 100644 --- a/dimos/mapping/ray_tracing/rust/Cargo.lock +++ b/dimos/mapping/ray_tracing/rust/Cargo.lock @@ -232,6 +232,20 @@ name = "bytemuck" version = "1.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.5", +] [[package]] name = "byteorder" @@ -585,10 +599,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "dimos-generated-messages" +version = "0.0.14" +dependencies = [ + "heapless", + "re_cdr", + "ros2msg", + "serde", + "serde-big-array", +] + [[package]] name = "dimos-lcm" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", "socket2 0.5.10", @@ -598,13 +623,13 @@ dependencies = [ [[package]] name = "dimos-module" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" dependencies = [ "dimos-lcm", "dimos-module-macros", "lcm-msgs", "nalgebra", "rayon", + "re_cdr", "serde", "serde_json", "tokio", @@ -618,7 +643,6 @@ dependencies = [ [[package]] name = "dimos-module-macros" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" dependencies = [ "proc-macro2", "quote", @@ -632,8 +656,8 @@ version = "0.1.0" dependencies = [ "ahash", "arrayvec", + "dimos-generated-messages", "dimos-module", - "lcm-msgs", "nalgebra", "rayon", "serde", @@ -983,6 +1007,15 @@ version = "0.33.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e762b9b188634fc508d4ec54b62ea3d352c43fd431d18d05d46f559f217f4725" +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -1025,6 +1058,17 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "serde", + "stable_deref_trait", +] + [[package]] name = "heck" version = "0.5.0" @@ -1433,7 +1477,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lcm-msgs" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", ] @@ -2014,6 +2058,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.119", +] + [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -2314,6 +2368,18 @@ dependencies = [ "yasna", ] +[[package]] +name = "re_cdr" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bba10c21433b597481f366b978cdf2617e56785b38cb0dcc3833c6b8ad7e061a" +dependencies = [ + "bytemuck", + "byteorder", + "serde", + "thiserror", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -2430,6 +2496,23 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "ros2msg" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fe291be5cb6d4b8e6bf9c9de80c40bd1cb09ecac50deafa2fdcae0027e04988" +dependencies = [ + "heck", + "pest", + "pest_derive", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "syn 2.0.119", + "thiserror", +] + [[package]] name = "rustc-hash" version = "2.1.3" @@ -2670,6 +2753,15 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11fc7cc2c76d73e0f27ee52abbd64eec84d46f370c88371120433196934e4b7f" +dependencies = [ + "serde", +] + [[package]] name = "serde_core" version = "1.0.229" diff --git a/dimos/mapping/ray_tracing/rust/Cargo.toml b/dimos/mapping/ray_tracing/rust/Cargo.toml index e96b69ebefa..07405f2f4d9 100644 --- a/dimos/mapping/ray_tracing/rust/Cargo.toml +++ b/dimos/mapping/ray_tracing/rust/Cargo.toml @@ -21,22 +21,22 @@ python = "dimos.mapping.ray_tracing.module:RayTracingVoxelMap" threads = 2 [package.metadata.dimos.module.ray_tracing.inputs] -lidar = "sensor_msgs.PointCloud2" -loaded_map = "sensor_msgs.PointCloud2" -tf = "tf2_msgs.TFMessage" +lidar = "sensor_msgs/msg/PointCloud2" +loaded_map = "sensor_msgs/msg/PointCloud2" +tf = "tf2_msgs/msg/TFMessage" [package.metadata.dimos.module.ray_tracing.outputs] -global_map = "sensor_msgs.PointCloud2" -local_map = "sensor_msgs.PointCloud2" -local_map_fine = "sensor_msgs.PointCloud2" -seed_map = "sensor_msgs.PointCloud2" -seed_bounds = "geometry_msgs.PoseStamped" -region_bounds = "geometry_msgs.PoseStamped" -map_regions = "sensor_msgs.PointCloud2" +global_map = "sensor_msgs/msg/PointCloud2" +local_map = "sensor_msgs/msg/PointCloud2" +local_map_fine = "sensor_msgs/msg/PointCloud2" +seed_map = "dimos_msgs/msg/PointCloudRegion" +seed_bounds = "dimos_msgs/msg/RegionBounds" +region_bounds = "dimos_msgs/msg/RegionBounds" +map_regions = "dimos_msgs/msg/PointCloudRegion" [dependencies] -dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "6663bcb6e5e18f43a6cb9cf77ccbec613e310443" } -lcm-msgs = { git = "https://github.com/dimensionalOS/dimos-lcm.git", branch = "rust-codegen" } +dimos-module = { path = "../../../../native/rust/dimos-module", features = ["cdr"] } +dimos-generated-messages = { path = "../../../../build/message-source/rust" } tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal"] } serde = { version = "1", features = ["derive"] } ahash = "0.8" diff --git a/dimos/mapping/ray_tracing/rust/flake.nix b/dimos/mapping/ray_tracing/rust/flake.nix index 13dbb3a9ffb..9c4bd76461f 100644 --- a/dimos/mapping/ray_tracing/rust/flake.nix +++ b/dimos/mapping/ray_tracing/rust/flake.nix @@ -15,7 +15,30 @@ pkgs = nixpkgs.legacyPackages.${system}; name = "dimos-voxel-ray-tracing"; - src = nix-filter.lib { root = ./.; exclude = [ "target" "build" "result" "__pycache__" ]; }; + moduleSource = nix-filter.lib { root = ./.; exclude = [ "target" "build" "result" "__pycache__" ]; }; + sharedArchive = pkgs.fetchurl { + url = "https://codeload.github.com/dimensionalOS/dimos/tar.gz/d5f801d7dd0208731bab566d079bae7abe6278f1"; + sha256 = "596db1c5658ac5e2f4b51b6d1ce8bcc4be9b590f718e3d2281faf61b4744c646"; + }; + sharedSource = pkgs.runCommand "dimos-ray-tracing-cdr-source-input" { + nativeBuildInputs = [ pkgs.gnutar pkgs.gzip ]; + } '' + mkdir -p $out + tar -xzf ${sharedArchive} --strip-components=1 -C $out + ''; + messageSource = (import "${sharedSource}/native/message-source.nix" { inherit pkgs; }).source; + src = pkgs.runCommand "ray-tracing-cdr-source" { } '' + cp -r ${moduleSource} $out + chmod -R u+w $out + mkdir -p $out/sdk + cp -r ${sharedSource}/native/rust/dimos-module ${sharedSource}/native/rust/dimos-module-macros $out/sdk/ + cp -r ${messageSource}/rust $out/messages + substituteInPlace $out/Cargo.toml \ + --replace-fail '../../../../native/rust/dimos-module' 'sdk/dimos-module' \ + --replace-fail '../../../../build/message-source/rust' 'messages' \ + --replace-fail '[workspace]' '[workspace] + exclude = ["sdk/dimos-module", "sdk/dimos-module-macros", "messages"]' + ''; generated = crate2nix.tools.${system}.generatedCargoNix { inherit name src; }; diff --git a/dimos/mapping/ray_tracing/rust/src/lib.rs b/dimos/mapping/ray_tracing/rust/src/lib.rs index 34edbda1ca8..d06ec2b9248 100644 --- a/dimos/mapping/ray_tracing/rust/src/lib.rs +++ b/dimos/mapping/ray_tracing/rust/src/lib.rs @@ -16,3 +16,5 @@ pub mod mapper; pub mod module; pub mod region_viz; pub mod voxel_ray_tracer; + +mod wire; diff --git a/dimos/mapping/ray_tracing/rust/src/module.rs b/dimos/mapping/ray_tracing/rust/src/module.rs index 0bb2fc6d4e9..89f6072e33f 100644 --- a/dimos/mapping/ray_tracing/rust/src/module.rs +++ b/dimos/mapping/ray_tracing/rust/src/module.rs @@ -21,13 +21,19 @@ use crate::voxel_ray_tracer::{ partition_seed, region_at, region_of, Cell, ChunkKey, Config, Cylinder, SeedPartition, SeedRegion, }; -use dimos_module::pointcloud::extract_xyz; +use crate::wire::{decode_tf, encode, encode_tf, extract_xyz}; +use dimos_generated_messages::builtin_interfaces::msg::time::Time; +use dimos_generated_messages::dimos_msgs::msg::{ + point_cloud_region::PointCloudRegion, region_bounds::RegionBounds, +}; +use dimos_generated_messages::geometry_msgs::msg::point::Point; +use dimos_generated_messages::sensor_msgs::msg::{ + point_cloud2::PointCloud2, point_field::PointField, +}; +use dimos_generated_messages::std_msgs::msg::header::Header; use dimos_module::{ debug_throttled, error_throttled, warn_throttled, Input, Module, Output, Tf, Transform, }; -use lcm_msgs::geometry_msgs::{Point, Pose as PoseMsg, PoseStamped, Quaternion}; -use lcm_msgs::sensor_msgs::{PointCloud2, PointField}; -use lcm_msgs::std_msgs::{Header, Time}; use tokio::sync::mpsc; use tokio::sync::mpsc::error::TryRecvError; use tokio::task::JoinHandle; @@ -53,42 +59,41 @@ const SEED_STARVED_WARN_AFTER: Duration = Duration::from_secs(5); #[derive(Module)] #[module(name = "ray_tracing", setup = spawn_worker, teardown = stop_worker)] pub struct RayTracingVoxelMap { - #[input(decode = PointCloud2::decode, handler = on_lidar)] + #[input(decode = dimos_module::cdr::decode, handler = on_lidar)] lidar: Input, // An externally loaded map cloud. Only the first one seeds the map. - #[input(decode = PointCloud2::decode, handler = on_loaded_map)] + #[input(decode = dimos_module::cdr::decode, handler = on_loaded_map)] loaded_map: Input, - #[tf] + #[tf(decode = decode_tf, encode = encode_tf)] tf: Tf, - #[output(encode = PointCloud2::encode)] + #[output(encode = encode)] global_map: Output, - #[output(encode = PointCloud2::encode)] + #[output(encode = encode)] local_map: Output, - #[output(encode = PointCloud2::encode)] + #[output(encode = encode)] local_map_fine: Output, - // Cylinder bounds of the local map. Position is the center, orientation holds - // radius, z_min, z_max. Stamped like local_map so consumers pair them. - #[output(encode = PoseStamped::encode)] - region_bounds: Output, + // Explicit cylinder dimensions, stamped like local_map so consumers pair them. + #[output(encode = encode)] + region_bounds: Output, // The map for viewers, one region cell per message with the cell packed in - // the header seq. - #[output(encode = PointCloud2::encode)] - map_regions: Output, + // the explicit region_id. + #[output(encode = encode)] + map_regions: Output, // One region of a seeded map as it lands, gated like local_map. seed_bounds // carries its cylinder like region_bounds. - #[output(encode = PointCloud2::encode)] - seed_map: Output, + #[output(encode = encode)] + seed_map: Output, - #[output(encode = PoseStamped::encode)] - seed_bounds: Output, + #[output(encode = encode)] + seed_bounds: Output, #[config] config: Config, @@ -310,17 +315,17 @@ struct Worker { global_map: Output, local_map: Output, local_map_fine: Output, - region_bounds: Output, - map_regions: Output, - seed_map: Output, - seed_bounds: Output, + region_bounds: Output, + map_regions: Output, + seed_map: Output, + seed_bounds: Output, } impl Worker { async fn run(mut self) { let mut state = State { mapper: Mapper::new(self.config.clone()), - last_frame_stamp: Time::default(), + last_frame_stamp: Time { sec: 0, nanosec: 0 }, seed: SeedState::Idle, viz: RegionSweep::default(), }; @@ -437,7 +442,7 @@ impl Worker { // Bounds pair with local_map by stamp, so publish them on its cadence. if let Some(c) = region { - let bounds_msg = bounds_to_pose(&c, out_frame_id, stamp.clone()); + let bounds_msg = bounds_message(&c, out_frame_id, stamp.clone()); publish_bounds(&self.region_bounds, &bounds_msg).await; } @@ -466,7 +471,7 @@ impl Worker { } /// Publish the map region cells due this viz tick, the cell in each - /// header seq. + /// explicit region_id. async fn publish_map_regions(&self, state: &mut State, stamp: &Time) { let due = tokio::task::block_in_place(|| { map_regions_due( @@ -478,9 +483,13 @@ impl Worker { ) }); for (cell, points) in due { - let mut cloud = points_to_cloud(&points, &self.config.world_frame, stamp.clone()); - cloud.header.seq = pack_cell(cell); - publish_cloud(&self.map_regions, &cloud).await; + let cloud = points_to_cloud(&points, &self.config.world_frame, stamp.clone()); + let region = PointCloudRegion { + header: cloud.header.clone(), + region_id: pack_cell(cell), + cloud, + }; + publish_cloud(&self.map_regions, ®ion).await; } } @@ -563,7 +572,7 @@ impl Worker { } /// Publish one seeded region as the map now holds it. Cloud and bounds - /// carry the region number in their header seq, which consumers pair on. + /// carry the region number in their explicit region_id, which consumers pair on. async fn publish_seed_region( &self, mapper: &Mapper, @@ -580,19 +589,23 @@ impl Worker { } /// One seeded region as its bounds and cloud messages, both stamped alike -/// with the region number in their header seq. +/// with the region number in their explicit region_id. fn seed_region_messages( cylinder: &Cylinder, points: &[f32], seq: i32, frame_id: &str, stamp: &Time, -) -> (PoseStamped, PointCloud2) { - let mut bounds = bounds_to_pose(cylinder, frame_id, stamp.clone()); - bounds.header.seq = seq; - let mut cloud = points_to_cloud(points, frame_id, stamp.clone()); - cloud.header.seq = seq; - (bounds, cloud) +) -> (RegionBounds, PointCloudRegion) { + let mut bounds = bounds_message(cylinder, frame_id, stamp.clone()); + bounds.region_id = seq; + let cloud = points_to_cloud(points, frame_id, stamp.clone()); + let region = PointCloudRegion { + header: cloud.header.clone(), + region_id: seq, + cloud, + }; + (bounds, region) } /// The regions due this viz tick with their points: those whose chunks @@ -657,35 +670,29 @@ fn prepare_seed( const LOADED_MAP_TF_WAIT_TIMEOUT: Duration = Duration::from_secs(2); fn time_secs(t: &Time) -> f64 { - t.sec as f64 + t.nsec as f64 * 1e-9 + t.sec as f64 + t.nanosec as f64 * 1e-9 } -/// A cylinder as the bounds message: position is the center, orientation -/// holds radius, z_min, z_max. -fn bounds_to_pose(c: &Cylinder, frame_id: &str, stamp: Time) -> PoseStamped { - PoseStamped { +/// Explicit cylinder bounds, stamped like the paired cloud. +fn bounds_message(c: &Cylinder, frame_id: &str, stamp: Time) -> RegionBounds { + RegionBounds { header: Header { - seq: 0, stamp, frame_id: frame_id.to_string(), }, - pose: PoseMsg { - position: Point { - x: c.cx as f64, - y: c.cy as f64, - z: 0.0, - }, - orientation: Quaternion { - x: c.radius as f64, - y: c.z_min as f64, - z: c.z_max as f64, - w: 0.0, - }, + region_id: 0, + center: Point { + x: c.cx as f64, + y: c.cy as f64, + z: 0.0, }, + radius: c.radius as f64, + z_min: c.z_min as f64, + z_max: c.z_max as f64, } } -async fn publish_bounds(out: &Output, msg: &PoseStamped) { +async fn publish_bounds(out: &Output, msg: &RegionBounds) { if let Err(e) = out.publish(msg).await { error_throttled!( Duration::from_secs(1), @@ -711,7 +718,7 @@ fn tf_to_pose(t: &Transform) -> Pose { } } -fn write_point(data: &mut Vec, n: &mut i32, x: f32, y: f32, z: f32) { +fn write_point(data: &mut Vec, n: &mut u32, x: f32, y: f32, z: f32) { data.extend_from_slice(&x.to_le_bytes()); data.extend_from_slice(&y.to_le_bytes()); data.extend_from_slice(&z.to_le_bytes()); @@ -719,16 +726,15 @@ fn write_point(data: &mut Vec, n: &mut i32, x: f32, y: f32, z: f32) { *n += 1; } -fn make_cloud(data: Vec, n: i32, frame_id: &str, stamp: Time) -> PointCloud2 { - let make_field = |name: &str, off: i32| PointField { +fn make_cloud(data: Vec, n: u32, frame_id: &str, stamp: Time) -> PointCloud2 { + let make_field = |name: &str, off: u32| PointField { name: name.into(), offset: off, - datatype: PointField::FLOAT32 as u8, + datatype: PointField::FLOAT32, count: 1, }; PointCloud2 { header: Header { - seq: 0, stamp, frame_id: frame_id.into(), }, @@ -751,14 +757,14 @@ fn make_cloud(data: Vec, n: i32, frame_id: &str, stamp: Time) -> PointCloud2 /// Pack flat (x, y, z) triples into an LCM cloud message. fn points_to_cloud(points: &[f32], frame_id: &str, stamp: Time) -> PointCloud2 { let mut data = Vec::with_capacity((points.len() / 3) * 16); - let mut n: i32 = 0; + let mut n: u32 = 0; for p in points.as_chunks::<3>().0 { write_point(&mut data, &mut n, p[0], p[1], p[2]); } make_cloud(data, n, frame_id, stamp) } -async fn publish_cloud(out: &Output, cloud: &PointCloud2) { +async fn publish_cloud(out: &Output, cloud: &T) { if let Err(e) = out.publish(cloud).await { error_throttled!( Duration::from_secs(1), @@ -848,7 +854,7 @@ mod tests { UnitQuaternion::from_axis_angle(&Vector3::z_axis(), std::f64::consts::FRAC_PI_2), ); let t = Transform::new("odom", "map", 0.0, iso); - let cloud = points_to_cloud(&[3.5, 0.0, 0.5], "map", Time::default()); + let cloud = points_to_cloud(&[3.5, 0.0, 0.5], "map", Time { sec: 0, nanosec: 0 }); let part = prepare_seed(&cloud, tf_to_pose(&t), 1.0, (0.0, 0.0, 0.0), 4.0) .expect("loaded map must decode"); @@ -859,7 +865,7 @@ mod tests { assert_eq!(created, 1); let region = mapper.local_points(&part.regions[0].cylinder.bounds()); - let seeded = points_to_cloud(®ion, "odom", Time::default()); + let seeded = points_to_cloud(®ion, "odom", Time { sec: 0, nanosec: 0 }); assert!(cloud_points(&seeded).contains(&voxel_center(10, 3, 0))); } @@ -895,14 +901,14 @@ mod tests { } fn lidar_job(seq: i32) -> Job { - let mut cloud = PointCloud2::default(); - cloud.header.seq = seq; + let mut cloud = points_to_cloud(&[], "", Time { sec: 0, nanosec: 0 }); + cloud.header.stamp.nanosec = seq as u32; Job::Lidar(cloud, Instant::now()) } fn lidar_seq(turn: Turn) -> Option { match turn { - Turn::Job(Job::Lidar(cloud, _)) => Some(cloud.header.seq), + Turn::Job(Job::Lidar(cloud, _)) => Some(cloud.header.stamp.nanosec as i32), _ => None, } } @@ -973,18 +979,63 @@ mod tests { } #[test] - fn seed_region_messages_pair_on_seq_and_stamp() { + fn cdr_seed_regions_keep_explicit_ids_and_epoch_nanoseconds() { + let stamp = Time { + sec: 1_700_000_000, + nanosec: 123_456_789, + }; + let cylinder = Cylinder { + cx: 1., + cy: -2., + radius: 3., + z_min: -1., + z_max: 4., + }; + for id in [i32::MIN, 0, i32::MAX] { + let (bounds, region) = + seed_region_messages(&cylinder, &[1., 2., 3.], id, "odom", &stamp); + for little in [false, true] { + let bounds_bytes = dimos_module::cdr::encode_endian(&bounds, little).unwrap(); + let cloud_bytes = dimos_module::cdr::encode_endian(®ion, little).unwrap(); + let received_bounds: RegionBounds = + dimos_module::cdr::decode(&bounds_bytes).unwrap(); + let received_cloud: PointCloudRegion = + dimos_module::cdr::decode(&cloud_bytes).unwrap(); + assert_eq!( + (received_bounds.region_id, received_cloud.region_id), + (id, id) + ); + assert_eq!(received_bounds.header, received_cloud.header); + assert_eq!(received_cloud.cloud.header.stamp, stamp); + assert_eq!( + ( + received_bounds.center.y, + received_bounds.radius, + received_bounds.z_min + ), + (-2., 3., -1.) + ); + assert_eq!( + extract_xyz(&received_cloud.cloud).unwrap(), + vec![[1., 2., 3.]] + ); + } + } + } + + #[test] + fn seed_region_messages_pair_on_region_id_and_stamp() { let part = two_region_seed(); - let stamp = Time { sec: 7, nsec: 9 }; + let stamp = Time { sec: 7, nanosec: 9 }; for (index, region) in part.regions.iter().enumerate() { let seq = index as i32 + 1; let (bounds, cloud) = seed_region_messages(®ion.cylinder, &[1.5, 1.5, 0.5], seq, "odom", &stamp); - assert_eq!((bounds.header.seq, cloud.header.seq), (seq, seq)); + assert_eq!((bounds.region_id, cloud.region_id), (seq, seq)); assert_eq!(bounds.header.stamp, stamp); assert_eq!(cloud.header.stamp, stamp); - assert_eq!(bounds.pose.position.x, region.cylinder.cx as f64); - assert_eq!(cloud.width, 1); + assert_eq!(bounds.center.x, region.cylinder.cx as f64); + assert_eq!(cloud.cloud.width, 1); } } @@ -1045,7 +1096,7 @@ mod tests { assert_eq!(occupied, vec![(3, -2, 1)]); // Encode and decode the occupied voxel center exactly as the port would. - let cloud = points_to_cloud(&[3.5, -1.5, 1.5], "world", Time::default()); + let cloud = points_to_cloud(&[3.5, -1.5, 1.5], "world", Time { sec: 0, nanosec: 0 }); let Ok(points) = extract_xyz(&cloud) else { panic!("occupied cloud must decode"); }; @@ -1072,12 +1123,12 @@ mod tests { let global = points_to_cloud( &emit_points(&map, 1.0, None, &live), "world", - Time::default(), + Time { sec: 0, nanosec: 0 }, ); let local = points_to_cloud( &emit_points(&map, 1.0, Some(&cylinder), &live), "world", - Time::default(), + Time { sec: 0, nanosec: 0 }, ); assert!(cloud_points(&global).contains(&voxel_center(0, 0, 0))); assert!(cloud_points(&local).contains(&voxel_center(0, 0, 0))); @@ -1097,12 +1148,12 @@ mod tests { let global = points_to_cloud( &emit_points(&map, 1.0, None, &live), "world", - Time::default(), + Time { sec: 0, nanosec: 0 }, ); let local = points_to_cloud( &emit_points(&map, 1.0, Some(&cylinder), &live), "world", - Time::default(), + Time { sec: 0, nanosec: 0 }, ); assert!(cloud_points(&global).contains(&voxel_center(5, 0, 0))); assert!(!cloud_points(&local).contains(&voxel_center(5, 0, 0))); @@ -1123,12 +1174,12 @@ mod tests { let global = points_to_cloud( &emit_points(&map, 1.0, None, &live), "world", - Time::default(), + Time { sec: 0, nanosec: 0 }, ); let local = points_to_cloud( &emit_points(&map, 1.0, Some(&cylinder), &live), "world", - Time::default(), + Time { sec: 0, nanosec: 0 }, ); assert!(cloud_points(&global).contains(&voxel_center(0, 0, 5))); assert!(!cloud_points(&local).contains(&voxel_center(0, 0, 5))); @@ -1151,12 +1202,12 @@ mod tests { let global = points_to_cloud( &emit_points(&map, 1.0, None, &live), "world", - Time::default(), + Time { sec: 0, nanosec: 0 }, ); let local = points_to_cloud( &emit_points(&map, 1.0, Some(&cylinder), &live), "world", - Time::default(), + Time { sec: 0, nanosec: 0 }, ); assert!(cloud_points(&global).contains(&voxel_center(1, 0, 0))); assert!(cloud_points(&global).contains(&voxel_center(10, 10, 10))); @@ -1189,7 +1240,7 @@ mod tests { let local = points_to_cloud( &emit_points(&map, 1.0, Some(&cylinder), &live), "world", - Time::default(), + Time { sec: 0, nanosec: 0 }, ); let pts = cloud_points(&local); assert!(pts.contains(&voxel_center(1, 1, 0)), "dense patch kept"); diff --git a/dimos/mapping/ray_tracing/rust/src/wire.rs b/dimos/mapping/ray_tracing/rust/src/wire.rs new file mode 100644 index 00000000000..840c6c8bb42 --- /dev/null +++ b/dimos/mapping/ray_tracing/rust/src/wire.rs @@ -0,0 +1,214 @@ +// Copyright 2026 Dimensional Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Generated CDR and TF boundary adapters for the numeric voxel mapper. + +use dimos_generated_messages::builtin_interfaces::msg::time::Time; +use dimos_generated_messages::sensor_msgs::msg::{ + point_cloud2::PointCloud2, point_field::PointField, +}; +use dimos_generated_messages::std_msgs::msg::header::Header; +use dimos_module::cdr; +use dimos_module::pointcloud::{extract_xyz_rows, ExtractError}; + +pub fn encode(value: &T) -> Vec { + cdr::encode(value).expect("serialize a valid generated map value") +} + +fn nanoseconds(time: &Time) -> i64 { + time.sec as i64 * 1_000_000_000 + time.nanosec as i64 +} + +pub fn extract_xyz(cloud: &PointCloud2) -> Result, ExtractError> { + let offset = |name: &str| { + cloud + .fields + .iter() + .find(|f| f.name == name && f.datatype == PointField::FLOAT32 && f.count == 1) + .map(|f| f.offset as usize) + .ok_or(ExtractError("missing scalar float32 XYZ field")) + }; + extract_xyz_rows( + &cloud.data, + [cloud.width as usize, cloud.height as usize], + [cloud.point_step as usize, cloud.row_step as usize], + [offset("x")?, offset("y")?, offset("z")?], + cloud.is_bigendian, + ) +} + +pub fn decode_tf(bytes: &[u8]) -> std::io::Result> { + use dimos_generated_messages::tf2_msgs::msg::tf_message::TFMessage; + use dimos_module::nalgebra::{Quaternion, Translation3, UnitQuaternion}; + let message: TFMessage = cdr::decode(bytes)?; + message + .transforms + .into_iter() + .map(|edge| { + let p = edge.transform.translation; + let q = edge.transform.rotation; + if ![p.x, p.y, p.z, q.x, q.y, q.z, q.w] + .iter() + .all(|v| v.is_finite()) + { + return Err(std::io::Error::new( + std::io::ErrorKind::InvalidData, + "nonfinite TF components", + )); + } + let rotation = UnitQuaternion::try_new(Quaternion::new(q.w, q.x, q.y, q.z), 1e-9) + .ok_or_else(|| { + std::io::Error::new(std::io::ErrorKind::InvalidData, "zero TF quaternion") + })?; + if edge.header.stamp.nanosec >= 1_000_000_000 { + return Err(std::io::Error::new( + std::io::ErrorKind::InvalidData, + "unnormalized TF stamp", + )); + } + Ok(dimos_module::tf::Transform::from_nanoseconds( + edge.header.frame_id, + edge.child_frame_id, + nanoseconds(&edge.header.stamp), + dimos_module::nalgebra::Isometry3::from_parts( + Translation3::new(p.x, p.y, p.z), + rotation, + ), + )) + }) + .collect() +} + +pub fn encode_tf(transforms: &[dimos_module::tf::Transform]) -> std::io::Result> { + use dimos_generated_messages::{ + geometry_msgs::msg::{ + quaternion::Quaternion, transform::Transform, transform_stamped::TransformStamped, + vector3::Vector3, + }, + tf2_msgs::msg::tf_message::TFMessage, + }; + let transforms = transforms + .iter() + .map(|value| { + let ns = value.stamp_nanoseconds().ok_or_else(|| { + std::io::Error::new( + std::io::ErrorKind::InvalidInput, + "TF timestamp is outside range", + ) + })?; + let sec = i32::try_from(ns.div_euclid(1_000_000_000)).map_err(|_| { + std::io::Error::new( + std::io::ErrorKind::InvalidInput, + "TF seconds exceed ROS int32", + ) + })?; + let p = value.translation(); + let q = value.rotation(); + Ok(TransformStamped { + header: Header { + stamp: Time { + sec, + nanosec: ns.rem_euclid(1_000_000_000) as u32, + }, + frame_id: value.parent.clone(), + }, + child_frame_id: value.child.clone(), + transform: Transform { + translation: Vector3 { + x: p.x, + y: p.y, + z: p.z, + }, + rotation: Quaternion { + x: q.i, + y: q.j, + z: q.k, + w: q.w, + }, + }, + }) + }) + .collect::>>()?; + cdr::encode(&TFMessage { transforms }) +} + +#[cfg(test)] +mod tests { + use super::*; + use dimos_generated_messages::tf2_msgs::msg::tf_message::TFMessage; + use dimos_module::nalgebra::Isometry3; + + #[test] + fn tf_cdr_retains_exact_stamps_through_both_wire_orders() { + for ns in [0, -1, 1_700_000_000_123_456_789] { + let transform = dimos_module::tf::Transform::from_nanoseconds( + "odom", + "lidar", + ns, + Isometry3::identity(), + ); + let message: TFMessage = cdr::decode(&encode_tf(&[transform]).unwrap()).unwrap(); + for little in [false, true] { + let decoded = decode_tf(&cdr::encode_endian(&message, little).unwrap()).unwrap(); + assert_eq!(decoded[0].stamp_nanoseconds(), Some(ns)); + let received: TFMessage = cdr::decode(&encode_tf(&decoded).unwrap()).unwrap(); + assert_eq!(received, message); + } + } + } + + #[test] + fn organized_cloud_reader_keeps_endian_and_row_padding_and_filters_missing_points() { + let mut data = vec![0; 80]; + for (offset, point) in [ + (0, [1_f32, 2., 3.]), + (16, [4., 5., 6.]), + (40, [7., 8., 9.]), + (56, [f32::NAN, 0., 0.]), + ] { + for (i, value) in point.iter().enumerate() { + data[offset + i * 4..offset + i * 4 + 4].copy_from_slice(&value.to_be_bytes()); + } + } + let mut cloud = PointCloud2 { + header: Header { + stamp: Time { sec: 0, nanosec: 0 }, + frame_id: "lidar".into(), + }, + height: 2, + width: 2, + fields: ["x", "y", "z"] + .into_iter() + .enumerate() + .map(|(i, n)| PointField { + name: n.into(), + offset: (i * 4) as u32, + datatype: PointField::FLOAT32, + count: 1, + }) + .collect(), + is_bigendian: true, + point_step: 16, + row_step: 40, + data, + is_dense: false, + }; + assert_eq!( + extract_xyz(&cloud).unwrap(), + vec![[1., 2., 3.], [4., 5., 6.], [7., 8., 9.]] + ); + cloud.row_step = 12; + assert!(extract_xyz(&cloud).is_err()); + } +} diff --git a/dimos/mapping/ray_tracing/test_generated_native.py b/dimos/mapping/ray_tracing/test_generated_native.py new file mode 100644 index 00000000000..1c7312fa83b --- /dev/null +++ b/dimos/mapping/ray_tracing/test_generated_native.py @@ -0,0 +1,210 @@ +# Copyright 2026 Dimensional Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from contextlib import ExitStack +from copy import deepcopy +import json +import os +from pathlib import Path +import socket +from threading import Event, Lock +import time + +import numpy as np +import pytest +import zenoh + +from dimos.core.cdr_transport import CdrTransport +from dimos.core.global_config import global_config +from dimos.mapping.ray_tracing.module import RayTracingVoxelMap +from dimos.messages.dimos_msgs.msg import PointCloudRegion, RegionBounds +from dimos.messages.geometry_msgs.msg import Quaternion, Transform, TransformStamped, Vector3 +from dimos.messages.sensor_msgs.msg import PointCloud2 +from dimos.messages.std_msgs.msg import Header +from dimos.messages.tf2_msgs.msg import TFMessage +from dimos.msgs.pointcloud import pointcloud_from_xyz, pointcloud_xyz +from dimos.msgs.time import time_from_nanoseconds, to_nanoseconds +from dimos.protocol.rpc.pubsubrpc import LCMRPC +from dimos.protocol.service.zenohservice import ZenohConfig + + +class MemoryRPC(LCMRPC): + def __init__(self, **kwargs): + super().__init__(url="memq://", **kwargs) + + +def test_native_mapper_declares_canonical_cloud_and_region_ports(): + module = RayTracingVoxelMap(rpc_transport=MemoryRPC) + try: + assert module.lidar.type is PointCloud2 and module.global_map.type is PointCloud2 + assert ( + module.map_regions.type is PointCloudRegion and module.seed_map.type is PointCloudRegion + ) + assert module.region_bounds.type is RegionBounds and module.seed_bounds.type is RegionBounds + assert module.tf.type is TFMessage + finally: + module.stop() + + +def test_actual_native_mapper_cdr_registered_clouds_keyed_regions_and_seed_pair(monkeypatch): + executable = os.environ.get("DIMOS_NATIVE_RAY_TRACING_BINARY") + if not executable: + pytest.skip("Set DIMOS_NATIVE_RAY_TRACING_BINARY to the compiled voxel_ray_tracing") + binary = Path(executable).resolve() + assert binary.is_file() + monkeypatch.setattr(global_config, "transport", "zenoh") + with socket.socket() as reservation: + reservation.bind(("127.0.0.1", 0)) + endpoint = f"tcp/127.0.0.1:{reservation.getsockname()[1]}" + config = zenoh.Config() + for key, value in { + "mode": "router", + "listen/endpoints": [endpoint], + "scouting/multicast/enabled": False, + "scouting/gossip/enabled": False, + }.items(): + config.insert_json5(key, json.dumps(value)) + with ExitStack() as cleanup: + cleanup.enter_context(zenoh.open(config)) + session = ZenohConfig( + mode="client", + connect=[endpoint], + listen=[], + scouting=False, + multicast=False, + gossip=False, + connect_timeout=5, + ) + module = RayTracingVoxelMap( + rpc_transport=MemoryRPC, + executable=str(binary), + source_dir=None, + build_command=None, + session=session, + voxel_size=0.1, + support_min=0, + min_health=0, + max_health=1, + emit_every=1, + global_emit_every=1, + viz_emit_every=1, + viz_cell_m=4, + world_frame="odom", + ) + names = [ + "lidar", + "loaded_map", + "tf", + "global_map", + "local_map", + "local_map_fine", + "region_bounds", + "map_regions", + "seed_map", + "seed_bounds", + ] + wires = {} + for name in names: + port = getattr(module, name) + wire = CdrTransport( + "native/ray/" + name, port.type, backend="zenoh", **session.model_dump() + ) + port.transport = wire + wires[name] = wire + cleanup.callback(wire.stop) + cleanup.callback(module.stop) + live_names = ["global_map", "region_bounds", "map_regions"] + seed_names = ["seed_map", "seed_bounds"] + received = {name: {} for name in live_names + seed_names} + live_ready, seed_ready = Event(), Event() + lock = Lock() + + def receive(name, value): + stamp = to_nanoseconds(value.header.stamp) + group = seed_names if name in seed_names else live_names + key = (stamp, value.region_id) if name in seed_names else stamp + with lock: + received[name].setdefault(key, value) + if set.intersection(*(set(received[n]) for n in group)): + (seed_ready if name in seed_names else live_ready).set() + + for name in received: + cleanup.callback(wires[name].subscribe(lambda value, name=name: receive(name, value))) + module.start() + epoch = 1700000000123456789 + sequence = 0 + source_stamps = set() + + def tf_and_header(): + nonlocal sequence + header = Header(frame_id="odom", stamp=time_from_nanoseconds(epoch + sequence)) + source_stamps.add(epoch + sequence) + sequence += 1 + wires["tf"].publish( + TFMessage( + transforms=[ + TransformStamped( + header=deepcopy(header), + child_frame_id=child, + transform=Transform( + translation=Vector3(x=x, y=0, z=0), + rotation=Quaternion(x=0, y=0, z=0, w=1), + ), + ) + for child, x in [("lidar", 0), ("map", 1)] + ] + ) + ) + return header + + deadline = time.monotonic() + 15 + while not live_ready.is_set() and time.monotonic() < deadline: + header = tf_and_header() + header.frame_id = "lidar" + wires["lidar"].publish( + pointcloud_from_xyz( + np.array([[4.15, -0.85, 0.25], [4.15, -0.85, 0.35]], dtype=np.float32), + header=header, + ) + ) + live_ready.wait(0.15) + assert live_ready.is_set(), "No matching generated cloud/region/bounds batch" + with lock: + stamp = max(set.intersection(*(set(received[n]) for n in live_names))) + cloud, bounds, region = [received[n][stamp] for n in live_names] + assert stamp in source_stamps + assert type(cloud) is PointCloud2 and cloud.header.frame_id == "odom" + assert bounds.center.x == bounds.center.y == 0 and bounds.radius > 4 + assert region.region_id == (1 << 16) | 0xFFFF + assert region.header == region.cloud.header + assert len(pointcloud_xyz(region.cloud)) == 2 + np.testing.assert_allclose(pointcloud_xyz(cloud)[:, 0], 4.15, atol=0.05) + + deadline = time.monotonic() + 15 + while not seed_ready.is_set() and time.monotonic() < deadline: + header = tf_and_header() + header.frame_id = "map" + wires["loaded_map"].publish( + pointcloud_from_xyz(np.array([[7.15, 2.15, 0.25]], dtype=np.float32), header=header) + ) + seed_ready.wait(0.15) + assert seed_ready.is_set(), "No paired canonical seed region and bounds" + with lock: + key = max(set.intersection(*(set(received[n]) for n in seed_names))) + seeded, seed_bounds = [received[n][key] for n in seed_names] + assert key[0] in source_stamps and seeded.region_id == seed_bounds.region_id + assert seeded.header == seed_bounds.header == seeded.cloud.header + assert seeded.cloud.header.frame_id == "odom" + np.testing.assert_allclose(pointcloud_xyz(seeded.cloud)[:, 0], 8.15, atol=0.05) + assert module._process is not None and module._process.poll() is None diff --git a/dimos/mapping/ray_tracing/test_transformer.py b/dimos/mapping/ray_tracing/test_transformer.py index 378c1058fc5..c19cd05cf5b 100644 --- a/dimos/mapping/ray_tracing/test_transformer.py +++ b/dimos/mapping/ray_tracing/test_transformer.py @@ -22,16 +22,27 @@ pytest.importorskip("dimos_voxel_ray_tracing") +from dimos_cdrgen.registry import encode + from dimos.mapping.ray_tracing.module import TF_MATCH_TOLERANCE_S from dimos.mapping.ray_tracing.transformer import RayTraceMap, pose_from_tf from dimos.mapping.ray_tracing.voxel_map import VoxelRayMapper from dimos.memory.store.sqlite import SqliteStore from dimos.memory.tf import StreamTF from dimos.memory.type.observation import Observation -from dimos.msgs.geometry_msgs.Transform import Transform -from dimos.msgs.geometry_msgs.Vector3 import Vector3 -from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 -from dimos.msgs.tf2_msgs.TFMessage import TFMessage +from dimos.messages.geometry_msgs.msg import Transform, TransformStamped, Vector3 +from dimos.messages.sensor_msgs.msg import PointCloud2 +from dimos.messages.std_msgs.msg import Header +from dimos.messages.tf2_msgs.msg import TFMessage +from dimos.msgs.geometry import quaternion_from_euler +from dimos.msgs.pointcloud import pointcloud_from_xyz +from dimos.msgs.time import time_from_nanoseconds, time_from_seconds, to_nanoseconds + + +def _cloud(points, frame_id="lidar", timestamp=0.0): + return pointcloud_from_xyz( + points, header=Header(frame_id=frame_id, stamp=time_from_seconds(timestamp)) + ) def _default_margin() -> float: @@ -46,7 +57,7 @@ def _obs( id=0, ts=ts, pose=pose, - _data=PointCloud2.from_numpy(points), + _data=_cloud(points, timestamp=ts), ) @@ -62,11 +73,27 @@ def test_emit_every_n_yields_on_cadence_and_flushes_remainder() -> None: results = list(RayTraceMap(emit_every=3)(iter(obs))) assert [r.tags["frame_count"] for r in results] == [3, 6, 7] + assert [to_nanoseconds(r.data.header.stamp) for r in results] == [ + 2000000000, + 5000000000, + 6000000000, + ] + + +@pytest.mark.parametrize("stamp_ns", [-1, 0, 1700000000123456789]) +def test_accumulation_keeps_exact_source_stamp_and_does_not_mutate_input(stamp_ns) -> None: + source = _obs(_cube(), ts=stamp_ns / 1e9, pose=(0, 0, 0)) + source.data.header.stamp = time_from_nanoseconds(stamp_ns) + before = encode(source.data) + [result] = list(RayTraceMap()(iter([source]))) + assert result.data.header.frame_id == "world" + assert to_nanoseconds(result.data.header.stamp) == stamp_ns + assert encode(source.data) == before def test_poseless_obs_are_skipped() -> None: points = _cube() - poseless = Observation(id=1, ts=0.0, pose=None, _data=PointCloud2.from_numpy(points)) + poseless = Observation(id=1, ts=0.0, pose=None, _data=_cloud(points, timestamp=0.0)) posed = _obs(points, ts=1.0, pose=(0.0, 0.0, 0.0)) results = list(RayTraceMap()(iter([poseless, posed]))) @@ -119,7 +146,7 @@ def test_registers_sensor_frame_cloud_by_pose() -> None: id=0, ts=1.0, pose=(5.0, 0.0, 2.0, 0.0, s, 0.0, s), - _data=PointCloud2.from_numpy(point), + _data=_cloud(point), ) [emitted] = list(rtm(iter([obs]))) @@ -147,15 +174,16 @@ def test_reused_instance_continues_the_map() -> None: def test_pose_from_tf_attaches_the_pose_at_the_stamp(tmp_path: Path) -> None: ts = 10.0 with SqliteStore(path=str(tmp_path / "tf.db")) as store: - edge = Transform( - frame_id="world", + edge = TransformStamped( + header=Header(frame_id="world", stamp=time_from_seconds(ts)), child_frame_id="lidar", - translation=Vector3(1.0, 2.0, 3.0), - ts=ts, + transform=Transform( + translation=Vector3(x=1, y=2, z=3), rotation=quaternion_from_euler(0, 0, 0) + ), ) - store.stream("tf", TFMessage).append(TFMessage(edge), ts=ts, pose=None) + store.stream("tf", TFMessage).append(TFMessage(transforms=[edge]), ts=ts, pose=None) tf = StreamTF(store.stream("tf", TFMessage)) - cloud = PointCloud2.from_numpy(_cube(), frame_id="lidar") + cloud = _cloud(_cube(), frame_id="lidar") matched = Observation(id=0, ts=ts, _data=cloud) far = Observation(id=1, ts=ts + 10 * TF_MATCH_TOLERANCE_S, _data=cloud) diff --git a/dimos/mapping/ray_tracing/test_viz.py b/dimos/mapping/ray_tracing/test_viz.py index 6c8d0e0eaa3..9ebd58736aa 100644 --- a/dimos/mapping/ray_tracing/test_viz.py +++ b/dimos/mapping/ray_tracing/test_viz.py @@ -15,7 +15,18 @@ import numpy as np from dimos.mapping.ray_tracing.viz import render_map_region, voxel_map_points -from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 +from dimos.messages.dimos_msgs.msg import PointCloudRegion +from dimos.messages.std_msgs.msg import Header +from dimos.msgs.pointcloud import pointcloud_from_xyz +from dimos.msgs.time import time_from_nanoseconds + + +def _region(points): + header = Header(frame_id="world", stamp=time_from_nanoseconds(1700000000123456789)) + return PointCloudRegion( + header=header, region_id=0, cloud=pointcloud_from_xyz(points, header=header) + ) + HEIGHT_RANGE = (-1.0, 3.0) @@ -30,15 +41,15 @@ def test_the_height_ramp_spans_the_range_and_clamps_outside_it() -> None: def test_map_regions_land_static_on_their_own_cell_entities() -> None: - region = PointCloud2.from_numpy(_at_heights([-1.0, 3.0])) - region.seq = (1 << 16) | (-2 & 0xFFFF) + region = _region(_at_heights([-1.0, 3.0])) + region.region_id = (1 << 16) | (-2 & 0xFFFF) (path, arch, static) = render_map_region(region, 0.1, HEIGHT_RANGE)[0] assert path == "world/map_regions/1_-2" and static assert len(arch.positions.as_arrow_array()) == 2 assert arch.class_ids.as_arrow_array().to_pylist() == [0, 255] - emptied = PointCloud2.from_numpy(np.zeros((0, 3), dtype=np.float32)) - emptied.seq = region.seq + emptied = _region(np.zeros((0, 3), dtype=np.float32)) + emptied.region_id = region.region_id (path, arch, static) = render_map_region(emptied, 0.1, HEIGHT_RANGE)[0] assert path == "world/map_regions/1_-2" and static assert len(arch.positions.as_arrow_array()) == 0 diff --git a/dimos/mapping/ray_tracing/transformer.py b/dimos/mapping/ray_tracing/transformer.py index 96bd197fd64..2905dcee338 100644 --- a/dimos/mapping/ray_tracing/transformer.py +++ b/dimos/mapping/ray_tracing/transformer.py @@ -14,12 +14,16 @@ from __future__ import annotations +from copy import deepcopy from typing import TYPE_CHECKING, Any +import numpy as np + from dimos.mapping.ray_tracing.module import TF_MATCH_TOLERANCE_S from dimos.mapping.ray_tracing.voxel_map import VoxelRayMapper from dimos.memory.transform import FnTransformer, Transformer -from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 +from dimos.messages.sensor_msgs.msg import PointCloud2 +from dimos.msgs.pointcloud import pointcloud_from_xyz, pointcloud_xyz from dimos.utils.logging_config import setup_logger if TYPE_CHECKING: @@ -36,9 +40,12 @@ def pose_from_tf(tf: StreamTF, world_frame: str) -> FnTransformer[PointCloud2, P def attach(obs: Observation[PointCloud2]) -> Observation[PointCloud2]: t = tf.get( - world_frame, obs.data.frame_id, time_point=obs.ts, time_tolerance=TF_MATCH_TOLERANCE_S + world_frame, + obs.data.header.frame_id, + time_point=obs.ts, + time_tolerance=TF_MATCH_TOLERANCE_S, ) - return obs.with_pose(t) + return obs.with_pose(None if t is None else t.transform) return FnTransformer(attach) @@ -76,16 +83,13 @@ def _make_obs( last_obs: Observation[PointCloud2], count: int, ) -> Observation[PointCloud2]: - import open3d as o3d # type: ignore[import-untyped] - import open3d.core as o3c # type: ignore[import-untyped] - tags = {**last_obs.tags, "frame_count": count} cx, cy, radius, z_min, z_max = mapper.take_local_bounds() positions = mapper.local_map((cx, cy, 0.0), radius, z_min, z_max) tags["region_bounds"] = (cx, cy, radius, z_min, z_max) - pcd = o3d.t.geometry.PointCloud() - pcd.point["positions"] = o3c.Tensor.from_numpy(positions) - cloud = PointCloud2(pointcloud=pcd, frame_id="world", ts=last_obs.ts) + header = deepcopy(last_obs.data.header) + header.frame_id = "world" + cloud = pointcloud_from_xyz(positions, header=header) return last_obs.derive(data=cloud, tags=tags) def __call__( @@ -101,7 +105,9 @@ def __call__( logger.warning("RayTraceMap: obs %s has no pose. dropped a cloud", obs.id) continue x, y, z, qx, qy, qz, qw = obs.pose_tuple - mapper.add_frame(obs.data.points_f32(), (x, y, z), (qx, qy, qz, qw)) + mapper.add_frame( + np.asarray(pointcloud_xyz(obs.data), dtype=np.float32), (x, y, z), (qx, qy, qz, qw) + ) last_obs = obs count += 1 diff --git a/dimos/mapping/ray_tracing/utils/loaded_map.py b/dimos/mapping/ray_tracing/utils/loaded_map.py index 2ed096246c9..9d9dd56f076 100644 --- a/dimos/mapping/ray_tracing/utils/loaded_map.py +++ b/dimos/mapping/ray_tracing/utils/loaded_map.py @@ -22,7 +22,8 @@ from dimos.memory.store.sqlite import SqliteStore from dimos.memory.tf import StreamTF from dimos.memory.type.observation import Observation -from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 +from dimos.messages.sensor_msgs.msg import PointCloud2 +from dimos.msgs.pointcloud import pointcloud_xyz, transform_cloud LOADED_MAP_STREAM = "loaded_map" @@ -41,10 +42,10 @@ def place_loaded_map( loaded_map: Observation[PointCloud2], tf: StreamTF, world_frame: str, ts: float ) -> NDArray[np.float32]: """World-frame points of the loaded map, placed by the transform at ts.""" - placement = tf.get(world_frame, loaded_map.data.frame_id, time_point=ts) + placement = tf.get(world_frame, loaded_map.data.header.frame_id, time_point=ts) if placement is None: raise RuntimeError( - f"no {world_frame}->{loaded_map.data.frame_id} transform at ts={ts:.3f} " + f"no {world_frame}->{loaded_map.data.header.frame_id} transform at ts={ts:.3f} " "to place the loaded map" ) - return loaded_map.data.transform(placement).points_f32() + return np.asarray(pointcloud_xyz(transform_cloud(loaded_map.data, placement)), dtype=np.float32) diff --git a/dimos/mapping/ray_tracing/utils/test_loaded_map.py b/dimos/mapping/ray_tracing/utils/test_loaded_map.py index 8e83b46b104..448c1023bbf 100644 --- a/dimos/mapping/ray_tracing/utils/test_loaded_map.py +++ b/dimos/mapping/ray_tracing/utils/test_loaded_map.py @@ -24,9 +24,13 @@ from dimos.mapping.ray_tracing.utils.loaded_map import first_loaded_map, place_loaded_map from dimos.memory.store.sqlite import SqliteStore from dimos.memory.tf import StreamTF -from dimos.msgs.geometry_msgs.Transform import Transform -from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 -from dimos.msgs.tf2_msgs.TFMessage import TFMessage +from dimos.messages.geometry_msgs.msg import TransformStamped +from dimos.messages.sensor_msgs.msg import PointCloud2 +from dimos.messages.std_msgs.msg import Header +from dimos.messages.tf2_msgs.msg import TFMessage +from dimos.msgs.geometry import transform_from_matrix +from dimos.msgs.pointcloud import pointcloud_from_xyz, pointcloud_xyz +from dimos.msgs.time import time_from_seconds pytestmark = [pytest.mark.skipif_aarch64, pytest.mark.skipif_macos] @@ -40,18 +44,21 @@ def store(tmp_path: Path) -> Iterator[SqliteStore]: def _cloud(x: float, ts: float) -> PointCloud2: - return PointCloud2.from_numpy( - np.array([[x, 0.0, 0.0]], dtype=np.float32), frame_id="map", timestamp=ts + return pointcloud_from_xyz( + np.array([[x, 0, 0]], dtype=np.float32), + header=Header(frame_id="map", stamp=time_from_seconds(ts)), ) -def _world_to_map(yaw_deg: float, x: float, y: float, ts: float) -> Transform: +def _world_to_map(yaw_deg: float, x: float, y: float, ts: float) -> TransformStamped: m = np.eye(4) m[:3, :3] = Rotation.from_euler("z", yaw_deg, degrees=True).as_matrix() m[0, 3], m[1, 3] = x, y - tf = Transform.from_matrix(m, frame_id="world", child_frame_id="map") - tf.ts = ts - return tf + return TransformStamped( + header=Header(frame_id="world", stamp=time_from_seconds(ts)), + child_frame_id="map", + transform=transform_from_matrix(m), + ) def test_first_loaded_map_is_none_for_a_missing_or_empty_stream(store: SqliteStore) -> None: @@ -69,17 +76,18 @@ def test_first_loaded_map_is_the_earliest_by_ts(store: SqliteStore) -> None: assert first is not None assert first.ts == T0 - np.testing.assert_allclose(first.data.points_f32(), [[1.0, 0.0, 0.0]]) + np.testing.assert_allclose(pointcloud_xyz(first.data), [[1.0, 0.0, 0.0]]) def test_place_loaded_map_moves_points_into_the_world(store: SqliteStore) -> None: store.stream("tf", TFMessage).append( - TFMessage(_world_to_map(90.0, 1.0, 2.0, T0)), ts=T0, pose=None + TFMessage(transforms=[_world_to_map(90.0, 1.0, 2.0, T0)]), ts=T0, pose=None ) tf = StreamTF(store.stream("tf", TFMessage)) points = np.array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], dtype=np.float32) loaded = store.stream("loaded_map", PointCloud2).append( - PointCloud2.from_numpy(points, frame_id="map", timestamp=T0), ts=T0 + pointcloud_from_xyz(points, header=Header(frame_id="map", stamp=time_from_seconds(T0))), + ts=T0, ) placed = place_loaded_map(loaded, tf, "world", T0) diff --git a/dimos/mapping/ray_tracing/viz.py b/dimos/mapping/ray_tracing/viz.py index d74facb6e40..63a2af3dbb7 100644 --- a/dimos/mapping/ray_tracing/viz.py +++ b/dimos/mapping/ray_tracing/viz.py @@ -20,13 +20,15 @@ import numpy as np +from dimos.msgs.pointcloud import pointcloud_xyz from dimos.visualization.rerun.bridge import RerunEntry, keyed_by_seq, region_entity if TYPE_CHECKING: from numpy.typing import NDArray from rerun._baseclasses import Archetype - from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 + from dimos.messages.dimos_msgs.msg import PointCloudRegion + from dimos.messages.sensor_msgs.msg import PointCloud2 from dimos.visualization.rerun.bridge import RerunMulti # rerun is imported inside the renderers: it is heavy and only viewers load it. @@ -56,12 +58,14 @@ def voxel_map_points( def render_voxel_map( msg: PointCloud2, voxel_size: float, height_range: tuple[float, float] ) -> Archetype: - return voxel_map_points(msg.points_f32(), voxel_size, height_range) + return voxel_map_points( + np.asarray(pointcloud_xyz(msg), dtype=np.float32), voxel_size, height_range + ) @keyed_by_seq def render_map_region( - msg: PointCloud2, + msg: PointCloudRegion, voxel_size: float, height_range: tuple[float, float], z_band: tuple[float, float] | None = None, @@ -70,11 +74,11 @@ def render_map_region( Points outside z_band (world frame) are dropped, to show one storey. """ - pts = msg.points_f32() + pts = np.asarray(pointcloud_xyz(msg.cloud), dtype=np.float32) if z_band is not None: pts = pts[(pts[:, 2] >= z_band[0]) & (pts[:, 2] < z_band[1])] cell = voxel_map_points(pts, voxel_size, height_range) - return [RerunEntry(region_entity(MAP_REGIONS_ENTITY, msg.seq), cell, static=True)] + return [RerunEntry(region_entity(MAP_REGIONS_ENTITY, msg.region_id), cell, static=True)] def log_loaded_map(points: NDArray[np.float32]) -> None: diff --git a/dimos/navigation/global_planner/test_viz.py b/dimos/navigation/global_planner/test_viz.py index 12fd7e4c263..f04be17af73 100644 --- a/dimos/navigation/global_planner/test_viz.py +++ b/dimos/navigation/global_planner/test_viz.py @@ -19,11 +19,12 @@ import rerun as rr from dimos.mapping.ray_tracing.viz import render_map_region +from dimos.messages.dimos_msgs.msg import PointCloudRegion from dimos.messages.geometry_msgs.msg import Point, PointStamped, Pose, PoseStamped from dimos.messages.nav_msgs.msg import Path from dimos.messages.std_msgs.msg import Header from dimos.msgs.geometry import quaternion_from_euler -from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 +from dimos.msgs.pointcloud import pointcloud_from_xyz from dimos.msgs.time import time_from_nanoseconds from dimos.navigation.global_planner import viz from dimos.navigation.global_planner.mls_planner.viz import render_surface_region @@ -96,7 +97,11 @@ def test_bridge_config_pickles_for_the_workers() -> None: regions = overrides["world/map_regions"] assert regions.func is render_map_region assert regions.keywords == {"voxel_size": 0.08, "height_range": viz.HEIGHT_RANGE} - region = PointCloud2.from_numpy(np.array([[1.0, 1.0, 0.0]], dtype=np.float32)) - region.seq = (4 << 16) | 7 + header = Header(frame_id="map", stamp=time_from_nanoseconds(0)) + region = PointCloudRegion( + header=header, + region_id=(4 << 16) | 7, + cloud=pointcloud_from_xyz(np.array([[1.0, 1.0, 0.0]], dtype=np.float32), header=header), + ) (path, _, static_entry) = regions(region)[0] assert path == "world/map_regions/4_7" and static_entry diff --git a/dimos/spec/mapping.py b/dimos/spec/mapping.py index f35778f40b4..57ade6e36ed 100644 --- a/dimos/spec/mapping.py +++ b/dimos/spec/mapping.py @@ -15,8 +15,8 @@ from typing import Protocol from dimos.core.stream import Out -from dimos.msgs.nav_msgs.OccupancyGrid import OccupancyGrid -from dimos.msgs.sensor_msgs.PointCloud2 import PointCloud2 +from dimos.messages.nav_msgs.msg import OccupancyGrid +from dimos.messages.sensor_msgs.msg import PointCloud2 class GlobalPointcloud(Protocol): From 783891a5378e7b736dd960d1df91ddce731a8898 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2026 07:25:53 +0000 Subject: [PATCH 2/2] [autofix.ci] apply automated fixes --- dimos/experimental/memory/rust/Cargo.lock | 18 ++++++--- dimos/experimental/memory/rust/Cargo.toml | 2 +- .../memory/rust/crate-hashes.json | 7 ++-- .../sensors/lidar/livox/rust/Cargo.lock | 18 ++++++--- .../sensors/lidar/livox/rust/Cargo.toml | 2 +- .../lidar/livox/rust/crate-hashes.json | 7 ++-- .../sensors/lidar/pointlio/rust/Cargo.lock | 18 ++++++--- .../sensors/lidar/pointlio/rust/Cargo.toml | 2 +- .../lidar/pointlio/rust/crate-hashes.json | 7 ++-- .../sensors/lidar/virtual_mid360/Cargo.lock | 8 ++-- .../sensors/lidar/virtual_mid360/Cargo.toml | 2 +- .../lidar/virtual_mid360/crate-hashes.json | 8 ++-- dimos/mapping/dim_slam/rust/Cargo.lock | 18 ++++++--- dimos/mapping/dim_slam/rust/Cargo.toml | 2 +- dimos/mapping/dim_slam/rust/crate-hashes.json | 7 ++-- dimos/models/embedding/clip.py | 2 +- dimos/models/embedding/dino.py | 2 +- dimos/models/embedding/siglip.py | 2 +- dimos/models/embedding/siglip2.py | 2 +- .../models/embedding/test_generated_images.py | 37 +++++++++++-------- dimos/models/embedding/treid.py | 2 +- dimos/models/segmentation/edge_tam.py | 2 +- dimos/models/segmentation/test_yoloe.py | 4 +- dimos/models/segmentation/yoloe.py | 2 +- .../mls_planner/rust/Cargo.lock | 18 ++++++--- .../mls_planner/rust/Cargo.toml | 2 +- .../mls_planner/rust/crate-hashes.json | 7 ++-- dimos/robot/unitree/go2/dds/rust/Cargo.lock | 18 ++++++--- dimos/robot/unitree/go2/dds/rust/Cargo.toml | 2 +- .../unitree/go2/dds/rust/crate-hashes.json | 7 ++-- examples/native-modules/rust/Cargo.lock | 18 ++++++--- examples/native-modules/rust/Cargo.toml | 2 +- .../native-modules/rust/crate-hashes.json | 7 ++-- 33 files changed, 165 insertions(+), 97 deletions(-) diff --git a/dimos/experimental/memory/rust/Cargo.lock b/dimos/experimental/memory/rust/Cargo.lock index e0158b7e713..39f578a6e50 100644 --- a/dimos/experimental/memory/rust/Cargo.lock +++ b/dimos/experimental/memory/rust/Cargo.lock @@ -657,7 +657,7 @@ dependencies = [ [[package]] name = "dimos-lcm" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", "socket2 0.5.10", @@ -672,7 +672,7 @@ dependencies = [ "crossbeam-channel", "crossbeam-utils", "dimos-module", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen)", "lz4_flex 0.14.0", "mcap", "rayon", @@ -689,11 +689,11 @@ dependencies = [ [[package]] name = "dimos-module" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "dimos-lcm", "dimos-module-macros", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549)", "nalgebra", "rayon", "serde", @@ -709,7 +709,7 @@ dependencies = [ [[package]] name = "dimos-module-macros" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "proc-macro2", "quote", @@ -1555,6 +1555,14 @@ dependencies = [ "byteorder", ] +[[package]] +name = "lcm-msgs" +version = "0.1.0" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" +dependencies = [ + "byteorder", +] + [[package]] name = "libc" version = "0.2.189" diff --git a/dimos/experimental/memory/rust/Cargo.toml b/dimos/experimental/memory/rust/Cargo.toml index 7ac39440148..1287ba3a273 100644 --- a/dimos/experimental/memory/rust/Cargo.toml +++ b/dimos/experimental/memory/rust/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" anyhow = "1" crossbeam-channel = "0.5" crossbeam-utils = "0.8" -dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "6663bcb6e5e18f43a6cb9cf77ccbec613e310443" } +dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "d5f801d7dd0208731bab566d079bae7abe6278f1" } lcm-msgs = { git = "https://github.com/dimensionalOS/dimos-lcm.git", branch = "rust-codegen" } lz4_flex = "0.14.0" mcap = { version = "0.25.0", default-features = false, features = ["zstd"] } diff --git a/dimos/experimental/memory/rust/crate-hashes.json b/dimos/experimental/memory/rust/crate-hashes.json index 4c5fde86d6c..83e8cfeee71 100644 --- a/dimos/experimental/memory/rust/crate-hashes.json +++ b/dimos/experimental/memory/rust/crate-hashes.json @@ -1,6 +1,7 @@ { - "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module-macros@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=" + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module-macros@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=" } \ No newline at end of file diff --git a/dimos/hardware/sensors/lidar/livox/rust/Cargo.lock b/dimos/hardware/sensors/lidar/livox/rust/Cargo.lock index d4f9a187f15..b4852577934 100644 --- a/dimos/hardware/sensors/lidar/livox/rust/Cargo.lock +++ b/dimos/hardware/sensors/lidar/livox/rust/Cargo.lock @@ -609,7 +609,7 @@ dependencies = [ [[package]] name = "dimos-lcm" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", "socket2 0.5.10", @@ -621,7 +621,7 @@ name = "dimos-livox" version = "0.1.0" dependencies = [ "dimos-module", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen)", "livox-wire", "serde", "serde_json", @@ -636,11 +636,11 @@ dependencies = [ [[package]] name = "dimos-module" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "dimos-lcm", "dimos-module-macros", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549)", "nalgebra", "rayon", "serde", @@ -656,7 +656,7 @@ dependencies = [ [[package]] name = "dimos-module-macros" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "proc-macro2", "quote", @@ -1454,6 +1454,14 @@ dependencies = [ "byteorder", ] +[[package]] +name = "lcm-msgs" +version = "0.1.0" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" +dependencies = [ + "byteorder", +] + [[package]] name = "libc" version = "0.2.189" diff --git a/dimos/hardware/sensors/lidar/livox/rust/Cargo.toml b/dimos/hardware/sensors/lidar/livox/rust/Cargo.toml index 2b042fdd770..ef5c6d449b1 100644 --- a/dimos/hardware/sensors/lidar/livox/rust/Cargo.toml +++ b/dimos/hardware/sensors/lidar/livox/rust/Cargo.toml @@ -22,7 +22,7 @@ imu = "sensor_msgs.Imu" [dependencies] livox-wire = { git = "https://github.com/dimensionalOS/livox-wire", rev = "441c4a16dbe2adb0683ece976cc800c6d7fbc790" } -dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "6663bcb6e5e18f43a6cb9cf77ccbec613e310443" } +dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "d5f801d7dd0208731bab566d079bae7abe6278f1" } lcm-msgs = { git = "https://github.com/dimensionalOS/dimos-lcm.git", branch = "rust-codegen" } serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/dimos/hardware/sensors/lidar/livox/rust/crate-hashes.json b/dimos/hardware/sensors/lidar/livox/rust/crate-hashes.json index 25a968ff3d3..e4eb72c2522 100644 --- a/dimos/hardware/sensors/lidar/livox/rust/crate-hashes.json +++ b/dimos/hardware/sensors/lidar/livox/rust/crate-hashes.json @@ -1,7 +1,8 @@ { - "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module-macros@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module-macros@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", "git+https://github.com/dimensionalOS/livox-wire?rev=441c4a16dbe2adb0683ece976cc800c6d7fbc790#0.1.0": "sha256-wDNVchRiqm4N9wPGwvYJ9JssmPOC33wBTE4QT6vZkGA=" } \ No newline at end of file diff --git a/dimos/hardware/sensors/lidar/pointlio/rust/Cargo.lock b/dimos/hardware/sensors/lidar/pointlio/rust/Cargo.lock index cedde0f558f..94e93336ccc 100644 --- a/dimos/hardware/sensors/lidar/pointlio/rust/Cargo.lock +++ b/dimos/hardware/sensors/lidar/pointlio/rust/Cargo.lock @@ -609,7 +609,7 @@ dependencies = [ [[package]] name = "dimos-lcm" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", "socket2 0.5.10", @@ -619,11 +619,11 @@ dependencies = [ [[package]] name = "dimos-module" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "dimos-lcm", "dimos-module-macros", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549)", "nalgebra", "rayon", "serde", @@ -639,7 +639,7 @@ dependencies = [ [[package]] name = "dimos-module-macros" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "proc-macro2", "quote", @@ -652,7 +652,7 @@ name = "dimos-pointlio" version = "0.1.0" dependencies = [ "dimos-module", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen)", "livox-wire", "pointlio-core", "serde", @@ -1443,6 +1443,14 @@ dependencies = [ "byteorder", ] +[[package]] +name = "lcm-msgs" +version = "0.1.0" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" +dependencies = [ + "byteorder", +] + [[package]] name = "libc" version = "0.2.189" diff --git a/dimos/hardware/sensors/lidar/pointlio/rust/Cargo.toml b/dimos/hardware/sensors/lidar/pointlio/rust/Cargo.toml index a6cb8b21048..3966bd40099 100644 --- a/dimos/hardware/sensors/lidar/pointlio/rust/Cargo.toml +++ b/dimos/hardware/sensors/lidar/pointlio/rust/Cargo.toml @@ -33,7 +33,7 @@ odometry = "nav_msgs.Odometry" livox-wire = { git = "https://github.com/dimensionalOS/livox-wire", rev = "441c4a16dbe2adb0683ece976cc800c6d7fbc790" } # Direct dependencies of the copied livox wire/pipeline/pcap modules. See src/lib.rs. pointlio-core = { git = "https://github.com/dimensionalOS/dimos-module-pointlio.git", rev = "22a5403f827d030b248ae473c2808b5d405b3d55" } -dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "6663bcb6e5e18f43a6cb9cf77ccbec613e310443" } +dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "d5f801d7dd0208731bab566d079bae7abe6278f1" } lcm-msgs = { git = "https://github.com/dimensionalOS/dimos-lcm.git", branch = "rust-codegen" } serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/dimos/hardware/sensors/lidar/pointlio/rust/crate-hashes.json b/dimos/hardware/sensors/lidar/pointlio/rust/crate-hashes.json index 68580a734b5..618f7021ad9 100644 --- a/dimos/hardware/sensors/lidar/pointlio/rust/crate-hashes.json +++ b/dimos/hardware/sensors/lidar/pointlio/rust/crate-hashes.json @@ -1,8 +1,9 @@ { - "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", "git+https://github.com/dimensionalOS/dimos-module-pointlio.git?rev=22a5403f827d030b248ae473c2808b5d405b3d55#pointlio-core@0.1.0": "sha256-FjUcsZVI8nTcmKw8WhdxBuHelBjOCeJmyEsyqRxDvX0=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module-macros@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module-macros@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", "git+https://github.com/dimensionalOS/livox-wire?rev=441c4a16dbe2adb0683ece976cc800c6d7fbc790#0.1.0": "sha256-wDNVchRiqm4N9wPGwvYJ9JssmPOC33wBTE4QT6vZkGA=" } \ No newline at end of file diff --git a/dimos/hardware/sensors/lidar/virtual_mid360/Cargo.lock b/dimos/hardware/sensors/lidar/virtual_mid360/Cargo.lock index d5b83c0f4e9..50b4b4a203c 100644 --- a/dimos/hardware/sensors/lidar/virtual_mid360/Cargo.lock +++ b/dimos/hardware/sensors/lidar/virtual_mid360/Cargo.lock @@ -609,7 +609,7 @@ dependencies = [ [[package]] name = "dimos-lcm" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", "socket2 0.5.10", @@ -619,7 +619,7 @@ dependencies = [ [[package]] name = "dimos-module" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "dimos-lcm", "dimos-module-macros", @@ -639,7 +639,7 @@ dependencies = [ [[package]] name = "dimos-module-macros" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "proc-macro2", "quote", @@ -1436,7 +1436,7 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lcm-msgs" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", ] diff --git a/dimos/hardware/sensors/lidar/virtual_mid360/Cargo.toml b/dimos/hardware/sensors/lidar/virtual_mid360/Cargo.toml index 220a2de1080..e5692b3f6e3 100644 --- a/dimos/hardware/sensors/lidar/virtual_mid360/Cargo.toml +++ b/dimos/hardware/sensors/lidar/virtual_mid360/Cargo.toml @@ -10,7 +10,7 @@ path = "src/main.rs" [dependencies] livox-wire = { git = "https://github.com/dimensionalOS/livox-wire", rev = "441c4a16dbe2adb0683ece976cc800c6d7fbc790" } # Direct dependencies of the copied livox wire/pipeline/pcap modules. See src/main.rs. -dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "6663bcb6e5e18f43a6cb9cf77ccbec613e310443" } +dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "d5f801d7dd0208731bab566d079bae7abe6278f1" } tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "net", "sync"] } serde = { version = "1", features = ["derive"] } socket2 = "0.6" diff --git a/dimos/hardware/sensors/lidar/virtual_mid360/crate-hashes.json b/dimos/hardware/sensors/lidar/virtual_mid360/crate-hashes.json index 25a968ff3d3..c5c4402caef 100644 --- a/dimos/hardware/sensors/lidar/virtual_mid360/crate-hashes.json +++ b/dimos/hardware/sensors/lidar/virtual_mid360/crate-hashes.json @@ -1,7 +1,7 @@ { - "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", - "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module-macros@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module-macros@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", "git+https://github.com/dimensionalOS/livox-wire?rev=441c4a16dbe2adb0683ece976cc800c6d7fbc790#0.1.0": "sha256-wDNVchRiqm4N9wPGwvYJ9JssmPOC33wBTE4QT6vZkGA=" } \ No newline at end of file diff --git a/dimos/mapping/dim_slam/rust/Cargo.lock b/dimos/mapping/dim_slam/rust/Cargo.lock index 9308b22cb40..2f4c35f51a3 100644 --- a/dimos/mapping/dim_slam/rust/Cargo.lock +++ b/dimos/mapping/dim_slam/rust/Cargo.lock @@ -557,7 +557,7 @@ dependencies = [ "cu_vslam_rs", "dim_slam", "dimos-module", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen)", "serde", "tokio", "tracing", @@ -578,7 +578,7 @@ dependencies = [ [[package]] name = "dimos-lcm" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", "socket2 0.5.10", @@ -588,11 +588,11 @@ dependencies = [ [[package]] name = "dimos-module" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "dimos-lcm", "dimos-module-macros", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549)", "nalgebra", "rayon", "serde", @@ -608,7 +608,7 @@ dependencies = [ [[package]] name = "dimos-module-macros" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "proc-macro2", "quote", @@ -1395,6 +1395,14 @@ dependencies = [ "byteorder", ] +[[package]] +name = "lcm-msgs" +version = "0.1.0" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" +dependencies = [ + "byteorder", +] + [[package]] name = "libc" version = "0.2.189" diff --git a/dimos/mapping/dim_slam/rust/Cargo.toml b/dimos/mapping/dim_slam/rust/Cargo.toml index 8df62977ea2..54c57ca62d9 100644 --- a/dimos/mapping/dim_slam/rust/Cargo.toml +++ b/dimos/mapping/dim_slam/rust/Cargo.toml @@ -15,7 +15,7 @@ dim_slam = { git = "https://github.com/dimensionalOS/dimSLAM", tag = "v0.4.1" } # Unused directly, but cargo hands DEP_CUVSLAM_LIB_DIR only to immediate dependents # and build.rs needs it for the rpath. cu_vslam_rs = "0.2.0" -dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "6663bcb6e5e18f43a6cb9cf77ccbec613e310443" } +dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "d5f801d7dd0208731bab566d079bae7abe6278f1" } lcm-msgs = { git = "https://github.com/dimensionalOS/dimos-lcm.git", branch = "rust-codegen" } tokio = { version = "1", features = ["rt-multi-thread", "macros"] } tracing = "0.1" diff --git a/dimos/mapping/dim_slam/rust/crate-hashes.json b/dimos/mapping/dim_slam/rust/crate-hashes.json index 980a12b1ffc..65541732f8b 100644 --- a/dimos/mapping/dim_slam/rust/crate-hashes.json +++ b/dimos/mapping/dim_slam/rust/crate-hashes.json @@ -1,7 +1,8 @@ { "git+https://github.com/dimensionalOS/dimSLAM?tag=v0.4.1#dim_slam@0.1.0": "sha256-jx3QjYNclt3JFJOonGIAzfoJeJ5bhowx70a7LumF6IA=", - "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module-macros@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=" + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module-macros@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=" } \ No newline at end of file diff --git a/dimos/models/embedding/clip.py b/dimos/models/embedding/clip.py index ad5e3e0cc6c..f429dc62a93 100644 --- a/dimos/models/embedding/clip.py +++ b/dimos/models/embedding/clip.py @@ -17,12 +17,12 @@ from functools import cached_property from typing import overload -from dimos.messages.sensor_msgs.msg import Image from PIL import Image as PILImage import torch import torch.nn.functional as functional from transformers import CLIPModel as HFCLIPModel, CLIPProcessor +from dimos.messages.sensor_msgs.msg import Image from dimos.models.base import HuggingFaceModel from dimos.models.embedding.base import Embedding, EmbeddingModel, HuggingFaceEmbeddingModelConfig from dimos.msgs.image import image_to_rgb diff --git a/dimos/models/embedding/dino.py b/dimos/models/embedding/dino.py index 5b0d24fd137..022a442ebf7 100644 --- a/dimos/models/embedding/dino.py +++ b/dimos/models/embedding/dino.py @@ -17,12 +17,12 @@ from functools import cached_property from typing import Any, overload -from dimos.messages.sensor_msgs.msg import Image from PIL import Image as PILImage import torch import torch.nn.functional as functional from transformers import AutoImageProcessor, AutoModel +from dimos.messages.sensor_msgs.msg import Image from dimos.models.base import HuggingFaceModel from dimos.models.embedding.base import Embedding, EmbeddingModel, HuggingFaceEmbeddingModelConfig from dimos.msgs.image import image_to_rgb diff --git a/dimos/models/embedding/siglip.py b/dimos/models/embedding/siglip.py index bb0ed762943..8cabb1afdf4 100644 --- a/dimos/models/embedding/siglip.py +++ b/dimos/models/embedding/siglip.py @@ -17,12 +17,12 @@ from functools import cached_property from typing import overload -from dimos.messages.sensor_msgs.msg import Image from PIL import Image as PILImage import torch import torch.nn.functional as functional from transformers import SiglipModel as HFSiglipModel, SiglipProcessor +from dimos.messages.sensor_msgs.msg import Image from dimos.models.base import HuggingFaceModel from dimos.models.embedding.base import Embedding, EmbeddingModel, HuggingFaceEmbeddingModelConfig from dimos.msgs.image import image_to_rgb diff --git a/dimos/models/embedding/siglip2.py b/dimos/models/embedding/siglip2.py index f8f1fe8861b..c85932f9176 100644 --- a/dimos/models/embedding/siglip2.py +++ b/dimos/models/embedding/siglip2.py @@ -17,12 +17,12 @@ from functools import cached_property from typing import overload -from dimos.messages.sensor_msgs.msg import Image from PIL import Image as PILImage import torch import torch.nn.functional as functional from transformers import SiglipModel as HFSiglipModel, SiglipProcessor +from dimos.messages.sensor_msgs.msg import Image from dimos.models.base import HuggingFaceModel from dimos.models.embedding.base import Embedding, EmbeddingModel, HuggingFaceEmbeddingModelConfig from dimos.msgs.image import image_to_rgb diff --git a/dimos/models/embedding/test_generated_images.py b/dimos/models/embedding/test_generated_images.py index e3c1245ab07..a51f9778ba4 100644 --- a/dimos/models/embedding/test_generated_images.py +++ b/dimos/models/embedding/test_generated_images.py @@ -29,20 +29,25 @@ from dimos.msgs.image import image_from_array, image_view -@pytest.mark.parametrize("model_type", [CLIPModel,DINOModel,SigLIPModel,SigLIP2Model]) -def test_generated_embeddings_keep_zero_source_time_and_convert_rgb(mocker,model_type): - processor,network=mocker.Mock(),mocker.Mock() - features=torch.tensor([[3.0,4.0]]) - processor.return_value=BatchFeature(data={"pixel_values":torch.zeros(1,3,4,8)}) - network.get_image_features.return_value=features - network.return_value=BaseModelOutputWithPooling(last_hidden_state=features[:,None,:],pooler_output=features) - mocker.patch.object(model_type,"_processor",new_callable=PropertyMock,return_value=processor) - mocker.patch.object(model_type,"_model",new_callable=PropertyMock,return_value=network) - image=image_from_array(np.full((4,8,3),[0,0,255],dtype=np.uint8),encoding="bgr8", - header=Header(frame_id="camera",stamp=Time(sec=0,nanosec=0))) - model=model_type(device="cpu") - result=model.embed(image) +@pytest.mark.parametrize("model_type", [CLIPModel, DINOModel, SigLIPModel, SigLIP2Model]) +def test_generated_embeddings_keep_zero_source_time_and_convert_rgb(mocker, model_type): + processor, network = mocker.Mock(), mocker.Mock() + features = torch.tensor([[3.0, 4.0]]) + processor.return_value = BatchFeature(data={"pixel_values": torch.zeros(1, 3, 4, 8)}) + network.get_image_features.return_value = features + network.return_value = BaseModelOutputWithPooling( + last_hidden_state=features[:, None, :], pooler_output=features + ) + mocker.patch.object(model_type, "_processor", new_callable=PropertyMock, return_value=processor) + mocker.patch.object(model_type, "_model", new_callable=PropertyMock, return_value=network) + image = image_from_array( + np.full((4, 8, 3), [0, 0, 255], dtype=np.uint8), + encoding="bgr8", + header=Header(frame_id="camera", stamp=Time(sec=0, nanosec=0)), + ) + model = model_type(device="cpu") + result = model.embed(image) assert result.timestamp == 0.0 - torch.testing.assert_close(result.vector,torch.tensor([0.6,0.8])) - assert processor.call_args.kwargs["images"][0].getpixel((0,0)) == (255,0,0) - np.testing.assert_array_equal(image_view(image)[0,0],[0,0,255]) + torch.testing.assert_close(result.vector, torch.tensor([0.6, 0.8])) + assert processor.call_args.kwargs["images"][0].getpixel((0, 0)) == (255, 0, 0) + np.testing.assert_array_equal(image_view(image)[0, 0], [0, 0, 255]) diff --git a/dimos/models/embedding/treid.py b/dimos/models/embedding/treid.py index ce36b5d004b..3ce7331eec3 100644 --- a/dimos/models/embedding/treid.py +++ b/dimos/models/embedding/treid.py @@ -19,11 +19,11 @@ from functools import cached_property -from dimos.messages.sensor_msgs.msg import Image import torch import torch.nn.functional as functional from torchreid import utils as torchreid_utils +from dimos.messages.sensor_msgs.msg import Image from dimos.models.base import LocalModel from dimos.models.embedding.base import Embedding, EmbeddingModel, EmbeddingModelConfig from dimos.msgs.image import image_to_bgr diff --git a/dimos/models/segmentation/edge_tam.py b/dimos/models/segmentation/edge_tam.py index e240a6529d1..b65977283c0 100644 --- a/dimos/models/segmentation/edge_tam.py +++ b/dimos/models/segmentation/edge_tam.py @@ -20,7 +20,6 @@ import tempfile from typing import TYPE_CHECKING, Any, Protocol, TypedDict -from dimos.messages.sensor_msgs.msg import Image from hydra.utils import instantiate import numpy as np from numpy.typing import NDArray @@ -28,6 +27,7 @@ from PIL import Image as PILImage import torch +from dimos.messages.sensor_msgs.msg import Image from dimos.models.base import default_torch_device from dimos.msgs.image import image_to_bgr, image_to_jpeg from dimos.perception.detection.detectors.base import Detector diff --git a/dimos/models/segmentation/test_yoloe.py b/dimos/models/segmentation/test_yoloe.py index 345fc79ac1c..5d2efaffa50 100644 --- a/dimos/models/segmentation/test_yoloe.py +++ b/dimos/models/segmentation/test_yoloe.py @@ -16,11 +16,11 @@ from typing import Any from unittest.mock import MagicMock -from dimos.messages.sensor_msgs.msg import Image -from dimos.messages.std_msgs.msg import Header import numpy as np from ultralytics.models.yolo.yoloe import YOLOEVPSegPredictor +from dimos.messages.sensor_msgs.msg import Image +from dimos.messages.std_msgs.msg import Header from dimos.models.segmentation.yoloe import YoloeBoxSegmenter from dimos.msgs.image import image_from_array, image_to_bgr from dimos.msgs.time import time_from_seconds, to_seconds diff --git a/dimos/models/segmentation/yoloe.py b/dimos/models/segmentation/yoloe.py index d19ecc15701..fd075227d27 100644 --- a/dimos/models/segmentation/yoloe.py +++ b/dimos/models/segmentation/yoloe.py @@ -19,11 +19,11 @@ from dataclasses import replace from typing import Protocol -from dimos.messages.sensor_msgs.msg import Image import numpy as np from numpy.typing import NDArray from ultralytics.models.yolo.yoloe import YOLOEVPSegPredictor +from dimos.messages.sensor_msgs.msg import Image from dimos.msgs.image import image_to_bgr from dimos.perception.detection.detectors.yoloe import Yoloe2DDetector, YoloePromptMode from dimos.perception.detection.type.detection2d.bbox import Bbox, Detection2DBBox diff --git a/dimos/navigation/global_planner/mls_planner/rust/Cargo.lock b/dimos/navigation/global_planner/mls_planner/rust/Cargo.lock index 6e331d800ac..bebf0ee25d4 100644 --- a/dimos/navigation/global_planner/mls_planner/rust/Cargo.lock +++ b/dimos/navigation/global_planner/mls_planner/rust/Cargo.lock @@ -582,7 +582,7 @@ dependencies = [ [[package]] name = "dimos-lcm" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", "socket2 0.5.10", @@ -595,7 +595,7 @@ version = "0.1.0" dependencies = [ "ahash", "dimos-module", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen)", "rayon", "serde", "smallvec", @@ -619,11 +619,11 @@ dependencies = [ [[package]] name = "dimos-module" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "dimos-lcm", "dimos-module-macros", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549)", "nalgebra", "rayon", "serde", @@ -639,7 +639,7 @@ dependencies = [ [[package]] name = "dimos-module-macros" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "proc-macro2", "quote", @@ -1433,6 +1433,14 @@ dependencies = [ "byteorder", ] +[[package]] +name = "lcm-msgs" +version = "0.1.0" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" +dependencies = [ + "byteorder", +] + [[package]] name = "libc" version = "0.2.189" diff --git a/dimos/navigation/global_planner/mls_planner/rust/Cargo.toml b/dimos/navigation/global_planner/mls_planner/rust/Cargo.toml index 9f47c6ad8fa..7a9c9f7560b 100644 --- a/dimos/navigation/global_planner/mls_planner/rust/Cargo.toml +++ b/dimos/navigation/global_planner/mls_planner/rust/Cargo.toml @@ -37,7 +37,7 @@ node_edges = "nav_msgs.LineSegments3D" path = "nav_msgs.Path" [dependencies] -dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "6663bcb6e5e18f43a6cb9cf77ccbec613e310443" } +dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "d5f801d7dd0208731bab566d079bae7abe6278f1" } lcm-msgs = { git = "https://github.com/dimensionalOS/dimos-lcm.git", branch = "rust-codegen" } tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal", "time"] } serde = { version = "1", features = ["derive"] } diff --git a/dimos/navigation/global_planner/mls_planner/rust/crate-hashes.json b/dimos/navigation/global_planner/mls_planner/rust/crate-hashes.json index 4c5fde86d6c..83e8cfeee71 100644 --- a/dimos/navigation/global_planner/mls_planner/rust/crate-hashes.json +++ b/dimos/navigation/global_planner/mls_planner/rust/crate-hashes.json @@ -1,6 +1,7 @@ { - "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module-macros@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=" + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module-macros@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=" } \ No newline at end of file diff --git a/dimos/robot/unitree/go2/dds/rust/Cargo.lock b/dimos/robot/unitree/go2/dds/rust/Cargo.lock index d0f71e3b2e3..02dc7401edd 100644 --- a/dimos/robot/unitree/go2/dds/rust/Cargo.lock +++ b/dimos/robot/unitree/go2/dds/rust/Cargo.lock @@ -667,7 +667,7 @@ dependencies = [ "cdr", "cyclonedds-rs", "dimos-module", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen)", "serde", "serde-big-array", "serde_json", @@ -679,7 +679,7 @@ dependencies = [ [[package]] name = "dimos-lcm" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", "socket2 0.5.10", @@ -689,11 +689,11 @@ dependencies = [ [[package]] name = "dimos-module" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "dimos-lcm", "dimos-module-macros", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549)", "nalgebra", "rayon", "serde", @@ -709,7 +709,7 @@ dependencies = [ [[package]] name = "dimos-module-macros" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "proc-macro2", "quote", @@ -1513,6 +1513,14 @@ dependencies = [ "byteorder", ] +[[package]] +name = "lcm-msgs" +version = "0.1.0" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" +dependencies = [ + "byteorder", +] + [[package]] name = "libc" version = "0.2.189" diff --git a/dimos/robot/unitree/go2/dds/rust/Cargo.toml b/dimos/robot/unitree/go2/dds/rust/Cargo.toml index e9c79457575..fafb8e04b6a 100644 --- a/dimos/robot/unitree/go2/dds/rust/Cargo.toml +++ b/dimos/robot/unitree/go2/dds/rust/Cargo.toml @@ -16,7 +16,7 @@ path = "src/bin/go2_dds.rs" [dependencies] # Our forks, vendored: the robot has no GitHub access. See vendor/*/Cargo.toml. cyclonedds-rs = { path = "vendor/cyclonedds-rs", default-features = false } -dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "6663bcb6e5e18f43a6cb9cf77ccbec613e310443" } +dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "d5f801d7dd0208731bab566d079bae7abe6278f1" } lcm-msgs = { git = "https://github.com/dimensionalOS/dimos-lcm.git", branch = "rust-codegen" } serde = { version = "1", features = ["derive"] } serde-big-array = "0.5" diff --git a/dimos/robot/unitree/go2/dds/rust/crate-hashes.json b/dimos/robot/unitree/go2/dds/rust/crate-hashes.json index 4c5fde86d6c..83e8cfeee71 100644 --- a/dimos/robot/unitree/go2/dds/rust/crate-hashes.json +++ b/dimos/robot/unitree/go2/dds/rust/crate-hashes.json @@ -1,6 +1,7 @@ { - "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module-macros@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=" + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module-macros@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=" } \ No newline at end of file diff --git a/examples/native-modules/rust/Cargo.lock b/examples/native-modules/rust/Cargo.lock index 5d93b115412..7f2284cb4ac 100644 --- a/examples/native-modules/rust/Cargo.lock +++ b/examples/native-modules/rust/Cargo.lock @@ -582,7 +582,7 @@ dependencies = [ [[package]] name = "dimos-lcm" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#04d78e8622500244123ba9cefa4c51b4cb454549" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" dependencies = [ "byteorder", "socket2 0.5.10", @@ -592,11 +592,11 @@ dependencies = [ [[package]] name = "dimos-module" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "dimos-lcm", "dimos-module-macros", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549)", "nalgebra", "rayon", "serde", @@ -612,7 +612,7 @@ dependencies = [ [[package]] name = "dimos-module-macros" version = "0.1.0" -source = "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#6663bcb6e5e18f43a6cb9cf77ccbec613e310443" +source = "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#d5f801d7dd0208731bab566d079bae7abe6278f1" dependencies = [ "proc-macro2", "quote", @@ -625,7 +625,7 @@ name = "dimos-native-module-examples" version = "0.1.0" dependencies = [ "dimos-module", - "lcm-msgs", + "lcm-msgs 0.1.0 (git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen)", "serde", "tokio", "tracing", @@ -1403,6 +1403,14 @@ dependencies = [ "byteorder", ] +[[package]] +name = "lcm-msgs" +version = "0.1.0" +source = "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#04d78e8622500244123ba9cefa4c51b4cb454549" +dependencies = [ + "byteorder", +] + [[package]] name = "libc" version = "0.2.189" diff --git a/examples/native-modules/rust/Cargo.toml b/examples/native-modules/rust/Cargo.toml index b7d0cf69700..8976a71d0d6 100644 --- a/examples/native-modules/rust/Cargo.toml +++ b/examples/native-modules/rust/Cargo.toml @@ -20,7 +20,7 @@ name = "tf_broadcaster" path = "src/tf_broadcaster.rs" [dependencies] -dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "6663bcb6e5e18f43a6cb9cf77ccbec613e310443" } +dimos-module = { git = "https://github.com/dimensionalOS/dimos", rev = "d5f801d7dd0208731bab566d079bae7abe6278f1" } lcm-msgs = { git = "https://github.com/dimensionalOS/dimos-lcm.git", branch = "rust-codegen" } tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] } serde = { version = "1", features = ["derive"] } diff --git a/examples/native-modules/rust/crate-hashes.json b/examples/native-modules/rust/crate-hashes.json index 4c5fde86d6c..83e8cfeee71 100644 --- a/examples/native-modules/rust/crate-hashes.json +++ b/examples/native-modules/rust/crate-hashes.json @@ -1,6 +1,7 @@ { - "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", "git+https://github.com/dimensionalOS/dimos-lcm.git?branch=rust-codegen#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module-macros@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=", - "git+https://github.com/dimensionalOS/dimos?rev=6663bcb6e5e18f43a6cb9cf77ccbec613e310443#dimos-module@0.1.0": "sha256-6ikqdS3sroOJGI4WGuSyFx2yZjtJ+4Qgt+IGlkFl+qA=" + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#dimos-lcm@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos-lcm.git?rev=04d78e8622500244123ba9cefa4c51b4cb454549#lcm-msgs@0.1.0": "sha256-GGkx4Mn6NYP6KZecmoRLKGWIih/+y8OgNn12DeXX6n8=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module-macros@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=", + "git+https://github.com/dimensionalOS/dimos?rev=d5f801d7dd0208731bab566d079bae7abe6278f1#dimos-module@0.1.0": "sha256-HUqrE2wSfu2lDLtIxPAa7ID9weerFccf68PPVak03RM=" } \ No newline at end of file