scan_candi_with_octomap_rust — cargo run -p candi-sim --bin live_scan
rustc 1.85 · edition 2024
01 The flight
MuJoCo scene
Candi15.00 × 15.00 × 6.00 m
Orbit radius16.53 m
Waypoints288
Voxel size0.10 m
Depth camera · 640 × 480
waypoint 000 · 640×480
0of 288 waypoints rendered
// pose is an input, not a result — // no SLAM, no localization here for wp in
orbit.waypoints() { let depth = cam.render(wp);
map.insert_point_cloud(..);
}
02 The map
never observed
Per waypoint
1
Render a depth image
MuJoCo · 640×480
2
Unproject to a world-frame cloud
frame conventions matter here
3
Ground-plane filter
without it the map is mostly floor
4
Insert into octomap-core
occupied / free / unknown
5
…and into a hash grid
the comparison baseline
6
Write the artefacts
2 PNG projections + a Rerun .rrd
Points integrated0
Occupied voxels0
03 The cross-check
$cargo run --release -p candi-sim --bin live_scan -- --octree-no-carve
octomap-corehash grid
occupied leaves / entries60,28876,920
occupied voxels at 0.1 m76,92076,920
76,920 voxels from both, out of 2.9 million points —
two independently written implementations, same input, same answer.
The gap on the octree side is pruning
60,288 leaves standing for 76,920 voxels. One merged node stands for
eight base voxels — or eight thousand. A leaf is not a voxel.
With free-space carving switched back on the
two maps diverge on purpose: a ray passing through erases a voxel one viewpoint saw
as occupied while others prove the space empty. Only the octree carves.
What a run leaves behind
out/map_top.pngterraces, staircases, summit
out/map_side.pngthe stepped profile
out/candi_scan.rrd288-frame Rerun recording
Rust 1.85MuJoCo 3.9.0rerun 0.35octomap-coreROS 2 JazzyPython: offline only
AERIAL OCCUPANCY MAPPING, END TO END IN RUST
a reference application for octo_map_rust
Four terraces, four staircases, and one patch it
will not guess at.
288 simulated depth frames folded into a probabilistic occupancy
map — and cross-checked, voxel for voxel, against an independent implementation.
Motion is reduced in your system settings, so the reel doesn't start on its own.