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

Introduce space-origin-relative paths for entity-path-expressions and query results #4899

Open jleibs opened 7 months ago

jleibs commented 7 months ago

Related:

Proposal

Every Space View has a property: “origin”:

When evaluating a query-expression, we allow for substitution of “$origin”

The default query for every spaceview becomes “$origin/**”

When displaying the query results under a SpaceView the query results are divided into two sub-sets:

Implies

rr.view.Spatial2D(origin="world/camera", contents="$origin/**")

Which is syntactic sugar for:

entities = rr.view.EntityPathExpression("$origin/**") rr.view.Spatial2D(origin="world/camera", contents=entities)

![image](https://github.com/rerun-io/rerun/assets/3312232/65e4ef17-0d49-4f80-8ebf-f0840ff44c7b)

```python
# With extra data
rr.view.Spatial2D(origin="world/camera", contents="+$origin/** +/world/points")

# Or for python formatter clarity, allow lists:
rr.view.Spatial2D(
    origin="world/camera",
    contents=[
        "+$origin/**",
        "+/world/points",
    ],
)

image

# A less toy example
rr.view.Spatial2D(
    name="Left Gripper View"
    origin="/sim.32/world/robot.S23056387/left/arm/upper/lower/sensor_rig/camera/",
    contents=[
        "+$origin/**",
        "+/sim.32/world/robot.S23056387/**",
        "+/sim.32/world/global_map/**"
    ],
)

image

abey79 commented 6 months ago

Related issue re: proper visibility handling in the hierarchy:

As noted in the discussion today, this is temporarily going to be more complicated when Groups are removed, and call for either:

abey79 commented 6 months ago

We discussed the "visibility" issue with @nikolausWest this morning and the outcome was: