From d90304a747f83c433fc9af15052547cabec11bd0 Mon Sep 17 00:00:00 2001 From: vish0012 Date: Mon, 20 Jan 2025 12:13:34 +0900 Subject: [PATCH 1/9] feat: add schema file for radar_threshold_filter and upadted the README file Signed-off-by: vish0012 --- .../autoware_radar_threshold_filter/README.md | 17 +-- .../schema/radar_threshold_filter.schema.json | 102 ++++++++++++++++++ 2 files changed, 103 insertions(+), 16 deletions(-) create mode 100644 sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json diff --git a/sensing/autoware_radar_threshold_filter/README.md b/sensing/autoware_radar_threshold_filter/README.md index f53ff7119a8eb..a47ec8117420d 100644 --- a/sensing/autoware_radar_threshold_filter/README.md +++ b/sensing/autoware_radar_threshold_filter/README.md @@ -24,22 +24,7 @@ Calculation cost is O(n). `n` is the number of radar return. ### Parameters -- For node parameter - -| Name | Type | Description | -| ------------------- | ------ | ----------------------------------------------------------------------------------------------------- | -| is_amplitude_filter | bool | if this parameter is true, apply amplitude filter (publish amplitude_min < amplitude < amplitude_max) | -| amplitude_min | double | [dBm^2] | -| amplitude_max | double | [dBm^2] | -| is_range_filter | bool | if this parameter is true, apply range filter (publish range_min < range < range_max) | -| range_min | double | [m] | -| range_max | double | [m] | -| is_azimuth_filter | bool | if this parameter is true, apply angle filter (publish azimuth_min < range < azimuth_max) | -| azimuth_min | double | [rad] | -| azimuth_max | double | [rad] | -| is_z_filter | bool | if this parameter is true, apply z position filter (publish z_min < z < z_max) | -| z_min | double | [m] | -| z_max | double | [m] | +{{ json_to_markdown("/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json") }} | ### How to launch diff --git a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json new file mode 100644 index 0000000000000..7ad2dee69afef --- /dev/null +++ b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json @@ -0,0 +1,102 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "radar_threshold_filter parameters", + "type": "object", + "definitions": { + "radar_threshold_filter": { + "type": "object", + "properties": { + "is_amplitude_filter": { + "type": "boolean", + "description": "if this parameter is true, apply amplitude filter (publish amplitude_min < amplitude < amplitude_max)", + "default": true + }, + "amplitude_min": { + "type": "number", + "description": "[dBm^2]", + "default": -10.0 + }, + "amplitude_max": { + "type": "number", + "description": "[dBm^2]", + "default": 100.0 + }, + "is_range_filter": { + "type": "boolean", + "description": "if this parameter is true, apply range filter (publish range_min < range < range_max) ", + "default": false + }, + "range_min": { + "type": "number", + "description": "[m] ", + "default": 20.0 + }, + "range_max": { + "type": "number", + "description": "[m]", + "default": 300.0 + }, + "is_azimuth_filter": { + "type": "boolean", + "description": "if this parameter is true, apply angle filter (publish azimuth_min < range < azimuth_max) ", + "default": true + }, + "azimuth_min": { + "type": "number", + "description": "[rad]", + "default": -1.2 + }, + "azimuth_max": { + "type": "number", + "description": "[rad]", + "default": 1.2 + }, + "is_z_filter": { + "type": "boolean", + "description": "if this parameter is true, apply z position filter (publish z_min < z < z_max) ", + "default": false + }, + "z_min": { + "type": "number", + "description": "[m]", + "default": -2.0 + }, + "z_max": { + "type": "number", + "description": "[m]", + "default": 5.0 + } + }, + "required": [ + "is_amplitude_filter", + "amplitude_min", + "amplitude_max", + "is_range_filter", + "range_min", + "range_max", + "is_azimuth_filter", + "azimuth_min", + "azimuth_max", + "is_z_filter", + "z_min", + "z_max" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/radar_object_clustering" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false + } + \ No newline at end of file From 4628cef83c8a0faeb0d8e8f253e31da0e640e6da Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 03:22:20 +0000 Subject: [PATCH 2/9] style(pre-commit): autofix --- .../autoware_radar_threshold_filter/README.md | 2 +- .../schema/radar_threshold_filter.schema.json | 197 +++++++++--------- 2 files changed, 99 insertions(+), 100 deletions(-) diff --git a/sensing/autoware_radar_threshold_filter/README.md b/sensing/autoware_radar_threshold_filter/README.md index a47ec8117420d..f4cbb449b79cc 100644 --- a/sensing/autoware_radar_threshold_filter/README.md +++ b/sensing/autoware_radar_threshold_filter/README.md @@ -24,7 +24,7 @@ Calculation cost is O(n). `n` is the number of radar return. ### Parameters -{{ json_to_markdown("/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json") }} | +{{ json_to_markdown("/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json") }} | ### How to launch diff --git a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json index 7ad2dee69afef..84a07cfc83a63 100644 --- a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json +++ b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json @@ -1,102 +1,101 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "radar_threshold_filter parameters", - "type": "object", - "definitions": { - "radar_threshold_filter": { - "type": "object", - "properties": { - "is_amplitude_filter": { - "type": "boolean", - "description": "if this parameter is true, apply amplitude filter (publish amplitude_min < amplitude < amplitude_max)", - "default": true - }, - "amplitude_min": { - "type": "number", - "description": "[dBm^2]", - "default": -10.0 - }, - "amplitude_max": { - "type": "number", - "description": "[dBm^2]", - "default": 100.0 - }, - "is_range_filter": { - "type": "boolean", - "description": "if this parameter is true, apply range filter (publish range_min < range < range_max) ", - "default": false - }, - "range_min": { - "type": "number", - "description": "[m] ", - "default": 20.0 - }, - "range_max": { - "type": "number", - "description": "[m]", - "default": 300.0 - }, - "is_azimuth_filter": { - "type": "boolean", - "description": "if this parameter is true, apply angle filter (publish azimuth_min < range < azimuth_max) ", - "default": true - }, - "azimuth_min": { - "type": "number", - "description": "[rad]", - "default": -1.2 - }, - "azimuth_max": { - "type": "number", - "description": "[rad]", - "default": 1.2 - }, - "is_z_filter": { - "type": "boolean", - "description": "if this parameter is true, apply z position filter (publish z_min < z < z_max) ", - "default": false - }, - "z_min": { - "type": "number", - "description": "[m]", - "default": -2.0 - }, - "z_max": { - "type": "number", - "description": "[m]", - "default": 5.0 - } + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "radar_threshold_filter parameters", + "type": "object", + "definitions": { + "radar_threshold_filter": { + "type": "object", + "properties": { + "is_amplitude_filter": { + "type": "boolean", + "description": "if this parameter is true, apply amplitude filter (publish amplitude_min < amplitude < amplitude_max)", + "default": true }, - "required": [ - "is_amplitude_filter", - "amplitude_min", - "amplitude_max", - "is_range_filter", - "range_min", - "range_max", - "is_azimuth_filter", - "azimuth_min", - "azimuth_max", - "is_z_filter", - "z_min", - "z_max" - ], - "additionalProperties": false - } - }, - "properties": { - "/**": { - "type": "object", - "properties": { - "ros__parameters": { - "$ref": "#/definitions/radar_object_clustering" - } + "amplitude_min": { + "type": "number", + "description": "[dBm^2]", + "default": -10.0 }, - "required": ["ros__parameters"], - "additionalProperties": false - } - }, - "required": ["/**"], - "additionalProperties": false - } - \ No newline at end of file + "amplitude_max": { + "type": "number", + "description": "[dBm^2]", + "default": 100.0 + }, + "is_range_filter": { + "type": "boolean", + "description": "if this parameter is true, apply range filter (publish range_min < range < range_max) ", + "default": false + }, + "range_min": { + "type": "number", + "description": "[m] ", + "default": 20.0 + }, + "range_max": { + "type": "number", + "description": "[m]", + "default": 300.0 + }, + "is_azimuth_filter": { + "type": "boolean", + "description": "if this parameter is true, apply angle filter (publish azimuth_min < range < azimuth_max) ", + "default": true + }, + "azimuth_min": { + "type": "number", + "description": "[rad]", + "default": -1.2 + }, + "azimuth_max": { + "type": "number", + "description": "[rad]", + "default": 1.2 + }, + "is_z_filter": { + "type": "boolean", + "description": "if this parameter is true, apply z position filter (publish z_min < z < z_max) ", + "default": false + }, + "z_min": { + "type": "number", + "description": "[m]", + "default": -2.0 + }, + "z_max": { + "type": "number", + "description": "[m]", + "default": 5.0 + } + }, + "required": [ + "is_amplitude_filter", + "amplitude_min", + "amplitude_max", + "is_range_filter", + "range_min", + "range_max", + "is_azimuth_filter", + "azimuth_min", + "azimuth_max", + "is_z_filter", + "z_min", + "z_max" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/radar_object_clustering" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} From 78b4e25ea2ee747be6bf8ecb9a042589786d5942 Mon Sep 17 00:00:00 2001 From: Vishal Chauhan <40782713+vish0012@users.noreply.github.com> Date: Wed, 5 Feb 2025 07:18:46 +0900 Subject: [PATCH 3/9] Update README.md update README file --- sensing/autoware_radar_threshold_filter/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sensing/autoware_radar_threshold_filter/README.md b/sensing/autoware_radar_threshold_filter/README.md index f4cbb449b79cc..0cb71f72fb88f 100644 --- a/sensing/autoware_radar_threshold_filter/README.md +++ b/sensing/autoware_radar_threshold_filter/README.md @@ -24,7 +24,7 @@ Calculation cost is O(n). `n` is the number of radar return. ### Parameters -{{ json_to_markdown("/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json") }} | +{{ json_to_markdown("sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json") }} | ### How to launch From 3fef181968637c68cd7f4d75d8a9e172dc4edc68 Mon Sep 17 00:00:00 2001 From: vish0012 Date: Thu, 6 Feb 2025 12:09:15 +0900 Subject: [PATCH 4/9] feat: update the json file Signed-off-by: vish0012 --- .../schema/radar_threshold_filter.schema.json | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json index 84a07cfc83a63..e84906d2e55fe 100644 --- a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json +++ b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json @@ -8,62 +8,62 @@ "properties": { "is_amplitude_filter": { "type": "boolean", - "description": "if this parameter is true, apply amplitude filter (publish amplitude_min < amplitude < amplitude_max)", + "description": "If this parameter is true, apply amplitude filter (publish amplitude_min < amplitude < amplitude_max).", "default": true }, "amplitude_min": { "type": "number", - "description": "[dBm^2]", + "description": "Minimum amplitude threshold [dBm^2].", "default": -10.0 }, "amplitude_max": { "type": "number", - "description": "[dBm^2]", + "description": "Maximum amplitude threshold [dBm^2].", "default": 100.0 }, "is_range_filter": { "type": "boolean", - "description": "if this parameter is true, apply range filter (publish range_min < range < range_max) ", + "description": "If this parameter is true, apply range filter (publish range_min < range < range_max).", "default": false }, "range_min": { "type": "number", - "description": "[m] ", + "description": "Minimum range threshold [m].", "default": 20.0 }, "range_max": { "type": "number", - "description": "[m]", + "description": "Maximum range threshold [m].", "default": 300.0 }, "is_azimuth_filter": { "type": "boolean", - "description": "if this parameter is true, apply angle filter (publish azimuth_min < range < azimuth_max) ", + "description": "If this parameter is true, apply angle filter (publish azimuth_min < azimuth < azimuth_max).", "default": true }, "azimuth_min": { "type": "number", - "description": "[rad]", + "description": "Minimum azimuth threshold [rad].", "default": -1.2 }, "azimuth_max": { "type": "number", - "description": "[rad]", + "description": "Maximum azimuth threshold [rad].", "default": 1.2 }, "is_z_filter": { "type": "boolean", - "description": "if this parameter is true, apply z position filter (publish z_min < z < z_max) ", + "description": "If this parameter is true, apply Z position filter (publish z_min < z < z_max).", "default": false }, "z_min": { "type": "number", - "description": "[m]", + "description": "Minimum Z threshold [m].", "default": -2.0 }, "z_max": { "type": "number", - "description": "[m]", + "description": "Maximum Z threshold [m].", "default": 5.0 } }, @@ -89,7 +89,7 @@ "type": "object", "properties": { "ros__parameters": { - "$ref": "#/definitions/radar_object_clustering" + "$ref": "#/definitions/radar_threshold_filter" } }, "required": ["ros__parameters"], From e07fb9d1cee900b4b4bd1149a55d5c21f91f497d Mon Sep 17 00:00:00 2001 From: vish0012 Date: Thu, 20 Feb 2025 09:34:57 +0900 Subject: [PATCH 5/9] fix: updated schema for radar_threshold_filter to solve issue Signed-off-by: vish0012 --- .../schema/radar_threshold_filter.schema.json | 167 +++++++++--------- 1 file changed, 80 insertions(+), 87 deletions(-) diff --git a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json index e84906d2e55fe..c60a83a144a5b 100644 --- a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json +++ b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json @@ -1,101 +1,94 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "radar_threshold_filter parameters", + "title": "autoware_radar_threshold_filter parameter", "type": "object", - "definitions": { - "radar_threshold_filter": { - "type": "object", - "properties": { - "is_amplitude_filter": { - "type": "boolean", - "description": "If this parameter is true, apply amplitude filter (publish amplitude_min < amplitude < amplitude_max).", - "default": true - }, - "amplitude_min": { - "type": "number", - "description": "Minimum amplitude threshold [dBm^2].", - "default": -10.0 - }, - "amplitude_max": { - "type": "number", - "description": "Maximum amplitude threshold [dBm^2].", - "default": 100.0 - }, - "is_range_filter": { - "type": "boolean", - "description": "If this parameter is true, apply range filter (publish range_min < range < range_max).", - "default": false - }, - "range_min": { - "type": "number", - "description": "Minimum range threshold [m].", - "default": 20.0 - }, - "range_max": { - "type": "number", - "description": "Maximum range threshold [m].", - "default": 300.0 - }, - "is_azimuth_filter": { - "type": "boolean", - "description": "If this parameter is true, apply angle filter (publish azimuth_min < azimuth < azimuth_max).", - "default": true - }, - "azimuth_min": { - "type": "number", - "description": "Minimum azimuth threshold [rad].", - "default": -1.2 - }, - "azimuth_max": { - "type": "number", - "description": "Maximum azimuth threshold [rad].", - "default": 1.2 - }, - "is_z_filter": { - "type": "boolean", - "description": "If this parameter is true, apply Z position filter (publish z_min < z < z_max).", - "default": false - }, - "z_min": { - "type": "number", - "description": "Minimum Z threshold [m].", - "default": -2.0 - }, - "z_max": { - "type": "number", - "description": "Maximum Z threshold [m].", - "default": 5.0 - } - }, - "required": [ - "is_amplitude_filter", - "amplitude_min", - "amplitude_max", - "is_range_filter", - "range_min", - "range_max", - "is_azimuth_filter", - "azimuth_min", - "azimuth_max", - "is_z_filter", - "z_min", - "z_max" - ], - "additionalProperties": false - } - }, - "properties": { - "/**": { + "patternProperties": { + "/.*": { "type": "object", "properties": { "ros__parameters": { - "$ref": "#/definitions/radar_threshold_filter" + "type": "object", + "properties": { + "node_params": { + "type": "object", + "properties": { + "is_amplitude_filter": { + "type": "boolean", + "default": true, + "description": "If true, amplitude filtering is enabled." + }, + "amplitude_min": { + "type": "number", + "default": -10.0, + "description": "Minimum amplitude threshold." + }, + "amplitude_max": { + "type": "number", + "default": 100.0, + "description": "Maximum amplitude threshold." + }, + "is_range_filter": { + "type": "boolean", + "default": false, + "description": "If true, range filtering is enabled." + }, + "range_min": { + "type": "number", + "default": 20.0, + "description": "Minimum range threshold." + }, + "range_max": { + "type": "number", + "default": 300.0, + "description": "Maximum range threshold." + }, + "is_azimuth_filter": { + "type": "boolean", + "default": true, + "description": "If true, azimuth filtering is enabled." + }, + "azimuth_min": { + "type": "number", + "default": -1.2, + "description": "Minimum azimuth threshold (radians)." + }, + "azimuth_max": { + "type": "number", + "default": 1.2, + "description": "Maximum azimuth threshold (radians)." + }, + "is_z_filter": { + "type": "boolean", + "default": false, + "description": "If true, Z filtering is enabled." + }, + "z_min": { + "type": "number", + "default": -2.0, + "description": "Minimum Z threshold (meters)." + }, + "z_max": { + "type": "number", + "default": 5.0, + "description": "Maximum Z threshold (meters)." + } + }, + "required": [ + "is_amplitude_filter", "amplitude_min", "amplitude_max", + "is_range_filter", "range_min", "range_max", + "is_azimuth_filter", "azimuth_min", "azimuth_max", + "is_z_filter", "z_min", "z_max" + ], + "additionalProperties": false + } + }, + "required": ["node_params"], + "additionalProperties": false } }, "required": ["ros__parameters"], "additionalProperties": false } }, - "required": ["/**"], "additionalProperties": false } From b6cca6b67d28afaf6fac6546e3dc3791e205f048 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 00:37:46 +0000 Subject: [PATCH 6/9] style(pre-commit): autofix --- .../schema/radar_threshold_filter.schema.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json index c60a83a144a5b..1cad2a1ed5213 100644 --- a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json +++ b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json @@ -74,10 +74,18 @@ } }, "required": [ - "is_amplitude_filter", "amplitude_min", "amplitude_max", - "is_range_filter", "range_min", "range_max", - "is_azimuth_filter", "azimuth_min", "azimuth_max", - "is_z_filter", "z_min", "z_max" + "is_amplitude_filter", + "amplitude_min", + "amplitude_max", + "is_range_filter", + "range_min", + "range_max", + "is_azimuth_filter", + "azimuth_min", + "azimuth_max", + "is_z_filter", + "z_min", + "z_max" ], "additionalProperties": false } From ca735dbc83757c1af3a3ddba74eb00bb23a9a568 Mon Sep 17 00:00:00 2001 From: vish0012 Date: Thu, 20 Feb 2025 10:07:30 +0900 Subject: [PATCH 7/9] fix: updated schema for radar_threshold_filter to run code correctly --- .../schema/radar_threshold_filter.schema.json | 162 ++++++++---------- 1 file changed, 76 insertions(+), 86 deletions(-) diff --git a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json index 1cad2a1ed5213..9c958d3244541 100644 --- a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json +++ b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json @@ -1,97 +1,87 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "title": "autoware_radar_threshold_filter parameter", + "title": "autoware_radar_threshold_filter parameters", "type": "object", + "definitions": { + "radar_threshold_filter": { + "type": "object", + "properties": { + "is_amplitude_filter": { + "type": "boolean", + "default": true, + "description": "If true, amplitude filtering is enabled." + }, + "amplitude_min": { + "type": "number", + "default": -10.0, + "description": "Minimum amplitude threshold." + }, + "amplitude_max": { + "type": "number", + "default": 100.0, + "description": "Maximum amplitude threshold." + }, + "is_range_filter": { + "type": "boolean", + "default": false, + "description": "If true, range filtering is enabled." + }, + "range_min": { + "type": "number", + "default": 20.0, + "description": "Minimum range threshold." + }, + "range_max": { + "type": "number", + "default": 300.0, + "description": "Maximum range threshold." + }, + "is_azimuth_filter": { + "type": "boolean", + "default": true, + "description": "If true, azimuth filtering is enabled." + }, + "azimuth_min": { + "type": "number", + "default": -1.2, + "description": "Minimum azimuth threshold (radians)." + }, + "azimuth_max": { + "type": "number", + "default": 1.2, + "description": "Maximum azimuth threshold (radians)." + }, + "is_z_filter": { + "type": "boolean", + "default": false, + "description": "If true, Z filtering is enabled." + }, + "z_min": { + "type": "number", + "default": -2.0, + "description": "Minimum Z threshold (meters)." + }, + "z_max": { + "type": "number", + "default": 5.0, + "description": "Maximum Z threshold (meters)." + } + }, + "required": [ + "is_amplitude_filter", "amplitude_min", "amplitude_max", + "is_range_filter", "range_min", "range_max", + "is_azimuth_filter", "azimuth_min", "azimuth_max", + "is_z_filter", "z_min", "z_max" + ], + "additionalProperties": false + } + }, "patternProperties": { "/.*": { "type": "object", "properties": { "ros__parameters": { - "type": "object", - "properties": { - "node_params": { - "type": "object", - "properties": { - "is_amplitude_filter": { - "type": "boolean", - "default": true, - "description": "If true, amplitude filtering is enabled." - }, - "amplitude_min": { - "type": "number", - "default": -10.0, - "description": "Minimum amplitude threshold." - }, - "amplitude_max": { - "type": "number", - "default": 100.0, - "description": "Maximum amplitude threshold." - }, - "is_range_filter": { - "type": "boolean", - "default": false, - "description": "If true, range filtering is enabled." - }, - "range_min": { - "type": "number", - "default": 20.0, - "description": "Minimum range threshold." - }, - "range_max": { - "type": "number", - "default": 300.0, - "description": "Maximum range threshold." - }, - "is_azimuth_filter": { - "type": "boolean", - "default": true, - "description": "If true, azimuth filtering is enabled." - }, - "azimuth_min": { - "type": "number", - "default": -1.2, - "description": "Minimum azimuth threshold (radians)." - }, - "azimuth_max": { - "type": "number", - "default": 1.2, - "description": "Maximum azimuth threshold (radians)." - }, - "is_z_filter": { - "type": "boolean", - "default": false, - "description": "If true, Z filtering is enabled." - }, - "z_min": { - "type": "number", - "default": -2.0, - "description": "Minimum Z threshold (meters)." - }, - "z_max": { - "type": "number", - "default": 5.0, - "description": "Maximum Z threshold (meters)." - } - }, - "required": [ - "is_amplitude_filter", - "amplitude_min", - "amplitude_max", - "is_range_filter", - "range_min", - "range_max", - "is_azimuth_filter", - "azimuth_min", - "azimuth_max", - "is_z_filter", - "z_min", - "z_max" - ], - "additionalProperties": false - } - }, - "required": ["node_params"], - "additionalProperties": false + "$ref": "#/definitions/radar_threshold_filter" } }, "required": ["ros__parameters"], From df2d0d2eab90294f18d971a2ed60e5db9d4485c2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 01:10:30 +0000 Subject: [PATCH 8/9] style(pre-commit): autofix --- .../schema/radar_threshold_filter.schema.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json index 9c958d3244541..6129830686ae6 100644 --- a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json +++ b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json @@ -68,10 +68,18 @@ } }, "required": [ - "is_amplitude_filter", "amplitude_min", "amplitude_max", - "is_range_filter", "range_min", "range_max", - "is_azimuth_filter", "azimuth_min", "azimuth_max", - "is_z_filter", "z_min", "z_max" + "is_amplitude_filter", + "amplitude_min", + "amplitude_max", + "is_range_filter", + "range_min", + "range_max", + "is_azimuth_filter", + "azimuth_min", + "azimuth_max", + "is_z_filter", + "z_min", + "z_max" ], "additionalProperties": false } From e0f369b4d513f3615476e0fef7a20c79c575a99d Mon Sep 17 00:00:00 2001 From: vish0012 Date: Tue, 18 Mar 2025 09:33:27 +0900 Subject: [PATCH 9/9] fix: updated README and schema for radar_threshold_filter as per review comments Signed-off-by: vish0012 --- .../schema/radar_threshold_filter.schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json index 6129830686ae6..6fffb27b0c001 100644 --- a/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json +++ b/sensing/autoware_radar_threshold_filter/schema/radar_threshold_filter.schema.json @@ -84,8 +84,8 @@ "additionalProperties": false } }, - "patternProperties": { - "/.*": { + "properties": { + "/**": { "type": "object", "properties": { "ros__parameters": { @@ -96,5 +96,6 @@ "additionalProperties": false } }, + "required": ["/**"], "additionalProperties": false }