octo_map_rust — cargo run --example insert_and_query
rustc 1.75+
insert_and_query.rs
Cargo.toml
Three-state query
is_occupied_at(1.05, 0.05, 0.05)
Some(true) the wall the ray hit
is_occupied_at(0.55, 0.05, 0.05)
Some(false) swept clear by the ray
is_occupied_at(5.05, 0.05, 0.05)
None never observed
Occupancy is Option<bool>, so unknown cannot be mistaken for free. The compiler makes you handle the third case.
octomap-core 0.1.0 deps: 0 std only no C++ in the build
unknown
Legend
OccupiedSome(true)
FreeSome(false)
Never observedNone
Map
Resolution0.10 m
Rays cast0
Leaf nodes0
After prune
map.insert_point_cloud(
  &scan, sensor,
  -1.0, // no range limit
  false, false,
);
map.prune();
$ cargo test --workspace
Compiling octomap-core v0.1.0, octomap-ros v0.1.0
Running differential/ — 6 suites against C++ fixtures
test result: ok. 284 passed; 0 failed; 0 ignored finished in 2.41s
Measured against the C++ reference
284 tests
206 unit · 63 differential · 12 parser-robustness · 3 doc-tests. The reference is built, driven through the same inputs, and its answers captured as fixtures.
Compared as raw IEEE-754 bits
Not a tolerance — both implementations do the same operations in the same order, so anything less than bit equality is a real divergence.
3 real bugs caught this way —
all three would have passed any epsilon
Byte-identical .bt / .ot
c++8f 12 00 4a c3 7e 01 ff
rust8f 12 00 4a c3 7e 01 ff identical
diff0 bytes differ across the file
Verified both directions: Rust reads C++ files, and Rust's own output is byte-for-byte what the reference produces.
No unsafe, anywhere
[workspace.lints.rust]
unsafe_code = "forbid"
Not "we avoid unsafe" — the compiler rejects an unsafe block anywhere in the repository. No FFI, no raw pointers, no C++ toolchain in the build.
01The API 02The map 03The proof
3D OCCUPANCY MAPPING · A PORT, NOT A WRAPPER
Occupied. Free.
Never observed.
A Rust-native port of OctoMap — byte-identical files, 284 tests against the C++ reference, and no unsafe code anywhere in the repository.

Motion is reduced in your system settings, so the reel doesn't start on its own.

0:00 / 0:45