-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathscene-controller-api.yaml
More file actions
253 lines (246 loc) · 7.99 KB
/
scene-controller-api.yaml
File metadata and controls
253 lines (246 loc) · 7.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
asyncapi: "2.6.0"
info:
title: Scenescape MQTT API - Scene Controller Service
version: "1.0.0"
description: |
The Scene Controller service is responsible for real-time scene tracking and event generation.
Flow Description:
- The Scene Controller `subscribes` to camera data from `scenescape/data/camera/{camera_id}`.
- It also `subscribes` to external `sensor data` from `scenescape/data/sensor/{sensor_id}` to enhance scene awareness.
- It processes live camera detections into `scene objects`.
- It `publishes` unregulated tracking results to `scenescape/data/scene/{scene_id}/{thing_type}` for each object type (e.g., person, vehicle).
- It `publishes` regulated (filtered or validated) track results to `scenescape/regulated/scene/{scene_id}`.
- Based on scene and sensor inputs, it **detects events** and **publishes** event notifications to `scenescape/event/{region_type}/{scene_id}/{region_id}/{event_type}`.
channels:
scenescape/data/camera/{camera_id}:
parameters:
camera_id:
description: Camera identifier
schema:
type: string
subscribe:
summary: Scene Controller subscribes to live camera data
message:
payload:
type: object
properties:
timestamp:
type: string
format: date-time
debug_timestamp_end:
type: string
format: date-time
debug_mac:
type: string
id:
type: string
objects:
type: object
additionalProperties:
type: array
items:
type: object
rate:
type: number
minimum: 0
intrinsics:
type: object
properties:
fx:
type: number
fy:
type: number
cx:
type: number
cy:
type: number
distortion:
type: object
description: >-
Lens distortion coefficients keyed by name.
properties:
k1:
type: number
k2:
type: number
p1:
type: number
p2:
type: number
k3:
type: number
scenescape/regulated/scene/{scene_id}:
parameters:
scene_id:
description: Scene identifier
schema:
type: string
publish:
summary: Scene Controller publishes regulated track data
message:
payload:
type: object
properties:
timestamp:
type: string
format: date-time
id:
type: string
name:
type: string
scene_rate:
type: number
minimum: 0
rate:
type: object
additionalProperties:
type: number
objects:
type: array
description: >-
Array of tracked scene objects. Each object includes fields such as
`id`, `translation`, `velocity`, `visibility`, `regions`, `sensors`,
`metadata`, and more.
items:
type: object
scenescape/data/scene/{scene_id}/{thing_type}:
parameters:
scene_id:
description: Scene identifier
schema:
type: string
thing_type:
description: Type of object (e.g., person, car)
schema:
type: string
publish:
summary: Scene Controller publishes unregulated track data
message:
payload:
type: object
properties:
timestamp:
type: string
format: date-time
id:
type: string
name:
type: string
rate:
type: number
minimum: 0
unique_detection_count:
type: integer
minimum: 0
objects:
type: array
description: >-
Array of tracked scene objects. Each object includes fields such as
`id`, `translation`, `velocity`, `visibility`, `regions`, `sensors`,
`metadata`, and more.
items:
type: object
scenescape/event/{region_type}/{scene_id}/{region_id}/{event_type}:
parameters:
region_type:
description: Region, sensor, or tripwire type
schema:
type: string
scene_id:
description: Scene identifier
schema:
type: string
region_id:
description: Region, sensor, or tripwire identifier
schema:
type: string
event_type:
description: Event type
schema:
type: string
publish:
summary: Scene Controller publishes scene event messages
message:
payload:
type: object
properties:
timestamp:
type: string
format: date-time
scene_id:
type: string
scene_name:
type: string
region_id:
type: string
description: Present in region events
region_name:
type: string
description: Present in region events
tripwire_id:
type: string
description: Present in tripwire events
tripwire_name:
type: string
description: Present in tripwire events
counts:
type: object
additionalProperties:
type: integer
objects:
type: array
items:
type: object
description: >-
In region-scoped payloads, objects currently inside a region include a live
regions.<region_id>.dwell value in seconds alongside the entered timestamp.
entered:
type: array
items:
type: object
description: >-
Objects that entered the region during this cycle. In region events, each element is a bare
track object and may include regions.<region_id>.dwell for the current region. In tripwire events, this array is always empty. May be
empty in region events when no entry occurred.
exited:
type: array
items:
type: object
description: >-
Objects that exited the region during this cycle. In region events, each element has shape
{"object": <track>, "dwell": <seconds>}. In tripwire events, this
array is always empty. May be empty in region events when no exit
occurred.
metadata:
type: object
description: >-
Region or tripwire geometry. Region events include: title, uuid, points
(polygon vertices), area, fromSensor. Tripwire events include: title,
uuid, points (two endpoints).
scenescape/data/sensor/{sensor_id}:
parameters:
sensor_id:
description: Sensor identifier
schema:
type: string
subscribe:
summary: Scene Controller subscribes to sensor data
message:
payload:
type: object
properties:
timestamp:
type: string
format: date-time
id:
type: string
value:
description: >-
Sensor reading — numeric scalar, string, boolean, or any JSON value.
subtype:
type: string
rate:
type: number
minimum: 0