-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(detected_object_validation): rework parameters
Signed-off-by: batuhanbeytekin [email protected]
- Loading branch information
1 parent
da0df3e
commit f29e0ba
Showing
14 changed files
with
434 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
perception/detected_object_validation/config/occupancy_grid_based_validator.param.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/**: | ||
ros__parameters: | ||
mean_threshold: 0.6 | ||
enable_debug: false | ||
|
23 changes: 11 additions & 12 deletions
23
perception/detected_object_validation/launch/object_lanelet_filter.launch.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
19 changes: 9 additions & 10 deletions
19
perception/detected_object_validation/launch/object_position_filter.launch.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
21 changes: 10 additions & 11 deletions
21
perception/detected_object_validation/launch/obstacle_pointcloud_based_validator.launch.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
47 changes: 22 additions & 25 deletions
47
perception/detected_object_validation/launch/occupancy_grid_based_validator.launch.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
121 changes: 121 additions & 0 deletions
121
perception/detected_object_validation/schema/object_lanelet_filter.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
109 changes: 109 additions & 0 deletions
109
perception/detected_object_validation/schema/object_position_filter.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.