Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ repos:
- --license-filepath
- assets/license_file_header.txt
- --use-current-year
- id: insert-license
name: insert-license (rust)
files: \.rs$
types: [rust]
args:
- --license-filepath
- assets/license_file_header.txt
- --comment-style
Comment thread
leshy marked this conversation as resolved.
- "//"
Comment thread
leshy marked this conversation as resolved.
- --use-current-year

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
Expand Down
14 changes: 14 additions & 0 deletions dimos/hardware/sensors/lidar/virtual_mid360/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// 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.

// Fake Livox Mid-360 — replays a recorded pcap over a virtual NIC and synthesizes
// the Livox SDK2 control handshake so an unmodified, live-mode pointlio ingests it
// through the real Livox SDK as if from a live sensor. Namespace-agnostic: it just
Expand Down
13 changes: 12 additions & 1 deletion dimos/mapping/ray_tracing/rust/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

pub mod voxel_ray_tracer;

Expand Down
13 changes: 12 additions & 1 deletion dimos/mapping/ray_tracing/rust/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

use std::time::Duration;

Expand Down
13 changes: 12 additions & 1 deletion dimos/mapping/ray_tracing/rust/src/python.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

use numpy::ndarray::Array2;
use numpy::{IntoPyArray, PyArray2, PyReadonlyArray2, PyUntypedArrayMethods};
Expand Down
13 changes: 12 additions & 1 deletion dimos/mapping/ray_tracing/rust/src/voxel_ray_tracer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

use ahash::{AHashMap, AHashSet};
use arrayvec::ArrayVec;
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/adjacency.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

//! Surface cells indexed by dense CellId.
//!
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/dijkstra.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

//! Multi-source Dijkstra over the CellId-indexed surface graph. State and
//! the heap live in a reusable struct so the inner loop never allocates.
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/edges.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

//! Node-graph edge construction.
//!
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

mod adjacency;
mod dijkstra;
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

use std::sync::{Arc, Mutex};
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/mls_planner.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

//! Config and the owned-state Planner that builds and queries the MLS graph.

Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/nodes.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

//! Node placement: identify standable cells far from any wall, place graph
//! nodes at local maxima via NMS, and rescale cell-edge costs to push paths
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/planner.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

use std::cmp::Ordering;
use std::collections::{BinaryHeap, VecDeque};
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/python.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

use numpy::ndarray::Array2;
use numpy::{IntoPyArray, PyArray2, PyReadonlyArray2, PyUntypedArrayMethods};
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/surfaces.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

//! Surface extraction: mark cells with robot-height clearance above as
//! standable, then morphologically close per-z-level holes without bridging
Expand Down
13 changes: 12 additions & 1 deletion dimos/navigation/nav_3d/mls_planner/rust/src/voxel.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
// Copyright 2026 Dimensional Inc.
// SPDX-License-Identifier: Apache-2.0
//
// 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.

//! Voxel-grid coordinate math.

Expand Down
14 changes: 14 additions & 0 deletions examples/native-modules/rust/src/native_ping.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// 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.

use dimos_module::{run, Input, LcmTransport, Module, Output};
use lcm_msgs::geometry_msgs::{Twist, Vector3};
use tokio::time::{interval, Duration};
Expand Down
14 changes: 14 additions & 0 deletions examples/native-modules/rust/src/native_pong.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// 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.

use dimos_module::{native_config, run, Input, LcmTransport, Module, Output};
use lcm_msgs::geometry_msgs::{Twist, Vector3};

Expand Down
14 changes: 14 additions & 0 deletions native/rust/dimos-module-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// 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.

use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
use quote::{format_ident, quote};
Expand Down
14 changes: 14 additions & 0 deletions native/rust/dimos-module/src/lcm.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// 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.

use std::io;

use dimos_lcm::{Lcm, LcmOptions};
Expand Down
14 changes: 14 additions & 0 deletions native/rust/dimos-module/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// 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.

pub mod lcm;
pub mod log;
pub mod module;
Expand Down
Loading
Loading