perf(rerun): render voxel maps as Points3D spheres instead of Boxes3D#1793
perf(rerun): render voxel maps as Points3D spheres instead of Boxes3D#1793ruthwikdasyam merged 7 commits intodevfrom
Conversation
Greptile SummaryThis PR replaces Confidence Score: 5/5Safe to merge — all remaining findings are P2 style/robustness suggestions with no impact on correctness or runtime behavior. The change is a straightforward caller-side swap (mode=spheres) that uses an existing, well-tested rr.Points3D code path. No data loss, no breaking API change. The three P2 comments (stale docstring, else-fallthrough, voxel-size inconsistency in the security blueprint) do not affect the correctness of the primary render path. dimos/msgs/sensor_msgs/PointCloud2.py (docstring and else-fallthrough); dimos/robot/unitree/go2/blueprints/agentic/unitree_go2_security.py (voxel_size still 0.1) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["PointCloud2.to_rerun(voxel_size, mode, ...)"] --> B{mode?}
B -- "points" --> C["rr.Points3D(positions)\nno radii — raw point cloud"]
B -- "boxes" --> D["rr.Boxes3D(centers, half_sizes)\n12 line segments per voxel"]
B -- "spheres\n(all blueprint callers)" --> E["rr.Points3D(positions, radii=voxel_size/2)\nbillboarded quad per voxel — ~10x cheaper"]
B -- "any other string\n(silent fallthrough)" --> E
E --> F["Rerun viewer\n~20 fps @ 400k voxels"]
D --> G["Rerun viewer\n~2 fps @ 400k voxels"]
|
leshy
left a comment
There was a problem hiding this comment.
Hey we can probably just change PointCloud2 to_rerun() function to do this by default? and we can just delete explicit overrides from all blueprints
Problem
endering each voxel as an
rr.Boxes3Dinstance is expensive - each box is 12 line segments in theRerun line renderer, whereas
rr.Points3Dwith a world-space radius is a single billboarded quad per pointCloses #1631
Solution
Flip all
PointCloud2.to_rerun(mode="boxes")callers tomode="spheres". Same world-space voxel footprint, renders as spheres instead of cubes, ~10x cheaper at high point countsmode=boxesis still present0 hz. Can be adjusted when needed (if, boxes are used)Breaking Changes
None
How to Test
quick test -> `dimos --replay --replay-dir=unitree_go2_bigoffice run unitree-go2'
Contributor License Agreement
Looks good. Able to maintain good fps (~20) with 400k voxels at 0.05 radius