Skip to content

Commit

Permalink
release(schema): component 1-1-2 (#225)
Browse files Browse the repository at this point in the history
* feat: update reference from draft to interfaces 1-0-0

* fix: wrong ref to signal_type instead of signal

* docs: update links to interfaces schema 1-0-0

* release(schema): component 1-1-2
  • Loading branch information
eeberhard authored Feb 11, 2025
1 parent e935ff9 commit 2b58662
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ components, as they provide no meaningful behavior if directly instantiated.
## Signals

The expected structure of the signal description is defined by
the [Signal Description JSON schema](../../../static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/signal).
the [Signal Description JSON schema](../../../static/schemas/1-0-0/interfaces.schema.json#/$defs/signal).

Component inputs and outputs are described with a signal name and type, matching the name and type in the implementation
when using the respective `add_input` or `add_output` function. Additionally, a human-readable display name and
Expand Down Expand Up @@ -133,15 +133,15 @@ An example description of a component with one input and one output, both as joi
## Parameters

The expected structure of the parameter description is defined by
the [Parameter Description JSON schema](../../../static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/parameter).
the [Parameter Description JSON schema](../../../static/schemas/1-0-0/interfaces.schema.json#/$defs/parameter).

Parameters contain a value of a certain type, described by the `parameter_type` property. Valid parameter types are
defined in
the [Parameter Type JSON schema](../../../static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/parameter_type).
the [Parameter Type JSON schema](../../../static/schemas/1-0-0/interfaces.schema.json#/$defs/parameter_type).

If the `parameter_type` property is `state`, then the `parameter_state_type` property must also be defined as a member
of the enumeration
in [Encoded State Type JSON schema](../../../static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/encoded_state_type.schema.json).
in [Encoded State Type JSON schema](../../../static/schemas/1-0-0/interfaces.schema.json#/$defs/encoded_state_type.schema.json).

Parameters generally have a default value which renders them optional in some cases. When a parameter has no valid
default state and must be set by the user for the component to function, the `default_value` property in the component
Expand Down Expand Up @@ -176,7 +176,7 @@ An example parameter description is shown below.
## Predicates

The expected structure of the predicate description is defined by
the [Predicate Description JSON schema](../../../static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/predicate).
the [Predicate Description JSON schema](../../../static/schemas/1-0-0/interfaces.schema.json#/$defs/predicate).

Predicates are crucial to drive the event logic of the Dynamic State Engine, but they are very simple to declare
and describe. Each predicate of a component indicates a particular run-time state or configuration that is either
Expand All @@ -203,7 +203,7 @@ An example predicate description is shown below.
## Services

The expected structure of the service description is defined by
the [Service Description JSON schema](../../../static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/service).
the [Service Description JSON schema](../../../static/schemas/1-0-0/interfaces.schema.json#/$defs/service).

Services are endpoints provided by a component that can trigger certain behaviours. In the backend implementation,
they are created as ROS2 services with a specific `service_name` using one of two service message types. The first
Expand Down
13 changes: 10 additions & 3 deletions schemas/component-descriptions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

Release Versions:

- [1-1-1](#111)
- [1-1-0](#110)
- [1-0-0](#100)
- [1-1-2](#1-1-2)
- [1-1-1](#1-1-1)
- [1-1-0](#1-1-0)
- [1-0-0](#1-0-0)

## 1-1-2

Version 1-1-2 uses the new common interfaces schema at version 1-0-0 for the definitions of parameters, predicates,
services and signals. This version includes `joint_accelerations`, `digital_io_state`, `analog_io_state` as available
signal types.

## 1-1-1

Expand Down
12 changes: 6 additions & 6 deletions schemas/component-descriptions/schema/component.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$id": "/1-1-1/component.schema.json",
"$id": "/1-1-2/component.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Dynamic Component Description",
"description": "A full description of a dynamic component in the AICA application framework.",
Expand Down Expand Up @@ -71,7 +71,7 @@
"description": "The fixed input signals (subscriptions) of the component.",
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/signal"
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/1-0-0/interfaces.schema.json#/$defs/signal"
},
"uniqueItems": true
},
Expand All @@ -89,7 +89,7 @@
"description": "The output signals (publications) of the component.",
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/signal_type"
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/1-0-0/interfaces.schema.json#/$defs/signal"
},
"uniqueItems": true
},
Expand All @@ -98,7 +98,7 @@
"description": "The parameters declared by the component.",
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/parameter"
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/1-0-0/interfaces.schema.json#/$defs/parameter"
},
"uniqueItems": true
},
Expand All @@ -107,7 +107,7 @@
"description": "The predicates provided by the component.",
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/predicate"
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/1-0-0/interfaces.schema.json#/$defs/predicate"
},
"uniqueItems": true
},
Expand All @@ -116,7 +116,7 @@
"description": "The services provided by the component.",
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/service"
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/1-0-0/interfaces.schema.json#/$defs/service"
},
"uniqueItems": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
},
"signal_type": {
"description": "The default type of the signals (signals in a collection must have the same type).",
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/signal_type"
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/1-0-0/interfaces.schema.json#/$defs/signal_type"
},
"signal_types": {
"description": "An array of signal types supported by configurable typing. The active type is set through the '<$input_collection_name>_type' parameter, and the default type is determined by the `signal_type` property.",
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/draft/1-0-0/interfaces.schema.json#/$defs/signal_type"
"$ref": "https://raw.githubusercontent.com/aica-technology/api/main/docs/static/schemas/1-0-0/interfaces.schema.json#/$defs/signal_type"
},
"minItems": 1,
"uniqueItems": true
Expand Down

0 comments on commit 2b58662

Please sign in to comment.