From 23af119b96f4b214a913cce384af6174a9e21675 Mon Sep 17 00:00:00 2001 From: prakash-kannaiah Date: Mon, 30 Sep 2024 12:25:31 +0530 Subject: [PATCH] refactor/ground_segmentation Signed-off-by: prakash-kannaiah --- .../autoware_ground_segmentation/README.md | 12 ++ .../schema/ground_segmentation.schema.json | 131 ++++++++++++++++++ .../schema/ransac_ground_filter.schema.json | 107 ++++++++++++++ .../schema/ray_ground_filter.schema.json | 108 +++++++++++++++ .../schema/scan_ground_filter.schema.json | 131 ++++++++++++++++++ 5 files changed, 489 insertions(+) create mode 100644 perception/autoware_ground_segmentation/schema/ground_segmentation.schema.json create mode 100644 perception/autoware_ground_segmentation/schema/ransac_ground_filter.schema.json create mode 100644 perception/autoware_ground_segmentation/schema/ray_ground_filter.schema.json create mode 100644 perception/autoware_ground_segmentation/schema/scan_ground_filter.schema.json diff --git a/perception/autoware_ground_segmentation/README.md b/perception/autoware_ground_segmentation/README.md index 08b8a4f373bcc..6f81b0174c876 100644 --- a/perception/autoware_ground_segmentation/README.md +++ b/perception/autoware_ground_segmentation/README.md @@ -43,6 +43,18 @@ Detail description of each ground segmentation algorithm is in the following lin | `latched_indices` | bool | false | flag to latch pointcloud indices | | `approximate_sync` | bool | false | flag to use approximate sync option | +### Ground Segmentation +{{ json_to_markdown("perception/autoware_ground_segmentation/schema/ground_segmentation.schema.json") }} + +### RANSAC Ground Filter +{{ json_to_markdown("perception/autoware_ground_segmentation/schema/ransac_ground_filter.schema.json") }} + +### Ray Ground Filter +{{ json_to_markdown("perception/autoware_ground_segmentation/schema/ray_ground_filter.schema.json") }} + +### Scan Ground Filter +{{ json_to_markdown("perception/autoware_ground_segmentation/schema/scan_ground_filter.schema.json") }} + ## Assumptions / Known limits `autoware::pointcloud_preprocessor::Filter` is implemented based on pcl_perception [1] because of [this issue](https://github.com/ros-perception/perception_pcl/issues/9). diff --git a/perception/autoware_ground_segmentation/schema/ground_segmentation.schema.json b/perception/autoware_ground_segmentation/schema/ground_segmentation.schema.json new file mode 100644 index 0000000000000..8fa6bf0303e3b --- /dev/null +++ b/perception/autoware_ground_segmentation/schema/ground_segmentation.schema.json @@ -0,0 +1,131 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Ground Segmentation Node Params", + "type": "object", + "definitions": { + "ground_segmentation": { + "type": "object", + "properties": { + "global_slope_max_angle_deg": { + "type": "number", + "description": "global_slope_max_angle_deg", + "default": 10.0 + }, + "local_slope_max_angle_deg": { + "type": "number", + "description": "local_slope_max_angle_deg", + "default": 13.0 + }, + "split_points_distance_tolerance": { + "type": "number", + "description": "split_points_distance_tolerance", + "default": 0.2 + }, + "use_virtual_ground_point": { + "type": "boolean", + "description": "use_virtual_ground_point", + "default": true + }, + "split_height_distance": { + "type": "number", + "description": "split_height_distance", + "default": 0.2 + }, + "non_ground_height_threshold": { + "type": "number", + "description": "non_ground_height_threshold", + "default": 0.20 + }, + "grid_size_m": { + "type": "number", + "description": "grid_size_m", + "default": 0.1 + }, + "grid_mode_switch_radius": { + "type": "number", + "description": "grid_mode_switch_radius", + "default": 20.0 + }, + "gnd_grid_buffer_size": { + "type": "integer", + "description": "gnd_grid_buffer_size", + "default": 4 + }, + "detection_range_z_max": { + "type": "number", + "description": "detection_range_z_max", + "default": 2.5 + }, + "elevation_grid_mode": { + "type": "boolean", + "description": "elevation_grid_mode", + "default": true + }, + "low_priority_region_x": { + "type": "number", + "description": "low_priority_region_x", + "default": -20.0 + }, + "center_pcl_shift": { + "type": "number", + "description": "center_pcl_shift", + "default": 0.0 + }, + "radial_divider_angle_deg": { + "type": "number", + "description": "radial_divider_angle_deg", + "default": 1.0 + }, + "use_recheck_ground_cluster": { + "type": "boolean", + "description": "use_recheck_ground_cluster", + "default": true + }, + "use_lowest_point": { + "type": "boolean", + "description": "use_lowest_point", + "default": true + }, + "publish_processing_time_detail": { + "type": "boolean", + "description": "publish_processing_time_detail", + "default": false + } + }, + "required": [ + "global_slope_max_angle_deg", + "local_slope_max_angle_deg", + "split_points_distance_tolerance", + "use_virtual_ground_point", + "split_height_distance", + "non_ground_height_threshold", + "grid_size_m", + "grid_mode_switch_radius", + "gnd_grid_buffer_size", + "detection_range_z_max", + "elevation_grid_mode", + "low_priority_region_x", + "center_pcl_shift", + "radial_divider_angle_deg", + "use_recheck_ground_cluster", + "use_lowest_point", + "publish_processing_time_detail" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/ground_segmentation" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} \ No newline at end of file diff --git a/perception/autoware_ground_segmentation/schema/ransac_ground_filter.schema.json b/perception/autoware_ground_segmentation/schema/ransac_ground_filter.schema.json new file mode 100644 index 0000000000000..d0ebe1d10b463 --- /dev/null +++ b/perception/autoware_ground_segmentation/schema/ransac_ground_filter.schema.json @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RANSAC Ground Filter Node Params", + "type": "object", + "definitions": { + "ransac_ground_filter": { + "type": "object", + "properties": { + "base_frame": { + "type": "string", + "description": "base_frame", + "default": "base_link" + }, + "unit_axis": { + "type": "string", + "description": "unit_axis", + "default": "z" + }, + "max_iterations": { + "type": "integer", + "description": "max_iterations", + "default": 1000 + }, + "min_trial": { + "type": "integer", + "description": "min_trial", + "default": 5000 + }, + "min_points": { + "type": "integer", + "description": "min_points", + "default": 1000 + }, + "outlier_threshold": { + "type": "number", + "description": "outlier_threshold", + "default": 0.01 + }, + "plane_slope_threshold": { + "type": "number", + "description": "plane_slope_threshold", + "default": 10.0 + }, + "voxel_size_x": { + "type": "number", + "description": "voxel_size_x", + "default": 0.04 + }, + "voxel_size_y": { + "type": "number", + "description": "voxel_size_y", + "default": 0.04 + }, + "voxel_size_z": { + "type": "number", + "description": "voxel_size_z", + "default": 0.04 + }, + "height_threshold": { + "type": "number", + "description": "height_threshold", + "default": 0.01 + }, + "debug": { + "type": "boolean", + "description": "debug", + "default": false + }, + "publish_processing_time_detail": { + "type": "boolean", + "description": "publish_processing_time_detail", + "default": false + } + }, + "required": [ + "base_frame", + "unit_axis", + "max_iterations", + "min_trial", + "min_points", + "outlier_threshold", + "plane_slope_threshold", + "voxel_size_x", + "voxel_size_y", + "voxel_size_z", + "height_threshold", + "debug", + "publish_processing_time_detail" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/ransac_ground_filter" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} \ No newline at end of file diff --git a/perception/autoware_ground_segmentation/schema/ray_ground_filter.schema.json b/perception/autoware_ground_segmentation/schema/ray_ground_filter.schema.json new file mode 100644 index 0000000000000..c81e2648cbca0 --- /dev/null +++ b/perception/autoware_ground_segmentation/schema/ray_ground_filter.schema.json @@ -0,0 +1,108 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Ray Ground Filter Node Params", + "type": "object", + "definitions": { + "ray_ground_filter": { + "type": "object", + "properties": { + "min_x": { + "type": "number", + "description": "min_x", + "default": -0.01 + }, + "max_x": { + "type": "number", + "description": "max_x", + "default": 0.01 + }, + "min_y": { + "type": "number", + "description": "min_y", + "default": -0.01 + }, + "max_y": { + "type": "number", + "description": "max_y", + "default": 0.01 + }, + "use_vehicle_footprint": { + "type": "boolean", + "description": "use_vehicle_footprint", + "default": false + }, + "general_max_slope": { + "type": "number", + "description": "general_max_slope", + "default": 8.0 + }, + "local_max_slope": { + "type": "number", + "description": "local_max_slope", + "default": 6.0 + }, + "initial_max_slope": { + "type": "number", + "description": "initial_max_slope", + "default": 3.0 + }, + "radial_divider_angle": { + "type": "number", + "description": "radial_divider_angle", + "default": 1.0 + }, + "min_height_threshold": { + "type": "number", + "description": "min_height_threshold", + "default": 0.15 + }, + "concentric_divider_distance": { + "type": "number", + "description": "concentric_divider_distance", + "default": 0.0 + }, + "reclass_distance_threshold": { + "type": "number", + "description": "reclass_distance_threshold", + "default": 0.1 + }, + "publish_processing_time_detail": { + "type": "boolean", + "description": "publish_processing_time_detail", + "default": false + } + }, + "required": [ + "min_x", + "max_x", + "min_y", + "max_y", + "use_vehicle_footprint", + "general_max_slope", + "local_max_slope", + "initial_max_slope", + "radial_divider_angle", + "min_height_threshold", + "concentric_divider_distance", + "reclass_distance_threshold", + "publish_processing_time_detail" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/ray_ground_filter" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} + \ No newline at end of file diff --git a/perception/autoware_ground_segmentation/schema/scan_ground_filter.schema.json b/perception/autoware_ground_segmentation/schema/scan_ground_filter.schema.json new file mode 100644 index 0000000000000..7c201423cc2a3 --- /dev/null +++ b/perception/autoware_ground_segmentation/schema/scan_ground_filter.schema.json @@ -0,0 +1,131 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Scan Ground Filter Node Params", + "type": "object", + "definitions": { + "scan_ground_filter": { + "type": "object", + "properties": { + "global_slope_max_angle_deg": { + "type": "number", + "description": "global_slope_max_angle_deg", + "default": 10.0 + }, + "local_slope_max_angle_deg": { + "type": "number", + "description": "local_slope_max_angle_deg", + "default": 13.0 + }, + "split_points_distance_tolerance": { + "type": "number", + "description": "split_points_distance_tolerance", + "default": 0.2 + }, + "use_virtual_ground_point": { + "type": "boolean", + "description": "use_virtual_ground_point", + "default": true + }, + "split_height_distance": { + "type": "number", + "description": "split_height_distance", + "default": 0.2 + }, + "non_ground_height_threshold": { + "type": "number", + "description": "non_ground_height_threshold", + "default": 0.2 + }, + "grid_size_m": { + "type": "number", + "description": "grid_size_m", + "default": 0.1 + }, + "grid_mode_switch_radius": { + "type": "number", + "description": "grid_mode_switch_radius", + "default": 20.0 + }, + "gnd_grid_buffer_size": { + "type": "integer", + "description": "gnd_grid_buffer_size", + "default": 4 + }, + "detection_range_z_max": { + "type": "number", + "description": "detection_range_z_max", + "default": 2.5 + }, + "elevation_grid_mode": { + "type": "boolean", + "description": "elevation_grid_mode", + "default": true + }, + "low_priority_region_x": { + "type": "number", + "description": "low_priority_region_x", + "default": -20.0 + }, + "center_pcl_shift": { + "type": "number", + "description": "center_pcl_shift", + "default": 0.0 + }, + "radial_divider_angle_deg": { + "type": "number", + "description": "radial_divider_angle_deg", + "default": 1.0 + }, + "use_recheck_ground_cluster": { + "type": "boolean", + "description": "use_recheck_ground_cluster", + "default": true + }, + "use_lowest_point": { + "type": "boolean", + "description": "use_lowest_point", + "default": true + }, + "publish_processing_time_detail": { + "type": "boolean", + "description": "publish_processing_time_detail", + "default": false + } + }, + "required": [ + "global_slope_max_angle_deg", + "local_slope_max_angle_deg", + "split_points_distance_tolerance", + "use_virtual_ground_point", + "split_height_distance", + "non_ground_height_threshold", + "grid_size_m", + "grid_mode_switch_radius", + "gnd_grid_buffer_size", + "detection_range_z_max", + "elevation_grid_mode", + "low_priority_region_x", + "center_pcl_shift", + "radial_divider_angle_deg", + "use_recheck_ground_cluster", + "use_lowest_point", + "publish_processing_time_detail" + ], + "additionalProperties": false + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/scan_ground_filter" + } + }, + "required": ["ros__parameters"], + "additionalProperties": false + } + }, + "required": ["/**"], + "additionalProperties": false +} \ No newline at end of file