rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
6.26k stars 292 forks source link

Automatic batch upcasting inconsistent in Python SDK #7350

Open teh-cmc opened 2 weeks ago

teh-cmc commented 2 weeks ago

rrb.Spatial2DView(
    origin="/depth",
    name="grayscale",
    overrides={
        "/depth": [
            rrb.VisualizerOverrides([rrb.visualizers.DepthImage]),
            rr.components.Color([0, 255, 0]),  ## this is legal -- auto upcasted to ColorBatch
            rr.components.Colormap(rr.components.Colormap.Grayscale),  ## this is illegal
            rr.components.ColormapBatch(rr.components.Colormap.Grayscale),  ## have to do this instead
        ]
    },
),
Wumpf commented 1 week ago

hit this as well when typing out the example here https://github.com/rerun-io/rerun/issues/7337#issuecomment-2337352343