feat: ray tracer and 3d planner mem2 transforms#2368
Conversation
❌ 1 Tests Failed:
View the top 2 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Greptile SummaryThis PR wires the Rust voxel ray-tracer and MLS 3D planner into the mem2 pipeline as new
Confidence Score: 5/5Safe to merge — both transformers are stateless per pipeline call, the emit/flush logic is verified by tests, and the replay utility is a dev-only script with no production code paths. The transformer logic is straightforward: RayTraceMap correctly accumulates lidar and flushes remainders, MLSPlan creates a fresh planner per call and derives outputs cleanly. Unit tests cover cadence, flush, pose-less skipping, and planning failure. CI changes are mechanical (dependency sync + two new test files). No data-loss or incorrect-state paths were found. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant DB as SqliteStore
participant LA as lidar stream
participant OA as odom stream
participant AL as align()
participant FT as FnTransformer<br/>(_attach_pose_from_odom)
participant RT as RayTraceMap
participant MP as MLSPlan
participant RR as rerun
DB->>LA: stream PointCloud2 obs
DB->>OA: stream Odometry obs
LA->>AL: primary (lidar)
OA->>AL: secondary (odom)
AL->>FT: AlignedPair obs (lidar[0], odom[1])
FT->>RT: lidar Observation with pose from odom
Note over RT: accumulate into VoxelRayMapper<br/>emit every N frames + flush remainder
RT->>MP: Observation[PointCloud2] (accumulated map + frame_count tag)
Note over MP: compute start = (x, y, z - robot_height)<br/>update_global_map → plan(start, goal)
MP->>RR: "Observation[Path] with tags:<br/>voxel_map, surface_map, nodes,<br/>node_edges, start, planned"
Reviews (5): Last reviewed commit: "Merge branch 'main' into andrew/feat/ray..." | Re-trigger Greptile |
| from numpy.typing import NDArray | ||
| import pytest | ||
|
|
||
| pytest.importorskip("dimos_voxel_ray_tracing") |
There was a problem hiding this comment.
Noooooo, don't skip the tests 😭
There was a problem hiding this comment.
Think this'll be necessary if it's an optional dependency (also see the other thread about merging into the regular test job).
There was a problem hiding this comment.
But if the test is never executed then why have it at all?
There was a problem hiding this comment.
The tests do get ran in the rust job. First it builds the binaries, then does the pytest, so the importorskip imports properly.
There was a problem hiding this comment.
They just get skipped in all the other jobs that don't build the binaries
There was a problem hiding this comment.
But they do get skipped locally by default, right? That is, if I run this locally, do they get executed:
git clone ...
CYCLONEDDS_HOME=/opt/cyclonedds uv sync --all-extras --all-groups
uv run pytest -m 'not (tool or mujoco)'
There was a problem hiding this comment.
Because you need to build the dependency, yeah.
There was a problem hiding this comment.
Yeah they'll get skipped by default. But part of the dev process is building the binaries, so I think that's alright at least for now? Once we do what Sam mentioned, then I think we should be able to remove this
Dreamsorcerer
left a comment
There was a problem hiding this comment.
Approving the CI change per the discussion.
Problem
mem2 transforms allow for faster algo dev
Closes DIM-XXX
Solution
Wire the ray tracer and 3d planner together using the Rust bindings in to a mem2 pipeline.
How to Test
build FFI
run
Contributor License Agreement