-
Notifications
You must be signed in to change notification settings - Fork 40
Add flexible properties system for nodes and edges #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
|
@Iranaphor @ibrahimhroob @arsh09 please take a look at this minimally invasive proposal to properly allow properties to be represented in topological maps. This should allow us to represent semantic meaning and application specific constraints. |
|
@copilot expand the documentation by suggesting the use of name spaces for properties, to structure them more clearly. Typically, we want to separate different classes of properties through namespaces, i.e., a dictionary of properties may relate to “fleet_management” functionality, or it may only be used in specific applications like “logistics”. In this case, the suggested structure should be that properties are nested under a respective namespace. This doesn’t require special implementation treatment, but expanding the documentation. As part of the implementation add a simple Python script to the “topological_navigation” package that can validate map yams files against the schema. |
Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
Added in b86eea4:
|
Added a guideline for using package names as namespaces in properties.
|
I argue that the purpose of the topological map is to define a unified collection of information, including package name to what needs that information is not particularly important and associating information to current projects would set a bad precedent (though I understand the motivation of placing them into groups for readibility). Groups such as navigation, doesnt really make sense given there are many properties through the tmap file which are also used by core navigation but not included under this properties group. I believe it makes more sense to utilise a different tag (perhaps under meta) called semantics, which is focused exclusively on assigning such semantic labels, then perhaps include the same under each edge named semantics too. Then also include an additional tag to include space for physical restrictions which are less of a semantic label but still direcly relevant. Under these we could then utilise aspects such as: - restrictions:
- capacity: total number of robots allowed at once (default: 1)
- max_external_width: max width of robot to fit through the space (think polytunnel rows)
- max_external_height: max height of robot to fit through the space (think door height)
- min_internal_width: min cavity width to encompas robot (think polytunnel bed width)
- min_internal_height: min cavity height to encompas robot (think polytunnel bed height)
- access_level: access required to gain entry
- ...
- semantics:
- zone:
- labels: ['warehouse', 'polytunnel', ...]
- details: {'tunnel_id':4, 'row_id':5, 'column_idx':2}
- features:
- labels: ['charging_station', 'door', 'e-gate', 'wait_node', ...]
- details: {'charger_ip': [], 'e-gate': []}
- environmental:
- labels: ['grass', concrete', 'stones']
- details: {...}Of the other properties you mention in the associated issue:
|
|
As another idea too, (with regards to the schema), I believe it could be worth us redefining the topological_map message and utilising a workflow for automatic generation of the schema based on that msg, implementing the "optional" and "defaults" aspects as comments defined within the msg files directly as these will display when you run for instance Also should the docs which copilot is generating not be added instead to the wiki, with that upgraded instead? |
|
@copilot add a reference to |
|
@copilot try again |
|
Thank you for this detailed feedback – these are good points that helped clarify the intent and flexibility of the properties system. I've updated the documentation in Your proposed structure works perfectly, but under the properties:
restrictions:
capacity: 1
max_external_width: 0.8
max_external_height: 1.5
min_internal_width: 1.2
min_internal_height: 2.0
access_level: "operator"
semantics:
zone:
labels: ['warehouse', 'polytunnel']
details: {tunnel_id: 4, row_id: 5, column_idx: 2}
features:
labels: ['charging_station', 'door', 'wait_node']
details: {charger_ip: '192.168.1.100'}
environmental:
labels: ['grass', 'concrete', 'stones'] |
…rganization guidelines and examples
|
OK, this now includes also a check that the YAML schema is a valid schema, so I will merge this now into |
tmap-schema.yamlto formally support flexiblepropertiesfor nodes and edgestemplate_edge.yamlto include optionalpropertiesfieldvalidate_map.pyscript for schema validationSummary
This PR implements a flexible properties system for topological maps:
propertiesfield definitions for both nodes and edgespropertiesfield to edge template for discoverabilityfleet_management,logistics,safety)validate_map.pyto validate map files against the schemaExample Namespaced Properties
Validation Usage
Backwards compatible—existing maps without
propertiesremain valid.Original prompt
This section details on the original issue you should resolve
<issue_title>[FEAT]: Flexible Node and Edge Properties System</issue_title>
<issue_description>### Description
This feature request proposes extending the topological map schema to support arbitrary
propertiesdictionaries for both nodes and edges, enabling flexible, application-specific metadata without requiring schema modifications.Motivation
The current topological map structure has a fixed
propertiesfield in nodes (currently containingxy_goal_toleranceandyaw_goal_tolerance), but lacks extensibility for domain-specific applications. Different robotic applications require varied metadata that shouldn't necessitate core schema changes.Proposed Feature
Add flexible
propertiesdictionaries (represented as YAML maps) to both nodes and edges in the topological map schema.Node Properties Examples
row: Identifies which row a node belongs to (e.g., in agricultural polytunnel scenarios)semantics: Describes the semantic meaning of a node (e.g., "charging_station", "inspection_point", "rest_area")zone: Operational zone designationaccess_level: Permission level required for accesscapacity: Maximum number of robots that can occupy the node simultaneouslyEdge Properties Examples
max_speed: Maximum traversal speed for safety or operational constraints (m/s)priority: Preference weight for path planning (higher values indicate more preferred routes)width: Physical width of the traversable path (m)surface_type: Terrain classification (e.g., "concrete", "grass", "gravel")bidirectional: Boolean indicating if edge is bidirectionalweather_restrictions: Conditions under which edge should not be usedDesign Requirements
propertiesfield must be optional. Existing maps without properties should remain valid.Schema Extension
The schema should be extended as follows:
For nodes (at
nodes[].node.properties):For edges (at
nodes[].node.edges[].properties):Example Usage
Implementation Considerations
config/tmap-schema.yamlneeds to be updated to include the properties definitions.propertiesis a dictionary but not enforce specific keys.Related Issues
This feature builds upon the topological map structure discussion in #203.
Additional Context
The example map at
network.tmap2.yamlalready demonstrates node properties in use. This feature request formalises and extends this capability to edges whilst ensuring schema consistency and backwards compatibility.Benefits
<agent_instructions>Make a start with this issue. Keep the changes as minimal as possible and ensure b...
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.