Configuration
感知应用程序由一个 TOML file 叫做robotapp.toml的文件配置. 该文件在App的根目录中. 这里是一个示例:Toml
1config_version = "2.0"
2
3[info]
4name = "{{{ APP_NAME }}}"
5description = "This is a generated description. Replace it with your own."
6
7[runtime]
8application = "app.py#Application"
9workdir = "/app"
10
11[runtime.runs_on]
12type = "image"
13name = "ghcr.io/luxonis/robothub-app-v2:2023.326.2033-rvc2-regular"
14
15[[configuration]]
16visual = "section"
17title = "Upload intervals"
18
19[[configuration]]
20key = "image_event_upload_interval_minutes"
21label = "Image event upload interval (minutes)"
22field = "num_range"
23step = 1
24min = 1
25max = 60
26initial_value = 1Reference
Root fields
config_version 配置文件的格式版本. 目前, 仅支持的版本是 2.0.Info
info 板块包含了App信息, 例如它的名字和描述.| Field | Description |
|---|---|
info.name | The name of the app. Currently unused. |
info.description | The description of the app. Currently unused. |
Runtime
runtime 部分配置应用程序的运行时环境.| Field | Description |
|---|---|
runtime.application | The name of the Python file containing the app's main logic. The path is relative to the root directory. |
runtime.workdir | The working directory of the app. Defaults to /app. |
runtime.permissions | The permissions required to run the app. Defaults to [].An example:Toml |
runtime.runs_on | The runtime container in which the app will run.type = "image"The app will run in a container based on the specified image. The image is pulled before installation.An example:Toml |
Configuration
configuration 定义了应用的安装时配置.Visual| Type | Description |
|---|---|
divider | The divider to use for the configuration section.An example: Toml |
section | The section to use for the configuration section.An example: Toml |
| Type | Description |
|---|---|
boolean | A boolean field.An example: Toml |
num_range | A number range field.An example: Toml |
choice | A choice field.An example: Toml |
text | A text field.An example: Toml |
time_range | A time range field.An example: Toml |
roi_rect4_selector | A ROI selector on live stream field. Defined by 2 points (x0, y0) and (x1, y1).An example: Toml |
roi_rect8_selector | A ROI selector on live stream field. Defined by 4 points (x0, y0), (x1, y1), (x2, y2), (x3, y3).An example: Toml |