scene_service.scene_graph.builder

SceneGraphBuilder — async rebuild loop that reads ObjectRegistry, generates captions, infers relations via LLM, and stores a snapshot.

Runs as a low-frequency background task (default 30 s) and never blocks the real-time perception tick.

Functions

scene_graph_loop(builder, stop)

Background loop that rebuilds the scene graph periodically.

Classes

SceneGraphBuilder(registry, captioner, ...)

Reads ObjectRegistry, generates captions and relations, stores result.

SceneGraphConfig()

Pull scene-graph config from environment variables.

class scene_service.scene_graph.builder.SceneGraphBuilder(registry: ObjectRegistry, captioner: NodeCaptioner, relation_inferer: RelationInferer, store: SceneGraphStore, config: SceneGraphConfig | None = None)[source]

Bases: object

Reads ObjectRegistry, generates captions and relations, stores result.

async rebuild_once() SceneGraphSnapshot[source]
class scene_service.scene_graph.builder.SceneGraphConfig[source]

Bases: object

Pull scene-graph config from environment variables.

async scene_service.scene_graph.builder.scene_graph_loop(builder: SceneGraphBuilder, stop: Event) None[source]

Background loop that rebuilds the scene graph periodically.