Commit 75a433b1 authored by Trishna Saeharaseelan's avatar Trishna Saeharaseelan
Browse files

Merge branch '95-add-autonomy-object' into '67-mas-dt'

Add new Autonomy message type

See merge request !57
3 merge requests!59Release v2.0.0,!57Add new Autonomy message type,!36Resolve "Create temporary mas-dt branch for initial schema refactor"
Pipeline #262714 passed with stages
in 2 minutes and 9 seconds
......@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- New message type "autonomy_engine_control". Long term plan is to integrate this as an object into the planning configuration schema, where if an operation has autonomy, the metadata, configurations, any instructions / default settings shall be within this message structure section.
- Additional_data field to platform_status to input any other data from a platform to be published
- Goal object in mission_plan message that consists of a GeoJSON feature (representing the part of primitive that is currently the goal of the given mission plan).
- A `partial` flag that indicates if a mission plan is a partial plan or the entire mission plan
......
{
"header":{
"message_ID": "a127003c-0000-11aa-a1eb-b1cdf2342fdd",
"timestamp": "2025-02-07T00:00:00Z",
"version": "v2.0.0-beta.11",
"source": "noc-c2",
"destination": "mas-dt",
"delivery_type": "publish",
"encoded": false
},
"payload":{
"message_type": "autonomy_engine_control",
"planning_config_ID": "b127003c-0000-11aa-a1eb-b1cdf2342fdd",
"state": "start"
}
}
\ No newline at end of file
"""
schemas: Autonomy Engine control related data with Autonomy
Engine metadata, configurations and default instructions
"""
autonomy_engine_control_schema = {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"example": "autonomy_engine_control",
"enum": ["autonomy_engine_control"],
},
"state": {
"type": "string",
"enum": ["start", "pause", "stop"],
"description": "Autonomy engine instruction to start or stop model",
"example": "stop",
},
},
"oneOf": [
{
"properties": {
"planning_config_ID": {
"type": "string",
"format": "uuid",
"pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
"description": "Unique identifier (uuid) for this specification version generated",
},
},
},
{
"properties": {
"planning_config_ID": {
"type": "integer",
"description": "Unique identifier (uuid) for this specification version generated",
"example": 2,
},
},
},
],
"required": ["message_type", "planning_config_ID"],
}
......@@ -3,6 +3,7 @@ payload_schema = {
"propertyName": "message_type",
"mapping": {
"alert": "#/components/schemas/alert",
"autonomy_engine_control": "#/components/schemas/autonomy_engine_control",
"mission_plan": "#/components/schemas/mission_plan",
"mission_plan_encoded": "#/components/schemas/mission_plan_encoded",
"observation": "#/components/schemas/observation",
......@@ -22,6 +23,7 @@ payload_schema = {
"oneOf": [
{"$ref": "#/components/schemas/alert"},
{"$ref": "#/components/schemas/acknowledgement"},
{"$ref": "#/components/schemas/autonomy_engine_control"},
{"$ref": "#/components/schemas/mission_plan"},
{"$ref": "#/components/schemas/mission_plan_encoded"},
{"$ref": "#/components/schemas/observation"},
......
"""
Temporary message definition to handle the MAS-DT dry-run mode
Temporary message definition to handle the MAS-DT dry-run mode
In dry-run the SFMC adapter will receive misson_plan messages from ORI
These messages will be parsed and compiled into a goto file which will
not be sent on to the glider
not be sent on to the glider
To confirm the message flow is working the SFMC will instead publish
a waypoints message back to the backbone which C2 can receive and
process - adding simulated waypoints to C2 positions
To confirm the message flow is working the SFMC will instead publish
a waypoints message back to the backbone which C2 can receive and
process - adding simulated waypoints to C2 positions
"""
waypoint_schema = {
......
from formats.header import message_header
from formats.message import message_schema
from formats.autonomy_engine_control import autonomy_engine_control_schema
from formats.mission_plan import mission_plan_schema
from formats.mission_plan_encoded import mission_plan_encoded_schema
from formats.observation import observation_schema
......@@ -49,9 +50,9 @@ def get_swagger_config(reload=False):
"swagger_ui": True,
"specs_route": "/",
"info": {
"title": "SoAR Backbone Message Formats",
"title": "Backbone Message Formats",
"version": "1.0",
"description": "SoAR message protocol in schemas",
"description": "message protocol in schemas",
},
"specs": [
{
......@@ -66,6 +67,7 @@ def get_swagger_config(reload=False):
"MESSAGE": message_schema,
"header": message_header,
"payload": payload_schema,
"autonomy_engine_control": autonomy_engine_control_schema,
"mission_plan": mission_plan_schema,
"mission_plan_encoded": mission_plan_encoded_schema,
"observation": observation_schema,
......
......@@ -111,6 +111,54 @@
],
"type": "object"
},
"autonomy_engine_control": {
"oneOf": [
{
"properties": {
"planning_config_ID": {
"description": "Unique identifier (uuid) for this specification version generated",
"format": "uuid",
"pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
"type": "string"
}
}
},
{
"properties": {
"planning_config_ID": {
"description": "Unique identifier (uuid) for this specification version generated",
"example": 2,
"type": "integer"
}
}
}
],
"properties": {
"message_type": {
"description": "Type of message",
"enum": [
"autonomy_engine_control"
],
"example": "autonomy_engine_control",
"type": "string"
},
"state": {
"description": "Autonomy engine instruction to start or stop model",
"enum": [
"start",
"pause",
"stop"
],
"example": "stop",
"type": "string"
}
},
"required": [
"message_type",
"planning_config_ID"
],
"type": "object"
},
"config_file": {
"properties": {
"content": {
......@@ -1828,6 +1876,7 @@
"mapping": {
"acknowledgement": "#/components/schemas/acknowledgement",
"alert": "#/components/schemas/alert",
"autonomy_engine_control": "#/components/schemas/autonomy_engine_control",
"mission_plan": "#/components/schemas/mission_plan",
"mission_plan_encoded": "#/components/schemas/mission_plan_encoded",
"observation": "#/components/schemas/observation",
......@@ -1849,6 +1898,9 @@
{
"$ref": "#/components/schemas/acknowledgement"
},
{
"$ref": "#/components/schemas/autonomy_engine_control"
},
{
"$ref": "#/components/schemas/mission_plan"
},
......@@ -2908,8 +2960,8 @@
}
},
"info": {
"description": "SoAR message protocol in schemas",
"title": "SoAR Backbone Message Formats",
"description": "message protocol in schemas",
"title": "Backbone Message Formats",
"version": "1.0"
},
"openapi": "3.0.2",
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment