From d79d497455b48f307e9af2f7586cb54217bb6f1f Mon Sep 17 00:00:00 2001 From: Paulo Santos Date: Sun, 22 Jun 2025 20:35:02 +0100 Subject: [PATCH 1/2] Small improvement to avoid short-circuit --- examples/evaluation/detectable-142456.rospec | 14 +++++++------- src/rospec/verification/utils.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/evaluation/detectable-142456.rospec b/examples/evaluation/detectable-142456.rospec index 0f7250b..3329fa5 100644 --- a/examples/evaluation/detectable-142456.rospec +++ b/examples/evaluation/detectable-142456.rospec @@ -1,11 +1,11 @@ -policy instance depth5qos: qos { - setting history = KeepLast; +policy instance best_effort_qos5: qos { setting depth = 5; + setting reliability = BestEffort; } -policy instance depth1qos: qos { - setting history = KeepLast; - setting depth = 1; +policy instance reliable_qos5: qos { + setting depth = 5; + setting reliability = Reliable; } policy instance RGB8: color_format { @@ -19,13 +19,13 @@ policy instance Grayscale: color_format { node type openni_camera_driver_depth_type { optional param depth_registration: bool = true; - @qos{depth1qos} + @qos{best_effort_qos5} @color_format{Grayscale} publishes to /camera/rgb/image_raw: sensor_msgs/Image; } node type custom_node_type { - @qos{depth5qos} + @qos{reliable_qos5} @color_format{RGB8} subscribes to /camera/rgb/image_raw: sensor_msgs/Image; } diff --git a/src/rospec/verification/utils.py b/src/rospec/verification/utils.py index ee05bb6..4c9d9fb 100644 --- a/src/rospec/verification/utils.py +++ b/src/rospec/verification/utils.py @@ -218,7 +218,7 @@ def check_policies( result = True for name in consumer_policy.keys(): - result = result and dispatcher[name](context, consumer_policy[name], provider_policy[name]) + result = dispatcher[name](context, consumer_policy[name], provider_policy[name]) and result return result From 2251855053f2ece2db51c9cb90a64193ec5964b8 Mon Sep 17 00:00:00 2001 From: Paulo Santos Date: Sun, 22 Jun 2025 20:36:56 +0100 Subject: [PATCH 2/2] Updated test expected --- examples/expected/expected-142456.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/expected/expected-142456.txt b/examples/expected/expected-142456.txt index 31fa135..ecfe9ba 100644 --- a/examples/expected/expected-142456.txt +++ b/examples/expected/expected-142456.txt @@ -1 +1,3 @@ +QoS rule reliability not satisfied: Reliable !< BestEffort +QoS rules not satisfied for subscriber and publisher Color format not satisfied: RGB8 != Grayscale \ No newline at end of file