Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes the addition of a new JSON schema for the topological map configuration. The schema defines the structure and validation rules for the topological map data.
Schema definition:
topological_navigation/config/tmap-schema.yaml
: Added a new JSON schema to define the structure of the topological map configuration. The schema includes required properties such asmeta
,metric_map
,name
,nodes
, andpointset
, and specifies the types and validation rules for these properties.I have used this little python code to test the validation:
(after
pip install pyyaml jsonschema
)In particular, I have tested the validation against https://raw.githubusercontent.com/LCAS/environment_template/refs/heads/riseholme_park_farm_strawberry_polytunnels/config/topological/network.tmap2.yaml
This is a very forgiving schema, allowing additional elements and just ensures the basic structure of our tmap format:
Topological Map Schema Documentation
Required Top-Level Elements
The schema requires these root elements:
meta
- Contains metadatametric_map
- String identifier for the metric mapname
- String identifier for the mapnodes
- Array of node objectspointset
- String identifier for the pointsetAdditional properties allowed at the root level (like
transformation
).Element Details
meta
Required properties:
last_updated
- String in format "YYYY-MM-DD_HH-MM-SS"nodes
Array of node objects, each requiring:
Node Object Structure
meta
object with required fields:map
(string)node
(string)pointset
(string)node
object with required fields:edges
(array of edge objects)name
(string)parent_frame
(string)Edge Object Structure
Each edge in the
edges
array requires:edge_id
(string)node
(string)Additional Property Rules