Commit 8b622f22 authored by Dan Jones's avatar Dan Jones
Browse files

Merge branch...

Merge branch '60-mas-dt-refactor-region-and-exclusion-zones-into-primitives-in-planning_configuration' into '67-mas-dt'

Resolve "MAS-DT refactor region and exclusion zones into primitives in planning_configuration"

See merge request !38
3 merge requests!59Release v2.0.0,!38Resolve "MAS-DT refactor region and exclusion zones into primitives in planning_configuration",!36Resolve "Create temporary mas-dt branch for initial schema refactor"
Pipeline #231502 passed with stages
in 1 minute and 3 seconds
......@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- Refactored planning_configuration message definition
- Remove region_of_interest and exclusion_zones
- Add primitives array of classified geojson Features
- Inject remote geojson schema definitions
- Use geojson Polygon instead of region_schema
- Upgraded openapi-spec-validator to latest release (0.7.1)
......
......@@ -11,62 +11,80 @@
"payload":{
"message_type": "planning_configuration",
"planning_config_ID": 1,
"exclusion_zones": [
"primitives": [
{
"type": "Polygon",
"coordinates": [
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
"instruction": "stay_outside",
"feature": {
"type": "Feature",
"properties": {
"name": "The Rock",
"type": "exclusion_zone"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
]
]
]
}
],
"region_of_interest": [
}
}
},
{
"type": "Polygon",
"coordinates": [
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
"instruction": "stay_inside",
"feature": {
"type": "Feature",
"properties": {
"name": "Survey Zone Charlie",
"type": "operating area"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
]
]
]
]
]
}
}
}
],
"squads": [
......
......@@ -11,62 +11,97 @@
"payload":{
"message_type": "planning_configuration",
"planning_config_ID": 1,
"exclusion_zones": [
"primitives": [
{
"type": "Polygon",
"coordinates": [
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
"instruction": "stay_outside",
"feature": {
"type": "Feature",
"properties": {
"name": "The Rock",
"type": "exclusion_zone"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-4.181176,
50.334019
],
[
-4.179017,
50.332863
],
[
-4.179924,
50.332174
],
[
-4.182082,
50.33333
],
[
-4.181176,
50.334019
]
]
]
]
]
}
],
"region_of_interest": [
}
}
},
{
"type": "Polygon",
"coordinates": [
[
[
-4.1777839187560915,
50.34173405662855
],
[
-4.1777839187560915,
50.33820949229701
],
[
-4.143667777943875,
50.33820949229701
],
[
-4.143667777943875,
50.34173405662855
],
[
-4.1777839187560915,
50.34173405662855
"instruction": "stay_inside",
"feature": {
"type": "Feature",
"properties": {
"name": "Survey Zone Charlie",
"type": "operating area"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-4.183265,
50.337335
],
[
-4.178084,
50.33456
],
[
-4.182432,
50.331253
],
[
-4.187612,
50.334028
],
[
-4.183265,
50.337335
]
]
]
]
]
}
}
},
{
"instruction": "navigate_to",
"feature": {
"type": "Feature",
"properties": {
"name": "Target a",
"type": "target"
},
"geometry": {
"type": "Point",
"coordinates": [
-4.183181,
50.335942
]
}
}
}
],
"squads": [
......
......@@ -214,6 +214,28 @@ squad_metadata_schema = {
],
}
primitive_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",
},
},
"required": ["feature"],
}
planning_configuration_schema = {
"type": "object",
"properties": {
......@@ -229,19 +251,10 @@ planning_configuration_schema = {
+ " configuration plan",
"example": 3,
},
"region_of_interest": {
"type": "array",
"items": {
"$ref": "https://geojson.org/schema/Polygon.json",
},
"description": "Region of interest for the entire operation",
},
"exclusion_zones": {
"primitives": {
"type": "array",
"items": {
"$ref": "https://geojson.org/schema/Polygon.json",
},
"description": "Exclusion zones for all platforms",
"items": primitive_schema,
"description": "Specification primitives",
},
"squads": {
"type": "array",
......@@ -252,7 +265,6 @@ planning_configuration_schema = {
"message_type",
"planning_config_ID",
"squads",
"exclusion_zones",
"region_of_interest",
"primitives",
],
}
......@@ -1696,13 +1696,6 @@
},
"planning_configuration": {
"properties": {
"exclusion_zones": {
"description": "Exclusion zones for all platforms",
"items": {
"$ref": "#/components/schemas/geojson.org.schema.Polygon.json"
},
"type": "array"
},
"message_type": {
"description": "Type of message",
"enum": [
......@@ -1716,10 +1709,30 @@
"example": 3,
"type": "integer"
},
"region_of_interest": {
"description": "Region of interest for the entire operation",
"primitives": {
"description": "Specification primitives",
"items": {
"$ref": "#/components/schemas/geojson.org.schema.Polygon.json"
"properties": {
"feature": {
"$ref": "#/components/schemas/geojson.org.schema.Feature.json"
},
"instruction": {
"description": "How the associated feature should be used",
"enum": [
"stay_inside",
"stay_outside",
"navigate_to",
"follow",
"repeat",
"cover"
],
"type": "string"
}
},
"required": [
"feature"
],
"type": "object"
},
"type": "array"
},
......@@ -1938,8 +1951,7 @@
"message_type",
"planning_config_ID",
"squads",
"exclusion_zones",
"region_of_interest"
"primitives"
],
"type": "object"
},
......
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