Skip to content

Commit

Permalink
chore(yabloc): rework parameters (#6170)
Browse files Browse the repository at this point in the history
* introduce json schema for ground_server

Signed-off-by: Kento Yabuuchi <[email protected]>

* introduce json schema for ll2_decomposer

Signed-off-by: Kento Yabuuchi <[email protected]>

* style(pre-commit): autofix

* fix json in yabloc_common

Signed-off-by: Kento Yabuuchi <[email protected]>

* introduce json schema for graph_segment

Signed-off-by: Kento Yabuuchi <[email protected]>

* introduce json schema for segment_filter

Signed-off-by: Kento Yabuuchi <[email protected]>

* fix yabloc_common schema.json

Signed-off-by: Kento Yabuuchi <[email protected]>

* introduce json schema for undistort

Signed-off-by: Kento Yabuuchi <[email protected]>

* style(pre-commit): autofix

* Revert "introduce json schema for ground_server"

This reverts commit 33d3e60.

* Revert "introduce json schema for graph_segment"

This reverts commit 00ae417.

Signed-off-by: Kento Yabuuchi <[email protected]>

* style(pre-commit): autofix

* introduce json schema for yabloc_monitor

Signed-off-by: Kento Yabuuchi <[email protected]>

* introduce json schema for yabloc_particle_filter

Signed-off-by: Kento Yabuuchi <[email protected]>

* introduce json schema for yabloc_pose_initializer

Signed-off-by: Kento Yabuuchi <[email protected]>

* apply pre-commit

Signed-off-by: Kento Yabuuchi <[email protected]>

* fix revert conflict

Signed-off-by: Kento Yabuuchi <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Kento Yabuuchi <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
KYabuuchi and pre-commit-ci[bot] authored Jan 25, 2024
1 parent a49ede7 commit f0b8555
Show file tree
Hide file tree
Showing 15 changed files with 592 additions and 53 deletions.
6 changes: 1 addition & 5 deletions localization/yabloc/yabloc_common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,4 @@ This node extracts the elements related to the road surface markings and yabloc

### Parameters

| Name | Type | Description |
| --------------------- | ---------------- | ---------------------------------------------------------------------- |
| `road_marking_labels` | vector\<string\> | This label is used to extract the road surface markings from lanelet2. |
| `sign_board_labels` | vector\<string\> | This label is used to extract the traffic sign boards from lanelet2. |
| `bounding_box_labels` | vector\<string\> | This label is used to extract the bounding boxes from lanelet2. |
{{ json_to_markdown("localization/yabloc/yabloc_common/schema/ll2_decomposer.schema.json") }}
43 changes: 43 additions & 0 deletions localization/yabloc/yabloc_common/schema/ground_server.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for ground_server",
"type": "object",
"definitions": {
"ground_server": {
"type": "object",
"properties": {
"force_zero_tilt": {
"type": "boolean",
"description": "if true, the tilt is always determined to be horizontal",
"default": false
},
"K": {
"type": "number",
"description": "the number of neighbors for ground search on a map",
"default": 50
},
"R": {
"type": "number",
"description": "radius for ground search on a map [m]",
"default": 10
}
},
"required": ["force_zero_tilt", "K", "R"],
"additionalProperties": false
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/ground_server"
}
},
"required": ["ros__parameters"],
"additionalProperties": false
}
},
"required": ["/**"],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for ll2_decomposer",
"type": "object",
"definitions": {
"ll2_decomposer": {
"type": "object",
"properties": {
"road_marking_labels": {
"type": "array",
"description": "line string types that indicating road surface markings in lanelet2",
"default": [
"cross_walk",
"zebra_marking",
"line_thin",
"line_thick",
"pedestrian_marking",
"stop_line",
"road_border"
]
},
"sign_board_labels": {
"type": "array",
"description": "line string types that indicating traffic sign boards in lanelet2",
"default": ["sign-board"]
},
"bounding_box_labels": {
"type": "array",
"description": "line string types that indicating not mapped areas in lanelet2",
"default": ["none"]
}
},
"required": ["road_marking_labels", "sign_board_labels", "bounding_box_labels"],
"additionalProperties": false
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/ll2_decomposer"
}
},
"required": ["ros__parameters"],
"additionalProperties": false
}
},
"required": ["/**"],
"additionalProperties": false
}
15 changes: 2 additions & 13 deletions localization/yabloc/yabloc_image_processing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,7 @@ This is a node that integrates the results of graph_segment and lsd to extract r

### Parameters

| Name | Type | Description |
| -------------------------------------- | ------ | ------------------------------------------------------------------- |
| `min_segment_length` | double | min length threshold (if it is negative, it is unlimited) |
| `max_segment_distance` | double | max distance threshold (if it is negative, it is unlimited) |
| `max_lateral_distance` | double | max lateral distance threshold (if it is negative, it is unlimited) |
| `publish_image_with_segment_for_debug` | bool | toggle whether to publish the filtered line segment for debug |
| `max_range` | double | range of debug projection visualization |
| `image_size` | int | image size of debug projection visualization |
{{ json_to_markdown("localization/yabloc/yabloc_common/schema/segment_filter.schema.json") }}

## undistort

Expand Down Expand Up @@ -127,11 +120,7 @@ This is to avoid redundant decompression within Autoware.

### Parameters

| Name | Type | Description |
| ------------------- | ------ | ---------------------------------------------------------------------------------------------- |
| `use_sensor_qos` | bool | where to use sensor qos or not |
| `width` | int | resized image width size |
| `override_frame_id` | string | value for overriding the camera's frame_id. if blank, frame_id of static_tf is not overwritten |
{{ json_to_markdown("localization/yabloc/yabloc_common/schema/undistort.schema.json") }}

#### about tf_static overriding

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for graph_segment",
"type": "object",
"definitions": {
"graph_segment": {
"type": "object",
"properties": {
"target_height_ratio": {
"type": "number",
"description": "height on the image to retrieve the candidate road surface",
"default": 0.85
},
"target_candidate_box_width": {
"type": "number",
"description": "size of the square area to search for candidate road surfaces",
"default": 15
},
"pickup_additional_graph_segment": {
"type": "boolean",
"description": "if this is true, additional regions of similar color are retrieved",
"default": true
},
"similarity_score_threshold": {
"type": "number",
"description": "threshold for picking up additional areas",
"default": 0.8
},
"sigma": {
"type": "number",
"description": "parameter for cv::ximgproc::segmentation::GraphSegmentation",
"default": 0.5
},
"k": {
"type": "number",
"description": "parameter for cv::ximgproc::segmentation::GraphSegmentation",
"default": 300.0
},
"min_size": {
"type": "number",
"description": "parameter for cv::ximgproc::segmentation::GraphSegmentation",
"default": 100.0
}
},
"required": [
"target_height_ratio",
"target_candidate_box_width",
"pickup_additional_graph_segment",
"similarity_score_threshold",
"sigma",
"k",
"min_size"
],
"additionalProperties": false
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/graph_segment"
}
},
"required": ["ros__parameters"],
"additionalProperties": false
}
},
"required": ["/**"],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for segment_filter",
"type": "object",
"definitions": {
"segment_filter": {
"type": "object",
"properties": {
"min_segment_length": {
"type": "number",
"description": "min length threshold (if it is negative, it is unlimited)",
"default": 1.5
},
"max_segment_distance": {
"type": "number",
"description": "max distance threshold (if it is negative, it is unlimited)",
"default": 30.0
},
"max_lateral_distance": {
"type": "number",
"description": "max lateral distance threshold (if it is negative, it is unlimited)",
"default": 10.0
},
"publish_image_with_segment_for_debug": {
"type": "boolean",
"description": "toggle whether to publish the filtered line segment for debug",
"default": true
},
"max_range": {
"type": "number",
"description": "range of debug projection visualization",
"default": 20.0
},
"image_size": {
"type": "number",
"description": "image size of debug projection visualization",
"default": 800
}
},
"required": [
"min_segment_length",
"max_segment_distance",
"max_lateral_distance",
"publish_image_with_segment_for_debug",
"max_range",
"image_size"
],
"additionalProperties": false
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/segment_filter"
}
},
"required": ["ros__parameters"],
"additionalProperties": false
}
},
"required": ["/**"],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for undistort",
"type": "object",
"definitions": {
"undistort": {
"type": "object",
"properties": {
"use_sensor_qos": {
"type": "boolean",
"description": "whether to use sensor qos or not",
"default": true
},
"width": {
"type": "number",
"description": "resized image width size",
"default": 800
},
"override_frame_id": {
"type": "string",
"description": "value for overriding the camera's frame_id. if blank, frame_id of static_tf is not overwritten",
"default": ""
}
},
"required": ["use_sensor_qos", "width", "override_frame_id"],
"additionalProperties": false
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/undistort"
}
},
"required": ["ros__parameters"],
"additionalProperties": false
}
},
"required": ["/**"],
"additionalProperties": false
}
4 changes: 4 additions & 0 deletions localization/yabloc/yabloc_monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ To be added,
| Name | Type | Description |
| -------------- | --------------------------------- | ------------------- |
| `/diagnostics` | `diagnostic_msgs/DiagnosticArray` | Diagnostics outputs |

### Parameters

{{ json_to_markdown("localization/yabloc/yabloc_monitor/schema/yabloc_monitor.schema.json") }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Parameters for yabloc_monitor",
"type": "object",
"definitions": {
"yabloc_monitor": {
"type": "object",
"properties": {
"availability/timestamp_tolerance": {
"type": "number",
"description": "tolerable time difference between current time and latest estimated pose",
"default": 1.0
}
},
"required": ["availability/timestamp_tolerance"],
"additionalProperties": false
}
},
"properties": {
"/**": {
"type": "object",
"properties": {
"ros__parameters": {
"$ref": "#/definitions/yabloc_monitor"
}
},
"required": ["ros__parameters"],
"additionalProperties": false
}
},
"required": ["/**"],
"additionalProperties": false
}
Loading

0 comments on commit f0b8555

Please sign in to comment.