Commit d367883d authored by Trishna Saeharaseelan's avatar Trishna Saeharaseelan
Browse files

feat: add new autonomy message type

parent 55bba36b
Pipeline #261484 failed with stages
in 34 seconds
...@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ...@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added ### Added
- New message type "autonomy". 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 - 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). - 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 - 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",
"planning_config_ID": 1,
"version": "v0.1.2",
"state": "start"
}
}
\ No newline at end of file
"""
schemas: Autonomy related data with Autonomy Engine metadata,
configurations and default instructions
"""
autonomy_schema = {
"type": "object",
"properties": {
"message_type": {
"type": "string",
"description": "Type of message",
"example": "autonomy",
"enum": ["autonomy"],
},
"planning_config_ID": {
"type": "integer",
"description": "Unique identifier of autonomy engine's planning config ID"
+ " configuration plan",
"example": 3,
},
"version": {
"type": "string",
"description": "Version of autonomy engine for given planning config ID",
"example": "v1.0.0",
},
"state": {
"type": "string",
"enum": ["start", "stop"],
"description": "Autonomy engine instruction to start or stop model",
"example": "stop",
},
},
"required": [
"message_type",
"planning_config_ID"
],
}
from formats.header import message_header from formats.header import message_header
from formats.message import message_schema from formats.message import message_schema
from formats.autonomy import autonomy_schema
from formats.mission_plan import mission_plan_schema from formats.mission_plan import mission_plan_schema
from formats.mission_plan_encoded import mission_plan_encoded_schema from formats.mission_plan_encoded import mission_plan_encoded_schema
from formats.observation import observation_schema from formats.observation import observation_schema
...@@ -49,9 +50,9 @@ def get_swagger_config(reload=False): ...@@ -49,9 +50,9 @@ def get_swagger_config(reload=False):
"swagger_ui": True, "swagger_ui": True,
"specs_route": "/", "specs_route": "/",
"info": { "info": {
"title": "SoAR Backbone Message Formats", "title": "Backbone Message Formats",
"version": "1.0", "version": "1.0",
"description": "SoAR message protocol in schemas", "description": "message protocol in schemas",
}, },
"specs": [ "specs": [
{ {
...@@ -66,6 +67,7 @@ def get_swagger_config(reload=False): ...@@ -66,6 +67,7 @@ def get_swagger_config(reload=False):
"MESSAGE": message_schema, "MESSAGE": message_schema,
"header": message_header, "header": message_header,
"payload": payload_schema, "payload": payload_schema,
"autonomy": autonomy_schema,
"mission_plan": mission_plan_schema, "mission_plan": mission_plan_schema,
"mission_plan_encoded": mission_plan_encoded_schema, "mission_plan_encoded": mission_plan_encoded_schema,
"observation": observation_schema, "observation": observation_schema,
......
...@@ -111,6 +111,42 @@ ...@@ -111,6 +111,42 @@
], ],
"type": "object" "type": "object"
}, },
"autonomy": {
"properties": {
"message_type": {
"description": "Type of message",
"enum": [
"autonomy"
],
"example": "autonomy",
"type": "string"
},
"planning_config_ID": {
"description": "Unique identifier of autonomy engine's planning config ID configuration plan",
"example": 3,
"type": "integer"
},
"state": {
"description": "Autonomy engine instruction to start or stop model",
"enum": [
"start",
"stop"
],
"example": "stop",
"type": "string"
},
"version": {
"description": "Version of autonomy engine for given planning config ID",
"example": "v1.0.0",
"type": "string"
}
},
"required": [
"message_type",
"planning_config_ID"
],
"type": "object"
},
"config_file": { "config_file": {
"properties": { "properties": {
"content": { "content": {
...@@ -2908,8 +2944,8 @@ ...@@ -2908,8 +2944,8 @@
} }
}, },
"info": { "info": {
"description": "SoAR message protocol in schemas", "description": "message protocol in schemas",
"title": "SoAR Backbone Message Formats", "title": "Backbone Message Formats",
"version": "1.0" "version": "1.0"
}, },
"openapi": "3.0.2", "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