scene_service.state.object_registry¶
SceneObject registry — the canonical store for everything system/scene tracks about the world.
Functions
|
Wall-clock unix seconds. |
Classes
|
Axis-aligned bounding box in frame_id, centered on the object pose. |
|
Async-safe object store. |
|
|
|
Stable object record. |
- class scene_service.state.object_registry.BBox3D(size_x: float = 0.1, size_y: float = 0.1, size_z: float = 0.1, yaw: float = 0.0, frame_id: str = '')[source]¶
Bases:
objectAxis-aligned bounding box in frame_id, centered on the object pose.
- frame_id: str = ''¶
- property half_x: float¶
- property half_y: float¶
- size_x: float = 0.1¶
- size_y: float = 0.1¶
- size_z: float = 0.1¶
- yaw: float = 0.0¶
- class scene_service.state.object_registry.ObjectRegistry(*, grace_period_s: float = 5.0)[source]¶
Bases:
objectAsync-safe object store.
- all_objects() Iterable[SceneObject][source]¶
- clear_object_label_override(object_id: str) SceneObject[source]¶
Restore the model-owned label state captured before operator edit.
- delete_derived_object(object_id: str) SceneObject[source]¶
Delete one non-robot object or raise a precise lookup error.
- find_rebindable(label: str, pose: Pose3D, max_d: float, *, only_missing: bool = False, exclude_oids: Iterable[str] | None = None) SceneObject | None[source]¶
Nearest non-robot, non-restored record of class label whose centroid is within max_d of pose, else None.
- get_object(oid: str) SceneObject | None[source]¶
- insert_object(label: str, pose: Pose3D, bbox: BBox3D, confidence: float, now: float, *, is_robot: bool = False, source: str = 'perception') SceneObject[source]¶
Allocate a new SceneObject. Caller must hold self._lock.
- merge_duplicates(now: float, *, xy_m: float = 0.35, z_m: float = 1.2, max_merges: int = 64) list[tuple[str, str]][source]¶
Fold same-class records that describe one object into one record.
- prune_expired(now: float, ttl_s: float, *, merge_dist_m: float = 0.0) list[str][source]¶
Hard-delete missing perception records whose last_seen is older than ttl_s; returns the deleted object_ids.
- resolve_id(object_id: str, *, follow_inferred: bool = True) tuple[str | None, dict | None][source]¶
Map a possibly-stale id to the live id that now stands for it.
- restore_object(obj: SceneObject) None[source]¶
Re-insert a persisted object verbatim under its existing object_id (warm restore at boot).
- set_object_caption(object_id: str, caption: str, *, source: str, now: float) SceneObject[source]¶
Describe one object, or clear the description with an empty string.
- async snapshot() dict[str, SceneObject][source]¶
Atomic shallow copy.
- soft_evict(obj: SceneObject) None[source]¶
Mark a perception record missing and release its concept-graphs uuid binding instead of deleting it, so a later re-detection can re-bind the same id (and accumulated observation_count) via find_rebindable.
- update_object_geometry(object_id: str, pose: Pose3D, bbox: BBox3D) SceneObject[source]¶
Install a provenance-marked, deliberately non-nav operator bbox.
- update_object_label(object_id: str, label: str) SceneObject[source]¶
Apply a sticky operator-owned semantic label correction.
- update_object_pose(obj: SceneObject, new_pose: Pose3D, new_confidence: float, now: float, *, ema_pose: float = 0.3, ema_conf: float = 0.3) None[source]¶
EMA-blend new observation into the existing record.
- class scene_service.state.object_registry.Pose3D(x: 'float', y: 'float', z: 'float', yaw: 'float' = 0.0, frame_id: 'str' = '')[source]¶
Bases:
object- frame_id: str = ''¶
- x: float¶
- y: float¶
- yaw: float = 0.0¶
- z: float¶
- class scene_service.state.object_registry.SceneObject(object_id: str, label: str, pose: Pose3D, bbox: BBox3D, confidence: float, first_seen: float, last_seen: float, observation_count: int = 1, missing: bool = False, caption: str = '', caption_updated_at: float = 0.0, caption_source: str = '', attributes: dict[str, object]=<factory>)[source]¶
Bases:
objectStable object record.
- attributes: dict[str, object]¶
- caption: str = ''¶
- caption_source: str = ''¶
- caption_updated_at: float = 0.0¶
- property cls: str¶
the class is label.
- Type:
Deprecated
- confidence: float¶
- property display_name: str¶
class plus this object’s number.
- Type:
The short heading for one row
- first_seen: float¶
- label: str¶
- last_seen: float¶
- missing: bool = False¶
- object_id: str¶
- observation_count: int = 1¶
- property settled: bool¶
not the robot and not a provisional label. A remembered object counts though it is out of view (a loaded map’s objects all are). What the map pages and the captioner show; the rest is the registry’s working state, for the debug view.
- Type:
Part of the semantic map