Source
...
Target
Commits (5)
......@@ -7,14 +7,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Removed
- Removed "repeat" primitive instruction's enum (planning config)
### Added
<<<<<<< HEAD
- 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
=======
- Added "informational" to enum for primitive's instruction enum (planning configuration)
>>>>>>> 7f768c7 (refactor(planning_configuration): update primitive instruction's enum and new goal obj)
- Options to primitives (under planning_configuration message) which is only a property when a primitive has an instruction of "follow" or "navigate_to"
- Validate message_ID matches uuid format
- Add definition of instruction_set message
- Added optional primitives to squad schema
### Changed
- Added "instruction" as required under the primitive schema (planning configuration)
- Refactor instructeion_set into platform_instruction_set
- Refactor mission_plan schema autonomy_engine_plan_ID oneOf
- Update all example messages with valid UUIDs
......
......@@ -12,6 +12,7 @@
"message_type": "mission_plan",
"platform_ID": "alr-52",
"autonomy_engine_plan_ID": "a427003c-0000-11aa-a1eb-b1cdf2342fcc",
"partial": false,
"plan": [
{
"action": "move",
......@@ -31,6 +32,23 @@
]
}
}
]
],
"goal": {
"timestamp": "2024-11-21T00:00:00Z",
"feature": {
"type": "Feature",
"properties": {
"name": "MAS-DT west",
"type": "target primitive"
},
"geometry": {
"type": "Point",
"coordinates": [
-3.0071,
50.3707
]
}
}
}
}
}
\ No newline at end of file
......@@ -153,6 +153,11 @@
50.335942
]
}
},
"options": {
"repeat": true,
"reverse": true,
"acceptance_radius_m": 3000
}
}
]
......
......@@ -101,6 +101,21 @@ action_schema = {
],
}
goal_schema = {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp of last state change when autonomy model"
+ " sets this goal",
"example": "2024-11-21T00:00:00Z",
},
"feature": {
"$ref": "https://geojson.org/schema/Feature.json",
},
},
}
mission_plan_schema = {
"type": "object",
"properties": {
......@@ -122,10 +137,18 @@ mission_plan_schema = {
"default": False,
"example": False,
},
"partial": {
"type": "boolean",
"description": "To indicate if this mission plan represents a "
+ "partial (`true`) or the entire (`false`) mission plan. E.g."
+ "Partial would be `true` if a full mission plan is broken down into multiple plans.",
"example": False,
},
"plan": {
"type": "array",
"items": action_schema,
},
"goal": goal_schema,
},
"oneOf": [
{
......
......@@ -181,26 +181,66 @@ platform_schema = {
],
}
primitive_schema = {
options_schema = {
"type": "object",
"properties": {
"instruction": {
"type": "string",
"enum": [
"stay_inside",
"stay_outside",
"navigate_to",
"follow",
"repeat",
"cover",
],
"description": "How the associated feature should be used",
},
"feature": {
"$ref": "https://geojson.org/schema/Feature.json",
"repeat": {
"type": "boolean",
"description": "Repeat these set of primitives in order (e.g. 1->2->3->1->2...)",
"example": True,
},
"reverse": {
"type": "boolean",
"description": "Loop backwards through the set of primitives (e.g 1->2->-3->2->1...)",
"example": True,
},
"acceptance_radius_m": {
"type": "number",
"format": "float",
"description": "Acceptance radius (if applicable) to points of geometry in metres",
"example": 10000,
},
},
"required": ["feature"],
}
primitive_schema = {
"oneOf": [
{
"properties": {
"instruction": {
"type": "string",
"enum": [
"navigate_to",
"follow",
],
"description": "How the associated feature should be used",
},
"options": options_schema,
"feature": {
"$ref": "https://geojson.org/schema/Feature.json",
},
},
"required": ["feature", "instruction"],
},
{
"properties": {
"instruction": {
"type": "string",
"enum": [
"stay_inside",
"stay_outside",
"cover",
"informational",
],
"description": "How the associated feature should be used",
},
"feature": {
"$ref": "https://geojson.org/schema/Feature.json",
},
},
"required": ["feature", "instruction"],
},
]
}
squad_metadata_schema = {
......
......@@ -1547,6 +1547,20 @@
"example": false,
"type": "boolean"
},
"goal": {
"properties": {
"feature": {
"$ref": "#/components/schemas/geojson.org.schema.Feature.json"
},
"timestamp": {
"description": "Timestamp of last state change when autonomy model sets this goal",
"example": "2024-11-21T00:00:00Z",
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"message_type": {
"description": "Type of message",
"enum": [
......@@ -1555,6 +1569,11 @@
"example": "mission_plan",
"type": "string"
},
"partial": {
"description": "To indicate if this mission plan represents a partial (`true`) or the entire (`false`) mission plan. E.g.Partial would be `true` if a full mission plan is broken down into multiple plans.",
"example": false,
"type": "boolean"
},
"plan": {
"items": {
"oneOf": [
......@@ -1928,27 +1947,69 @@
"primitives": {
"description": "Specification primitives - campaign-wide such as operating area and obstacles",
"items": {
"properties": {
"feature": {
"$ref": "#/components/schemas/geojson.org.schema.Feature.json"
"oneOf": [
{
"properties": {
"feature": {
"$ref": "#/components/schemas/geojson.org.schema.Feature.json"
},
"instruction": {
"description": "How the associated feature should be used",
"enum": [
"navigate_to",
"follow"
],
"type": "string"
},
"options": {
"properties": {
"acceptance_radius_m": {
"description": "Acceptance radius (if applicable) to points of geometry in metres",
"example": 10000,
"format": "float",
"type": "number"
},
"repeat": {
"description": "Repeat these set of primitives in order (e.g. 1->2->3->1->2...)",
"example": true,
"type": "boolean"
},
"reverse": {
"description": "Loop backwards through the set of primitives (e.g 1->2->-3->2->1...)",
"example": true,
"type": "boolean"
}
},
"type": "object"
}
},
"required": [
"feature",
"instruction"
]
},
"instruction": {
"description": "How the associated feature should be used",
"enum": [
"stay_inside",
"stay_outside",
"navigate_to",
"follow",
"repeat",
"cover"
],
"type": "string"
{
"properties": {
"feature": {
"$ref": "#/components/schemas/geojson.org.schema.Feature.json"
},
"instruction": {
"description": "How the associated feature should be used",
"enum": [
"stay_inside",
"stay_outside",
"cover",
"informational"
],
"type": "string"
}
},
"required": [
"feature",
"instruction"
]
}
},
"required": [
"feature"
],
"type": "object"
]
},
"type": "array"
},
......@@ -2139,27 +2200,69 @@
"primitives": {
"description": "Squad primitives - includes platform group navigation instructions",
"items": {
"properties": {
"feature": {
"$ref": "#/components/schemas/geojson.org.schema.Feature.json"
"oneOf": [
{
"properties": {
"feature": {
"$ref": "#/components/schemas/geojson.org.schema.Feature.json"
},
"instruction": {
"description": "How the associated feature should be used",
"enum": [
"navigate_to",
"follow"
],
"type": "string"
},
"options": {
"properties": {
"acceptance_radius_m": {
"description": "Acceptance radius (if applicable) to points of geometry in metres",
"example": 10000,
"format": "float",
"type": "number"
},
"repeat": {
"description": "Repeat these set of primitives in order (e.g. 1->2->3->1->2...)",
"example": true,
"type": "boolean"
},
"reverse": {
"description": "Loop backwards through the set of primitives (e.g 1->2->-3->2->1...)",
"example": true,
"type": "boolean"
}
},
"type": "object"
}
},
"required": [
"feature",
"instruction"
]
},
"instruction": {
"description": "How the associated feature should be used",
"enum": [
"stay_inside",
"stay_outside",
"navigate_to",
"follow",
"repeat",
"cover"
],
"type": "string"
{
"properties": {
"feature": {
"$ref": "#/components/schemas/geojson.org.schema.Feature.json"
},
"instruction": {
"description": "How the associated feature should be used",
"enum": [
"stay_inside",
"stay_outside",
"cover",
"informational"
],
"type": "string"
}
},
"required": [
"feature",
"instruction"
]
}
},
"required": [
"feature"
],
"type": "object"
]
},
"type": "array"
},
......