From 8645af4f8ce2a5b513a96fcab01886b2f31a18b8 Mon Sep 17 00:00:00 2001 From: batuhanbeytekin Date: Fri, 28 Jun 2024 14:16:33 +0300 Subject: [PATCH 01/11] refactor(detected_object_validation): rework parameters Signed-off-by: batuhanbeytekin Signed-off-by: Batuhan Beytekin --- .../README.md | 18 +++ .../occupancy_grid_based_validator.param.yaml | 2 + .../launch/object_lanelet_filter.launch.xml | 2 +- .../launch/object_position_filter.launch.xml | 2 +- .../src/lanelet_filter/lanelet_filter.cpp | 16 +-- .../obstacle_pointcloud_validator.cpp | 2 +- .../occupancy_grid_map_validator.cpp | 4 +- .../src/position_filter/position_filter.cpp | 24 ++-- .../schema/object_lanelet_filter.schema.json | 121 ++++++++++++++++++ .../schema/object_position_filter.schema.json | 109 ++++++++++++++++ ...cle_pointcloud_based_validator.schema.json | 68 ++++++++++ ...occupancy_grid_based_validator.schema.json | 41 ++++++ 12 files changed, 384 insertions(+), 25 deletions(-) create mode 100644 perception/detected_object_validation/schema/object_lanelet_filter.schema.json create mode 100644 perception/detected_object_validation/schema/object_position_filter.schema.json create mode 100644 perception/detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json create mode 100644 perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json diff --git a/perception/autoware_detected_object_validation/README.md b/perception/autoware_detected_object_validation/README.md index 12fad4ad9759f..8715b9ba983b4 100644 --- a/perception/autoware_detected_object_validation/README.md +++ b/perception/autoware_detected_object_validation/README.md @@ -10,3 +10,21 @@ The purpose of this package is to eliminate obvious false positives of DetectedO - [Occupancy grid based validator](occupancy-grid-based-validator.md) - [Object lanelet filter](object-lanelet-filter.md) - [Object position filter](object-position-filter.md) + +### Node Parameters + +#### object_lanelet_filter + +{{ json_to_markdown("perception/detected_object_validation/schema/object_lanelet_filter.schema.json") }} + +#### object_position_filter + +{{ json_to_markdown("perception/detected_object_validation/schema/object_position_filter.schema.json") }} + +#### obstacle_pointcloud_based_validator + +{{ json_to_markdown("perception/detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json") }} + +#### occupancy_grid_based_validator + +{{ json_to_markdown("perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json") }} diff --git a/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml b/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml index fc5c634735e23..073c148b21910 100644 --- a/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml +++ b/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml @@ -1,3 +1,5 @@ /**: ros__parameters: + mean_threshold: 0.6 enable_debug: false + diff --git a/perception/autoware_detected_object_validation/launch/object_lanelet_filter.launch.xml b/perception/autoware_detected_object_validation/launch/object_lanelet_filter.launch.xml index 00cc961b17ee3..e25d43cf4ff29 100644 --- a/perception/autoware_detected_object_validation/launch/object_lanelet_filter.launch.xml +++ b/perception/autoware_detected_object_validation/launch/object_lanelet_filter.launch.xml @@ -1,4 +1,4 @@ - + diff --git a/perception/autoware_detected_object_validation/launch/object_position_filter.launch.xml b/perception/autoware_detected_object_validation/launch/object_position_filter.launch.xml index 03e7996bb41d1..e59e80021f385 100644 --- a/perception/autoware_detected_object_validation/launch/object_position_filter.launch.xml +++ b/perception/autoware_detected_object_validation/launch/object_position_filter.launch.xml @@ -1,4 +1,4 @@ - + diff --git a/perception/autoware_detected_object_validation/src/lanelet_filter/lanelet_filter.cpp b/perception/autoware_detected_object_validation/src/lanelet_filter/lanelet_filter.cpp index aed0ba5ab85ea..59de872ae9b90 100644 --- a/perception/autoware_detected_object_validation/src/lanelet_filter/lanelet_filter.cpp +++ b/perception/autoware_detected_object_validation/src/lanelet_filter/lanelet_filter.cpp @@ -42,14 +42,14 @@ ObjectLaneletFilterNode::ObjectLaneletFilterNode(const rclcpp::NodeOptions & nod using std::placeholders::_1; // Set parameters - filter_target_.UNKNOWN = declare_parameter("filter_target_label.UNKNOWN", false); - filter_target_.CAR = declare_parameter("filter_target_label.CAR", false); - filter_target_.TRUCK = declare_parameter("filter_target_label.TRUCK", false); - filter_target_.BUS = declare_parameter("filter_target_label.BUS", false); - filter_target_.TRAILER = declare_parameter("filter_target_label.TRAILER", false); - filter_target_.MOTORCYCLE = declare_parameter("filter_target_label.MOTORCYCLE", false); - filter_target_.BICYCLE = declare_parameter("filter_target_label.BICYCLE", false); - filter_target_.PEDESTRIAN = declare_parameter("filter_target_label.PEDESTRIAN", false); + filter_target_.UNKNOWN = declare_parameter("filter_target_label.UNKNOWN"); + filter_target_.CAR = declare_parameter("filter_target_label.CAR"); + filter_target_.TRUCK = declare_parameter("filter_target_label.TRUCK"); + filter_target_.BUS = declare_parameter("filter_target_label.BUS"); + filter_target_.TRAILER = declare_parameter("filter_target_label.TRAILER"); + filter_target_.MOTORCYCLE = declare_parameter("filter_target_label.MOTORCYCLE"); + filter_target_.BICYCLE = declare_parameter("filter_target_label.BICYCLE"); + filter_target_.PEDESTRIAN = declare_parameter("filter_target_label.PEDESTRIAN"); // Set filter settings filter_settings_.polygon_overlap_filter = declare_parameter("filter_settings.polygon_overlap_filter.enabled"); diff --git a/perception/autoware_detected_object_validation/src/obstacle_pointcloud/obstacle_pointcloud_validator.cpp b/perception/autoware_detected_object_validation/src/obstacle_pointcloud/obstacle_pointcloud_validator.cpp index c5ecce714735b..7f55c86080fd2 100644 --- a/perception/autoware_detected_object_validation/src/obstacle_pointcloud/obstacle_pointcloud_validator.cpp +++ b/perception/autoware_detected_object_validation/src/obstacle_pointcloud/obstacle_pointcloud_validator.cpp @@ -310,7 +310,7 @@ ObstaclePointCloudBasedValidator::ObstaclePointCloudBasedValidator( debug_publisher_ = std::make_unique( this, "obstacle_pointcloud_based_validator"); - const bool enable_debugger = declare_parameter("enable_debugger", false); + const bool enable_debugger = declare_parameter("enable_debugger"); if (enable_debugger) debugger_ = std::make_shared(this); published_time_publisher_ = std::make_unique(this); diff --git a/perception/autoware_detected_object_validation/src/occupancy_grid_map/occupancy_grid_map_validator.cpp b/perception/autoware_detected_object_validation/src/occupancy_grid_map/occupancy_grid_map_validator.cpp index c082b4b0f03f1..51df1929a300c 100644 --- a/perception/autoware_detected_object_validation/src/occupancy_grid_map/occupancy_grid_map_validator.cpp +++ b/perception/autoware_detected_object_validation/src/occupancy_grid_map/occupancy_grid_map_validator.cpp @@ -53,8 +53,8 @@ OccupancyGridBasedValidator::OccupancyGridBasedValidator(const rclcpp::NodeOptio objects_pub_ = create_publisher( "~/output/objects", rclcpp::QoS{1}); - mean_threshold_ = declare_parameter("mean_threshold", 0.6); - enable_debug_ = declare_parameter("enable_debug", false); + mean_threshold_ = declare_parameter("mean_threshold"); + enable_debug_ = declare_parameter("enable_debug"); published_time_publisher_ = std::make_unique(this); } diff --git a/perception/autoware_detected_object_validation/src/position_filter/position_filter.cpp b/perception/autoware_detected_object_validation/src/position_filter/position_filter.cpp index ac0bab404c476..3b88628aa6d84 100644 --- a/perception/autoware_detected_object_validation/src/position_filter/position_filter.cpp +++ b/perception/autoware_detected_object_validation/src/position_filter/position_filter.cpp @@ -26,18 +26,18 @@ ObjectPositionFilterNode::ObjectPositionFilterNode(const rclcpp::NodeOptions & n using std::placeholders::_1; // Set parameters - upper_bound_x_ = declare_parameter("upper_bound_x", 100.0); - upper_bound_y_ = declare_parameter("upper_bound_y", 50.0); - lower_bound_x_ = declare_parameter("lower_bound_x", 0.0); - lower_bound_y_ = declare_parameter("lower_bound_y", -50.0); - filter_target_.UNKNOWN = declare_parameter("filter_target_label.UNKNOWN", false); - filter_target_.CAR = declare_parameter("filter_target_label.CAR", false); - filter_target_.TRUCK = declare_parameter("filter_target_label.TRUCK", false); - filter_target_.BUS = declare_parameter("filter_target_label.BUS", false); - filter_target_.TRAILER = declare_parameter("filter_target_label.TRAILER", false); - filter_target_.MOTORCYCLE = declare_parameter("filter_target_label.MOTORCYCLE", false); - filter_target_.BICYCLE = declare_parameter("filter_target_label.BICYCLE", false); - filter_target_.PEDESTRIAN = declare_parameter("filter_target_label.PEDESTRIAN", false); + upper_bound_x_ = declare_parameter("upper_bound_x"); + upper_bound_y_ = declare_parameter("upper_bound_y"); + lower_bound_x_ = declare_parameter("lower_bound_x"); + lower_bound_y_ = declare_parameter("lower_bound_y"); + filter_target_.UNKNOWN = declare_parameter("filter_target_label.UNKNOWN"); + filter_target_.CAR = declare_parameter("filter_target_label.CAR"); + filter_target_.TRUCK = declare_parameter("filter_target_label.TRUCK"); + filter_target_.BUS = declare_parameter("filter_target_label.BUS"); + filter_target_.TRAILER = declare_parameter("filter_target_label.TRAILER"); + filter_target_.MOTORCYCLE = declare_parameter("filter_target_label.MOTORCYCLE"); + filter_target_.BICYCLE = declare_parameter("filter_target_label.BICYCLE"); + filter_target_.PEDESTRIAN = declare_parameter("filter_target_label.PEDESTRIAN"); // Set publisher/subscriber object_sub_ = this->create_subscription( diff --git a/perception/detected_object_validation/schema/object_lanelet_filter.schema.json b/perception/detected_object_validation/schema/object_lanelet_filter.schema.json new file mode 100644 index 0000000000000..a08c71a55a020 --- /dev/null +++ b/perception/detected_object_validation/schema/object_lanelet_filter.schema.json @@ -0,0 +1,121 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Parameters for Object Lanelet Filter", + "type": "object", + "definitions": { + "object_lanelet_filter": { + "type": "object", + "properties": { + "filter_target_label": { + "type": "object", + "properties": { + "UNKNOWN": { + "type": "boolean", + "default": false, + "description": "If true, unknown objects are filtered." + }, + "CAR": { + "type": "boolean", + "default": false, + "description": "If true, car objects are filtered." + }, + "TRUCK": { + "type": "boolean", + "default": false, + "description": "If true, truck objects are filtered." + }, + "BUS": { + "type": "boolean", + "default": false, + "description": "If true, bus objects are filtered." + }, + "TRAILER": { + "type": "boolean", + "default": false, + "description": "If true, trailer objects are filtered." + }, + "MOTORCYCLE": { + "type": "boolean", + "default": false, + "description": "If true, motorcycle objects are filtered." + }, + "BICYCLE": { + "type": "boolean", + "default": false, + "description": "If true, bicycle objects are filtered." + }, + "PEDESTRIAN": { + "type": "boolean", + "default": false, + "description": "If true, pedestrian objects are filtered." + } + }, + "required": [ + "UNKNOWN", + "CAR", + "TRUCK", + "BUS", + "TRAILER", + "MOTORCYCLE", + "BICYCLE", + "PEDESTRIAN" + ] + }, + "filter_settings": { + "type": "object", + "properties": { + "polygon_overlap_filter": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "If true, objects that are not in the lanelet polygon are filtered." + } + }, + "required": ["enabled"] + }, + "lanelet_direction_filter": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": false, + "description": "If true, objects that are not in the same direction as the lanelet are filtered." + }, + "velocity_yaw_threshold": { + "type": "number", + "default": 0.785398, + "description": "If the yaw difference between the object and the lanelet is greater than this value, the object is filtered." + }, + "object_speed_threshold": { + "type": "number", + "default": 3.0, + "description": "If the object speed is greater than this value, the object is filtered." + } + }, + "required": ["enabled", "velocity_yaw_threshold", "object_speed_threshold"] + } + }, + "required": ["polygon_overlap_filter", "lanelet_direction_filter"] + } + }, + "required": ["filter_target_label", "filter_settings"], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/object_lanelet_filter" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} diff --git a/perception/detected_object_validation/schema/object_position_filter.schema.json b/perception/detected_object_validation/schema/object_position_filter.schema.json new file mode 100644 index 0000000000000..c9e7c29e9a109 --- /dev/null +++ b/perception/detected_object_validation/schema/object_position_filter.schema.json @@ -0,0 +1,109 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Parameters for Object Position Filter", + "type": "object", + "definitions": { + "object_position_filter": { + "type": "object", + "properties": { + "upper_bound_x": { + "type": "number", + "default": 100.0, + "description": "Bound for filtering. Only used if filter_by_xy_position is true" + }, + "upper_bound_y": { + "type": "number", + "default": 50.0, + "description": "Bound for filtering. Only used if filter_by_xy_position is true" + }, + "lower_bound_x": { + "type": "number", + "default": 0.0, + "description": "Bound for filtering. Only used if filter_by_xy_position is true" + }, + "lower_bound_y": { + "type": "number", + "default": -50.0, + "description": "Bound for filtering. Only used if filter_by_xy_position is true" + }, + "filter_target_label": { + "type": "object", + "properties": { + "UNKNOWN": { + "type": "boolean", + "default": false, + "description": "If true, unknown objects are filtered." + }, + "CAR": { + "type": "boolean", + "default": false, + "description": "If true, car objects are filtered." + }, + "TRUCK": { + "type": "boolean", + "default": false, + "description": "If true, truck objects are filtered." + }, + "BUS": { + "type": "boolean", + "default": false, + "description": "If true, bus objects are filtered." + }, + "TRAILER": { + "type": "boolean", + "default": false, + "description": "If true, trailer objects are filtered." + }, + "MOTORCYCLE": { + "type": "boolean", + "default": false, + "description": "If true, motorcycle objects are filtered." + }, + "BICYCLE": { + "type": "boolean", + "default": false, + "description": "If true, bicycle objects are filtered." + }, + "PEDESTRIAN": { + "type": "boolean", + "default": false, + "description": "If true, pedestrian objects are filtered." + } + }, + "required": [ + "UNKNOWN", + "CAR", + "TRUCK", + "BUS", + "TRAILER", + "MOTORCYCLE", + "BICYCLE", + "PEDESTRIAN" + ] + } + }, + "required": [ + "upper_bound_x", + "upper_bound_y", + "lower_bound_x", + "lower_bound_y", + "filter_target_label" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/object_position_filter" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} diff --git a/perception/detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json b/perception/detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json new file mode 100644 index 0000000000000..468cb237a24b9 --- /dev/null +++ b/perception/detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json @@ -0,0 +1,68 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Parameters for Obstacle Pointcloud Based Validator", + "type": "object", + "definitions": { + "obstacle_pointcloud_based_validator": { + "type": "object", + "properties": { + "min_points_num": { + "type": "array", + "items": { + "type": "integer" + }, + "default": [10, 10, 10, 10, 10, 10, 10, 10], + "description": "The minimum number of obstacle point clouds in DetectedObjects" + }, + "max_points_num": { + "type": "array", + "items": { + "type": "integer" + }, + "default": [10, 10, 10, 10, 10, 10, 10, 10], + "description": "The max number of obstacle point clouds in DetectedObjects" + }, + "min_points_and_distance_ratio": { + "type": "array", + "items": { + "type": "integer" + }, + "default": [800, 800, 800, 800, 800, 800, 800, 800], + "description": "Threshold value of the number of point clouds per object when the distance from baselink is 1m, because the number of point clouds varies with the distance from baselink." + }, + "using_2d_validator": { + "type": "boolean", + "default": false, + "description": "The xy-plane projected (2D) obstacle point clouds will be used for validation" + }, + "enable_debugger": { + "type": "boolean", + "default": false, + "description": "Whether to create debug topics or not?" + } + }, + "required": [ + "min_points_num", + "max_points_num", + "min_points_and_distance_ratio", + "using_2d_validator", + "enable_debugger" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/obstacle_pointcloud_based_validator" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} diff --git a/perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json b/perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json new file mode 100644 index 0000000000000..a792a1e817ab9 --- /dev/null +++ b/perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Parameters for Occupancy Grid Based Validator", + "type": "object", + "definitions": { + "occupancy_grid_based_validator": { + "type": "object", + "properties": { + "mean_threshold": { + "type": "number", + "default": 0.6, + "description": "The percentage threshold of allowed non-freespace." + }, + "enable_debug": { + "type": "boolean", + "default": false, + "description": "Whether to display debug images or not?" + } + }, + "required": [ + "mean_threshold", + "enable_debug" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/occupancy_grid_based_validator" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} From b139ad7814689ffd87f03a5d49168cf7142bcbf4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:15:08 +0000 Subject: [PATCH 02/11] style(pre-commit): autofix Signed-off-by: Batuhan Beytekin --- .../config/occupancy_grid_based_validator.param.yaml | 2 +- .../schema/occupancy_grid_based_validator.schema.json | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml b/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml index 073c148b21910..710a4bf6963d9 100644 --- a/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml +++ b/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml @@ -2,4 +2,4 @@ ros__parameters: mean_threshold: 0.6 enable_debug: false - + diff --git a/perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json b/perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json index a792a1e817ab9..918e94cd9847e 100644 --- a/perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json +++ b/perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json @@ -17,10 +17,7 @@ "description": "Whether to display debug images or not?" } }, - "required": [ - "mean_threshold", - "enable_debug" - ], + "required": ["mean_threshold", "enable_debug"], "additionalProperties": false } }, From b07c3b8eb126cf25024b781fba631dbe0ca225c7 Mon Sep 17 00:00:00 2001 From: Batuhan Beytekin <71197983+batuhanbeytekin@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:45:07 +0300 Subject: [PATCH 03/11] Update perception/detected_object_validation/schema/object_lanelet_filter.schema.json Co-authored-by: badai nguyen <94814556+badai-nguyen@users.noreply.github.com> Signed-off-by: batuhanbeytekin Signed-off-by: Batuhan Beytekin --- .../schema/object_lanelet_filter.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perception/detected_object_validation/schema/object_lanelet_filter.schema.json b/perception/detected_object_validation/schema/object_lanelet_filter.schema.json index a08c71a55a020..fd4e39f0ca02e 100644 --- a/perception/detected_object_validation/schema/object_lanelet_filter.schema.json +++ b/perception/detected_object_validation/schema/object_lanelet_filter.schema.json @@ -11,7 +11,7 @@ "properties": { "UNKNOWN": { "type": "boolean", - "default": false, + "default": true, "description": "If true, unknown objects are filtered." }, "CAR": { From bef7f8e287fa4f6bb32fa29734236c93d0970823 Mon Sep 17 00:00:00 2001 From: Batuhan Beytekin <71197983+batuhanbeytekin@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:45:21 +0300 Subject: [PATCH 04/11] Update perception/detected_object_validation/schema/object_position_filter.schema.json Co-authored-by: badai nguyen <94814556+badai-nguyen@users.noreply.github.com> Signed-off-by: batuhanbeytekin Signed-off-by: Batuhan Beytekin --- .../schema/object_position_filter.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perception/detected_object_validation/schema/object_position_filter.schema.json b/perception/detected_object_validation/schema/object_position_filter.schema.json index c9e7c29e9a109..4c59bedc7c7f3 100644 --- a/perception/detected_object_validation/schema/object_position_filter.schema.json +++ b/perception/detected_object_validation/schema/object_position_filter.schema.json @@ -31,7 +31,7 @@ "properties": { "UNKNOWN": { "type": "boolean", - "default": false, + "default": true, "description": "If true, unknown objects are filtered." }, "CAR": { From 97ed63aa850feb81a5bad69d352227545f6267fc Mon Sep 17 00:00:00 2001 From: batuhanbeytekin Date: Thu, 15 Aug 2024 15:59:20 +0300 Subject: [PATCH 05/11] refactor(detected_object_validation): rework parameters Signed-off-by: batuhanbeytekin Signed-off-by: Batuhan Beytekin --- .../launch/object_lanelet_filter.launch.xml | 2 +- .../launch/obstacle_pointcloud_based_validator.launch.xml | 2 +- .../launch/occupancy_grid_based_validator.launch.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/perception/autoware_detected_object_validation/launch/object_lanelet_filter.launch.xml b/perception/autoware_detected_object_validation/launch/object_lanelet_filter.launch.xml index e25d43cf4ff29..00cc961b17ee3 100644 --- a/perception/autoware_detected_object_validation/launch/object_lanelet_filter.launch.xml +++ b/perception/autoware_detected_object_validation/launch/object_lanelet_filter.launch.xml @@ -1,4 +1,4 @@ - + diff --git a/perception/autoware_detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml b/perception/autoware_detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml index d97b1a762d360..74f30cb2f845e 100644 --- a/perception/autoware_detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml +++ b/perception/autoware_detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml @@ -1,4 +1,4 @@ - + diff --git a/perception/autoware_detected_object_validation/launch/occupancy_grid_based_validator.launch.xml b/perception/autoware_detected_object_validation/launch/occupancy_grid_based_validator.launch.xml index dbc1a012975dd..343a26a1b26fb 100644 --- a/perception/autoware_detected_object_validation/launch/occupancy_grid_based_validator.launch.xml +++ b/perception/autoware_detected_object_validation/launch/occupancy_grid_based_validator.launch.xml @@ -1,4 +1,4 @@ - + From 34788f1a76d4f6014a96bdac83f2480959d63dbd Mon Sep 17 00:00:00 2001 From: batuhanbeytekin Date: Thu, 15 Aug 2024 16:22:00 +0300 Subject: [PATCH 06/11] refactor(detected_object_validation): rework parameters Signed-off-by: batuhanbeytekin Signed-off-by: Batuhan Beytekin --- .../schema/object_lanelet_filter.schema.json | 0 .../schema/object_position_filter.schema.json | 0 .../schema/obstacle_pointcloud_based_validator.schema.json | 0 .../schema/occupancy_grid_based_validator.schema.json | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename perception/{detected_object_validation => autoware_detected_object_validation}/schema/object_lanelet_filter.schema.json (100%) rename perception/{detected_object_validation => autoware_detected_object_validation}/schema/object_position_filter.schema.json (100%) rename perception/{detected_object_validation => autoware_detected_object_validation}/schema/obstacle_pointcloud_based_validator.schema.json (100%) rename perception/{detected_object_validation => autoware_detected_object_validation}/schema/occupancy_grid_based_validator.schema.json (100%) diff --git a/perception/detected_object_validation/schema/object_lanelet_filter.schema.json b/perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json similarity index 100% rename from perception/detected_object_validation/schema/object_lanelet_filter.schema.json rename to perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json diff --git a/perception/detected_object_validation/schema/object_position_filter.schema.json b/perception/autoware_detected_object_validation/schema/object_position_filter.schema.json similarity index 100% rename from perception/detected_object_validation/schema/object_position_filter.schema.json rename to perception/autoware_detected_object_validation/schema/object_position_filter.schema.json diff --git a/perception/detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json b/perception/autoware_detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json similarity index 100% rename from perception/detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json rename to perception/autoware_detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json diff --git a/perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json b/perception/autoware_detected_object_validation/schema/occupancy_grid_based_validator.schema.json similarity index 100% rename from perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json rename to perception/autoware_detected_object_validation/schema/occupancy_grid_based_validator.schema.json From c47646f59a105c4635e319664bb451930899d626 Mon Sep 17 00:00:00 2001 From: batuhanbeytekin Date: Thu, 15 Aug 2024 16:55:44 +0300 Subject: [PATCH 07/11] refactor(detected_object_validation): rework parameters Signed-off-by: batuhanbeytekin Signed-off-by: Batuhan Beytekin --- .../schema/object_lanelet_filter.schema.json | 2 +- .../schema/object_position_filter.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json b/perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json index fd4e39f0ca02e..a08c71a55a020 100644 --- a/perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json +++ b/perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json @@ -11,7 +11,7 @@ "properties": { "UNKNOWN": { "type": "boolean", - "default": true, + "default": false, "description": "If true, unknown objects are filtered." }, "CAR": { diff --git a/perception/autoware_detected_object_validation/schema/object_position_filter.schema.json b/perception/autoware_detected_object_validation/schema/object_position_filter.schema.json index 4c59bedc7c7f3..c9e7c29e9a109 100644 --- a/perception/autoware_detected_object_validation/schema/object_position_filter.schema.json +++ b/perception/autoware_detected_object_validation/schema/object_position_filter.schema.json @@ -31,7 +31,7 @@ "properties": { "UNKNOWN": { "type": "boolean", - "default": true, + "default": false, "description": "If true, unknown objects are filtered." }, "CAR": { From 11fde05fa64acb5bc9901631391ff10c1f712c1f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 12:03:47 +0000 Subject: [PATCH 08/11] style(pre-commit): autofix Signed-off-by: Batuhan Beytekin --- .../config/occupancy_grid_based_validator.param.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml b/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml index 710a4bf6963d9..bb996f1197155 100644 --- a/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml +++ b/perception/autoware_detected_object_validation/config/occupancy_grid_based_validator.param.yaml @@ -2,4 +2,3 @@ ros__parameters: mean_threshold: 0.6 enable_debug: false - From fdb2aeb68a254d7a45e027ecb53fd6f96213a6d2 Mon Sep 17 00:00:00 2001 From: batuhanbeytekin Date: Thu, 22 Aug 2024 15:17:49 +0300 Subject: [PATCH 09/11] refactor(detected_object_validation): rework parameters Signed-off-by: batuhanbeytekin Signed-off-by: Batuhan Beytekin --- .../launch/object_position_filter.launch.xml | 2 +- ...acle_pointcloud_based_validator.launch.xml | 2 +- .../occupancy_grid_based_validator.launch.xml | 2 +- .../schema/object_lanelet_filter.schema.json | 2 +- .../schema/object_position_filter.schema.json | 77 +++++++++---------- 5 files changed, 41 insertions(+), 44 deletions(-) diff --git a/perception/autoware_detected_object_validation/launch/object_position_filter.launch.xml b/perception/autoware_detected_object_validation/launch/object_position_filter.launch.xml index e59e80021f385..03e7996bb41d1 100644 --- a/perception/autoware_detected_object_validation/launch/object_position_filter.launch.xml +++ b/perception/autoware_detected_object_validation/launch/object_position_filter.launch.xml @@ -1,4 +1,4 @@ - + diff --git a/perception/autoware_detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml b/perception/autoware_detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml index 74f30cb2f845e..d97b1a762d360 100644 --- a/perception/autoware_detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml +++ b/perception/autoware_detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml @@ -1,4 +1,4 @@ - + diff --git a/perception/autoware_detected_object_validation/launch/occupancy_grid_based_validator.launch.xml b/perception/autoware_detected_object_validation/launch/occupancy_grid_based_validator.launch.xml index 343a26a1b26fb..dbc1a012975dd 100644 --- a/perception/autoware_detected_object_validation/launch/occupancy_grid_based_validator.launch.xml +++ b/perception/autoware_detected_object_validation/launch/occupancy_grid_based_validator.launch.xml @@ -1,4 +1,4 @@ - + diff --git a/perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json b/perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json index a08c71a55a020..fd4e39f0ca02e 100644 --- a/perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json +++ b/perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json @@ -11,7 +11,7 @@ "properties": { "UNKNOWN": { "type": "boolean", - "default": false, + "default": true, "description": "If true, unknown objects are filtered." }, "CAR": { diff --git a/perception/autoware_detected_object_validation/schema/object_position_filter.schema.json b/perception/autoware_detected_object_validation/schema/object_position_filter.schema.json index c9e7c29e9a109..9c35280d403ea 100644 --- a/perception/autoware_detected_object_validation/schema/object_position_filter.schema.json +++ b/perception/autoware_detected_object_validation/schema/object_position_filter.schema.json @@ -3,71 +3,51 @@ "title": "Parameters for Object Position Filter", "type": "object", "definitions": { - "object_position_filter": { + "object_position_filter_params": { "type": "object", "properties": { - "upper_bound_x": { - "type": "number", - "default": 100.0, - "description": "Bound for filtering. Only used if filter_by_xy_position is true" - }, - "upper_bound_y": { - "type": "number", - "default": 50.0, - "description": "Bound for filtering. Only used if filter_by_xy_position is true" - }, - "lower_bound_x": { - "type": "number", - "default": 0.0, - "description": "Bound for filtering. Only used if filter_by_xy_position is true" - }, - "lower_bound_y": { - "type": "number", - "default": -50.0, - "description": "Bound for filtering. Only used if filter_by_xy_position is true" - }, "filter_target_label": { "type": "object", "properties": { "UNKNOWN": { "type": "boolean", - "default": false, - "description": "If true, unknown objects are filtered." + "default": true, + "description": "Filter for UNKNOWN label" }, "CAR": { "type": "boolean", "default": false, - "description": "If true, car objects are filtered." + "description": "Filter for CAR label" }, "TRUCK": { "type": "boolean", "default": false, - "description": "If true, truck objects are filtered." + "description": "Filter for TRUCK label" }, "BUS": { "type": "boolean", "default": false, - "description": "If true, bus objects are filtered." + "description": "Filter for BUS label" }, "TRAILER": { "type": "boolean", "default": false, - "description": "If true, trailer objects are filtered." + "description": "Filter for TRAILER label" }, "MOTORCYCLE": { "type": "boolean", "default": false, - "description": "If true, motorcycle objects are filtered." + "description": "Filter for MOTORCYCLE label" }, "BICYCLE": { "type": "boolean", "default": false, - "description": "If true, bicycle objects are filtered." + "description": "Filter for BICYCLE label" }, "PEDESTRIAN": { "type": "boolean", "default": false, - "description": "If true, pedestrian objects are filtered." + "description": "Filter for PEDESTRIAN label" } }, "required": [ @@ -80,16 +60,35 @@ "BICYCLE", "PEDESTRIAN" ] + }, + "upper_bound_x": { + "type": "number", + "default": 100.0, + "description": "Upper bound for X coordinate" + }, + "lower_bound_x": { + "type": "number", + "default": 0.0, + "description": "Lower bound for X coordinate" + }, + "upper_bound_y": { + "type": "number", + "default": 10.0, + "description": "Upper bound for Y coordinate" + }, + "lower_bound_y": { + "type": "number", + "default": -10.0, + "description": "Lower bound for Y coordinate" } }, "required": [ + "filter_target_label", "upper_bound_x", - "upper_bound_y", "lower_bound_x", - "lower_bound_y", - "filter_target_label" - ], - "additionalProperties": false + "upper_bound_y", + "lower_bound_y" + ] } }, "properties": { @@ -97,13 +96,11 @@ "type": "object", "properties": { "ros__parameters": { - "$ref": "#/definitions/object_position_filter" + "$ref": "#/definitions/object_position_filter_params" } }, - "required": ["ros__parameters"], - "additionalProperties": false + "required": ["ros__parameters"] } }, - "required": ["/**"], - "additionalProperties": false + "required": ["/**"] } From 9b3b1b5763165205210de1f837746455bdd892fa Mon Sep 17 00:00:00 2001 From: batuhanbeytekin Date: Mon, 16 Sep 2024 15:14:55 +0300 Subject: [PATCH 10/11] refactor(detected_object_validation): rework parameters Signed-off-by: batuhanbeytekin Signed-off-by: Batuhan Beytekin --- perception/autoware_detected_object_validation/README.md | 8 ++++---- .../obstacle_pointcloud_based_validator.schema.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/perception/autoware_detected_object_validation/README.md b/perception/autoware_detected_object_validation/README.md index 8715b9ba983b4..5d11c0d48c6e7 100644 --- a/perception/autoware_detected_object_validation/README.md +++ b/perception/autoware_detected_object_validation/README.md @@ -15,16 +15,16 @@ The purpose of this package is to eliminate obvious false positives of DetectedO #### object_lanelet_filter -{{ json_to_markdown("perception/detected_object_validation/schema/object_lanelet_filter.schema.json") }} +{{ json_to_markdown("perception/autoware_detected_object_validation/schema/object_lanelet_filter.schema.json") }} #### object_position_filter -{{ json_to_markdown("perception/detected_object_validation/schema/object_position_filter.schema.json") }} +{{ json_to_markdown("perception/autoware_detected_object_validation/schema/object_position_filter.schema.json") }} #### obstacle_pointcloud_based_validator -{{ json_to_markdown("perception/detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json") }} +{{ json_to_markdown("perception/autoware_detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json") }} #### occupancy_grid_based_validator -{{ json_to_markdown("perception/detected_object_validation/schema/occupancy_grid_based_validator.schema.json") }} +{{ json_to_markdown("perception/autoware_detected_object_validation/schema/occupancy_grid_based_validator.schema.json") }} \ No newline at end of file diff --git a/perception/autoware_detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json b/perception/autoware_detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json index 468cb237a24b9..d7aa970993ca1 100644 --- a/perception/autoware_detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json +++ b/perception/autoware_detected_object_validation/schema/obstacle_pointcloud_based_validator.schema.json @@ -25,7 +25,7 @@ "min_points_and_distance_ratio": { "type": "array", "items": { - "type": "integer" + "type": "number" }, "default": [800, 800, 800, 800, 800, 800, 800, 800], "description": "Threshold value of the number of point clouds per object when the distance from baselink is 1m, because the number of point clouds varies with the distance from baselink." From e661cf840379038fd5e1173ebcb5e2dcb458154d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 11:00:35 +0000 Subject: [PATCH 11/11] style(pre-commit): autofix --- perception/autoware_detected_object_validation/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perception/autoware_detected_object_validation/README.md b/perception/autoware_detected_object_validation/README.md index 5d11c0d48c6e7..adca7c0fd9678 100644 --- a/perception/autoware_detected_object_validation/README.md +++ b/perception/autoware_detected_object_validation/README.md @@ -27,4 +27,4 @@ The purpose of this package is to eliminate obvious false positives of DetectedO #### occupancy_grid_based_validator -{{ json_to_markdown("perception/autoware_detected_object_validation/schema/occupancy_grid_based_validator.schema.json") }} \ No newline at end of file +{{ json_to_markdown("perception/autoware_detected_object_validation/schema/occupancy_grid_based_validator.schema.json") }}