nodl_conformance¶
nodl_conformance is a small Python library that compares two loaded NoDL
documents. It does not load files, inspect running ROS nodes, or provide launch
integration.
from nodl_conformance import diff
differences = diff(expected, actual, node_fqn='/robot/my_node')
expected and actual are nodl_schema.NodlDocument objects. An empty list
means conformance. Each Difference contains kind, section, name, and
detail. Supported kinds are missing, extra, type_mismatch,
qos_mismatch, property_mismatch, and unverifiable.
Comparison rules¶
Interfaces¶
Interfaces are the public communication endpoints exposed or consumed by a node.
Check |
Rule |
|---|---|
Membership |
Missing declared interfaces and extra actual interfaces are differences. |
Collections |
Publishers, subscriptions, service servers, service clients, action servers, and action clients remain separate. |
Names |
|
Types |
A short type equals its kind-specific fully qualified form. For example, |
Representation |
Collection order and empty collections do not affect the result. |
Ignored metadata |
Description fields and top-level |
QoS¶
Quality of Service (QoS) policies define how an endpoint communicates.
Check |
Rule |
|---|---|
Observability |
Declared QoS that is not observable produces an |
Optional policies |
An omitted expected policy places no requirement on the actual endpoint. |
Concrete policies |
An unknown actual policy is |
History and depth |
|
Durations |
Omitted and zero durations both mean unlimited. Finite nonzero durations must match exactly. |
Parameters¶
Parameters are named configuration entries exposed by a node.
Check |
Rule |
|---|---|
Membership |
Missing declared parameters and extra actual parameters are differences. |
Type |
Types must match. A generic actual type cannot prove a declared fixed-size type and produces |
Read-only |
A declared |
Ignored fields |
Description, default value, additional constraints, validation rules, and the actual current value do not affect the result. |
Runtime integration¶
ros2nodl loads and composes the expected document, describes a live node, and
calls this comparator through ros2 nodl conform.