Skip to content

Commit

Permalink
refactor(detected_object_validation): rework parameters
Browse files Browse the repository at this point in the history
Signed-off-by: batuhanbeytekin [email protected]
  • Loading branch information
batuhanbeytekin committed Jun 28, 2024
1 parent da0df3e commit f29e0ba
Show file tree
Hide file tree
Showing 14 changed files with 434 additions and 81 deletions.
18 changes: 18 additions & 0 deletions perception/detected_object_validation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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") }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/**:
ros__parameters:
mean_threshold: 0.6
enable_debug: false

Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="vector_map_topic" default="/map/vector_map"/>
<arg name="input/object" default="in_objects"/>
<arg name="output/object" default="out_objects"/>
<arg name="filtering_range_param" default="$(find-pkg-share detected_object_validation)/config/object_lanelet_filter.param.yaml"/>

<node pkg="detected_object_validation" exec="object_lanelet_filter_node" name="object_lanelet_filter" output="screen">
<remap from="input/vector_map" to="$(var vector_map_topic)"/>
<remap from="input/object" to="$(var input/object)"/>
<remap from="output/object" to="$(var output/object)"/>
<param from="$(var filtering_range_param)"/>
</node>
<arg name="object_lanelet_filter_param_file" default="$(find-pkg-share detected_object_validation)/config/object_lanelet_filter.param.yaml" />
<arg name="vector_map_topic" default="/map/vector_map" />
<arg name="input/object" default="in_objects" />
<arg name="output/object" default="out_objects" />
<node pkg="detected_object_validation" exec="object_lanelet_filter_node" name="object_lanelet_filter" output="screen">
<remap from="input/vector_map" to="$(var vector_map_topic)" />
<remap from="input/object" to="$(var input/object)" />
<remap from="output/object" to="$(var output/object)" />
<param from="$(var object_lanelet_filter_param_file)" />
</node>
</launch>
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="input/object" default="in_objects"/>
<arg name="output/object" default="out_objects"/>
<arg name="filtering_range_param" default="$(find-pkg-share detected_object_validation)/config/object_position_filter.param.yaml"/>

<node pkg="detected_object_validation" exec="object_position_filter_node" name="object_position_filter" output="screen">
<remap from="input/object" to="$(var input/object)"/>
<remap from="output/object" to="$(var output/object)"/>
<param from="$(var filtering_range_param)"/>
</node>
<arg name="object_position_filter_param_file" default="$(find-pkg-share detected_object_validation)/config/object_position_filter.param.yaml" />
<arg name="input/object" default="in_objects" />
<arg name="output/object" default="out_objects" />
<node pkg="detected_object_validation" exec="object_position_filter_node" name="object_position_filter" output="screen">
<remap from="input/object" to="$(var input/object)" />
<remap from="output/object" to="$(var output/object)" />
<param from="$(var object_position_filter_param_file)" />
</node>
</launch>
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="input/detected_objects" default="/perception/object_recognition/detection/objects"/>
<arg name="input/obstacle_pointcloud" default="/perception/obstacle_segmentation/pointcloud"/>
<arg name="output/objects" default="/perception/object_recognition/detection/validation/obstacle_pointcloud_based/objects"/>
<arg name="obstacle_pointcloud_based_validator_param_path" default="$(find-pkg-share detected_object_validation)/config/obstacle_pointcloud_based_validator.param.yaml"/>

<node pkg="detected_object_validation" exec="obstacle_pointcloud_based_validator_node" name="obstacle_pointcloud_based_validator_node" output="screen">
<remap from="~/input/detected_objects" to="$(var input/detected_objects)"/>
<remap from="~/input/obstacle_pointcloud" to="$(var input/obstacle_pointcloud)"/>
<remap from="~/output/objects" to="$(var output/objects)"/>
<param from="$(var obstacle_pointcloud_based_validator_param_path)"/>
</node>
<arg name="obstacle_pointcloud_based_validator_param_file" default="$(find-pkg-share detected_object_validation)/config/obstacle_pointcloud_based_validator.param.yaml" />
<arg name="input/detected_objects" default="/perception/object_recognition/detection/objects" />
<arg name="input/obstacle_pointcloud" default="/perception/obstacle_segmentation/pointcloud" />
<arg name="output/objects" default="/perception/object_recognition/detection/validation/obstacle_pointcloud_based/objects" />
<node pkg="detected_object_validation" exec="obstacle_pointcloud_based_validator_node" name="obstacle_pointcloud_based_validator_node" output="screen">
<remap from="~/input/detected_objects" to="$(var input/detected_objects)" />
<remap from="~/input/obstacle_pointcloud" to="$(var input/obstacle_pointcloud)" />
<remap from="~/output/objects" to="$(var output/objects)" />
<param from="$(var obstacle_pointcloud_based_validator_param_file)" />
</node>
</launch>
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="input/detected_objects" default="/perception/object_recognition/detection/objects"/>
<arg name="output/objects" default="/perception/object_recognition/detection/validation/occupancy_grid_based/objects"/>

<arg name="input/laserscan" default="/perception/occupancy_grid_map/virtual_scan/laserscan"/>
<arg name="input/occupancy_grid_map" default="/perception/object_recognition/detection/validation/occupancy_grid_based/single_frame_occupancy_grid_map"/>
<arg name="occupancy_grid_map_param_path" default="$(find-pkg-share probabilistic_occupancy_grid_map)/config/laserscan_based_occupancy_grid_map.param.yaml"/>
<arg name="occupancy_grid_map_updater_param_path" default="$(find-pkg-share probabilistic_occupancy_grid_map)/config/binary_bayes_filter_updater.param.yaml"/>
<arg name="occupancy_grid_based_validator_param_path" default="$(find-pkg-share detected_object_validation)/config/occupancy_grid_based_validator_param_path.param.yaml"/>

<node pkg="probabilistic_occupancy_grid_map" exec="laserscan_based_occupancy_grid_map_node" name="single_frame_laserscan_occupancy_grid_map" output="screen">
<remap from="~/input/laserscan" to="$(var input/laserscan)"/>
<remap from="~/output/occupancy_grid_map" to="$(var input/occupancy_grid_map)"/>
<param name="input_obstacle_pointcloud" value="false"/>
<param name="input_obstacle_and_raw_pointcloud" value="false"/>
<param name="updater_type" value="binary_bayes_filter"/>
<param from="$(var occupancy_grid_map_param_path)"/>
<param from="$(var occupancy_grid_map_updater_param_path)"/>
</node>

<node pkg="detected_object_validation" exec="occupancy_grid_based_validator_node" name="occupancy_grid_based_validator_node" output="screen">
<remap from="~/input/detected_objects" to="$(var input/detected_objects)"/>
<remap from="~/input/occupancy_grid_map" to="$(var input/occupancy_grid_map)"/>
<remap from="~/output/objects" to="$(var output/objects)"/>
<param from="$(var occupancy_grid_based_validator_param_path)"/>
</node>
<arg name="occupancy_grid_based_validator_param_file" default="$(find-pkg-share detected_object_validation)/config/occupancy_grid_based_validator.param.yaml" />
<arg name="input/detected_objects" default="/perception/object_recognition/detection/objects" />
<arg name="output/objects" default="/perception/object_recognition/detection/validation/occupancy_grid_based/objects" />
<arg name="input/laserscan" default="/perception/occupancy_grid_map/virtual_scan/laserscan" />
<arg name="input/occupancy_grid_map" default="/perception/object_recognition/detection/validation/occupancy_grid_based/single_frame_occupancy_grid_map" />
<arg name="occupancy_grid_map_param_path" default="$(find-pkg-share probabilistic_occupancy_grid_map)/config/laserscan_based_occupancy_grid_map.param.yaml" />
<arg name="occupancy_grid_map_updater_param_path" default="$(find-pkg-share probabilistic_occupancy_grid_map)/config/binary_bayes_filter_updater.param.yaml" />
<node pkg="probabilistic_occupancy_grid_map" exec="laserscan_based_occupancy_grid_map_node" name="single_frame_laserscan_occupancy_grid_map" output="screen">
<remap from="~/input/laserscan" to="$(var input/laserscan)" />
<remap from="~/output/occupancy_grid_map" to="$(var input/occupancy_grid_map)" />
<param name="input_obstacle_pointcloud" value="false" />
<param name="input_obstacle_and_raw_pointcloud" value="false" />
<param name="updater_type" value="binary_bayes_filter" />
<param from="$(var occupancy_grid_map_param_path)" />
<param from="$(var occupancy_grid_map_updater_param_path)" />
</node>
<node pkg="detected_object_validation" exec="occupancy_grid_based_validator_node" name="occupancy_grid_based_validator_node" output="screen">
<remap from="~/input/detected_objects" to="$(var input/detected_objects)" />
<remap from="~/input/occupancy_grid_map" to="$(var input/occupancy_grid_map)" />
<remap from="~/output/objects" to="$(var output/objects)" />
<param from="$(var occupancy_grid_based_validator_param_file)" />
</node>
</launch>
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
@@ -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
}
Loading

0 comments on commit f29e0ba

Please sign in to comment.