ON THIS PAGE

  • Configuration
  • Reference
  • Root fields
  • Info
  • Runtime
  • Configuration

Configuration

Perception Apps are configured using a TOML file called robotapp.toml. The file is located in root directory of the app. Here is an example one:
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 = 1

Reference

Root fields

config_version The version of the configuration file format. Currently, the only supported version is 2.0.

Info

The info section contains information about the app, such as its name and description.
FieldDescription
info.nameThe name of the app. Currently unused.
info.descriptionThe description of the app. Currently unused.

Runtime

The runtime section configures the runtime environment of the app.
FieldDescription
runtime.applicationThe name of the Python file containing the app's main logic. The path is relative to the root directory.
runtime.workdirThe working directory of the app. Defaults to /app.
runtime.permissionsThe permissions required to run the app. Defaults to [].An example:
Toml
1permissions = ["gpio", "i2c"]
runtime.runs_onThe 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. If the registry is private (requires authentication), see Container Registry configuration.An example:
Toml
1[runtime.runs_on]
2type = "image"
3name = "ghcr.io/luxonis/robothub-app-v2:2023.326.2033-rvc2-regular"

Configuration

The configuration section defines the install-time configuration of the app.Visual
TypeDescription
divider
The divider to use for the configuration section.An example:
Toml
1[[configuration]]
2visual = "divider"
section
The section to use for the configuration section.An example:
Toml
1[[configuration]]
2visual = "section"
3title = "Upload intervals"
Fields
TypeDescription
boolean
A boolean field.An example:
Toml
1[[configuration]]
2field = "boolean"
3key = "my_boolean"
4label = "Enable feature"
5initial_value = true
num_range
A number range field.An example:
Toml
1[[configuration]]
2field = "num_range"
3key = "my_num_range"
4label = "Range"
5step = 1
6min = 0
7max = 100
8initial_value = 50
choice
A choice field.An example:
Toml
1[[configuration]]
2field = "choice"
3key = "my_choice"
4label = "Choose option"
5style = "radio" # ir "dropdown"
6allow_multiple = false
7options = [
8  { key = "option1", label = "Option 1", default = true },
9  { key = "option2", label = "Option 2" }
10]
text
A text field.An example:
Toml
1[[configuration]]
2field = "text"
3key = "my_text"
4label = "Text input"
5prefix = "USD"
6initial_value = "Example"
time_range
A time range field.An example:
Toml
1[[configuration]]
2field = "time_range"
3key = "my_time_range"
4label = "Time range"
5initial_value = { from = "08:00", to = "18:00" }
roi_rect4_selector
A ROI selector on live stream field. Defined by 2 points (x0, y0) and (x1, y1).An example:
Toml
1[[configuration]]
2field = "roi_rect4_selector"
3key = "my_roi_rect4_selector"
4label = "Detection area"
5initial_value = "0,0,1,1"
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
1[[configuration]]
2field = "roi_rect8_selector"
3key = "my_roi_rect8_selector"
4label = "Detection area"
5initial_value = "0,0;1,0;0,1;1,1"