Skip to content

Commit f0b8555

Browse files
chore(yabloc): rework parameters (#6170)
* introduce json schema for ground_server Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * introduce json schema for ll2_decomposer Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * style(pre-commit): autofix * fix json in yabloc_common Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * introduce json schema for graph_segment Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * introduce json schema for segment_filter Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * fix yabloc_common schema.json Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * introduce json schema for undistort Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * 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 <kento.yabuuchi.2@tier4.jp> * style(pre-commit): autofix * introduce json schema for yabloc_monitor Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * introduce json schema for yabloc_particle_filter Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * introduce json schema for yabloc_pose_initializer Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * apply pre-commit Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * fix revert conflict Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * style(pre-commit): autofix --------- Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a49ede7 commit f0b8555

15 files changed

+592
-53
lines changed

localization/yabloc/yabloc_common/README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,4 @@ This node extracts the elements related to the road surface markings and yabloc
6363

6464
### Parameters
6565

66-
| Name | Type | Description |
67-
| --------------------- | ---------------- | ---------------------------------------------------------------------- |
68-
| `road_marking_labels` | vector\<string\> | This label is used to extract the road surface markings from lanelet2. |
69-
| `sign_board_labels` | vector\<string\> | This label is used to extract the traffic sign boards from lanelet2. |
70-
| `bounding_box_labels` | vector\<string\> | This label is used to extract the bounding boxes from lanelet2. |
66+
{{ json_to_markdown("localization/yabloc/yabloc_common/schema/ll2_decomposer.schema.json") }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for ground_server",
4+
"type": "object",
5+
"definitions": {
6+
"ground_server": {
7+
"type": "object",
8+
"properties": {
9+
"force_zero_tilt": {
10+
"type": "boolean",
11+
"description": "if true, the tilt is always determined to be horizontal",
12+
"default": false
13+
},
14+
"K": {
15+
"type": "number",
16+
"description": "the number of neighbors for ground search on a map",
17+
"default": 50
18+
},
19+
"R": {
20+
"type": "number",
21+
"description": "radius for ground search on a map [m]",
22+
"default": 10
23+
}
24+
},
25+
"required": ["force_zero_tilt", "K", "R"],
26+
"additionalProperties": false
27+
}
28+
},
29+
"properties": {
30+
"/**": {
31+
"type": "object",
32+
"properties": {
33+
"ros__parameters": {
34+
"$ref": "#/definitions/ground_server"
35+
}
36+
},
37+
"required": ["ros__parameters"],
38+
"additionalProperties": false
39+
}
40+
},
41+
"required": ["/**"],
42+
"additionalProperties": false
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for ll2_decomposer",
4+
"type": "object",
5+
"definitions": {
6+
"ll2_decomposer": {
7+
"type": "object",
8+
"properties": {
9+
"road_marking_labels": {
10+
"type": "array",
11+
"description": "line string types that indicating road surface markings in lanelet2",
12+
"default": [
13+
"cross_walk",
14+
"zebra_marking",
15+
"line_thin",
16+
"line_thick",
17+
"pedestrian_marking",
18+
"stop_line",
19+
"road_border"
20+
]
21+
},
22+
"sign_board_labels": {
23+
"type": "array",
24+
"description": "line string types that indicating traffic sign boards in lanelet2",
25+
"default": ["sign-board"]
26+
},
27+
"bounding_box_labels": {
28+
"type": "array",
29+
"description": "line string types that indicating not mapped areas in lanelet2",
30+
"default": ["none"]
31+
}
32+
},
33+
"required": ["road_marking_labels", "sign_board_labels", "bounding_box_labels"],
34+
"additionalProperties": false
35+
}
36+
},
37+
"properties": {
38+
"/**": {
39+
"type": "object",
40+
"properties": {
41+
"ros__parameters": {
42+
"$ref": "#/definitions/ll2_decomposer"
43+
}
44+
},
45+
"required": ["ros__parameters"],
46+
"additionalProperties": false
47+
}
48+
},
49+
"required": ["/**"],
50+
"additionalProperties": false
51+
}

localization/yabloc/yabloc_image_processing/README.md

+2-13
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,7 @@ This is a node that integrates the results of graph_segment and lsd to extract r
8989

9090
### Parameters
9191

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

10194
## undistort
10295

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

128121
### Parameters
129122

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

136125
#### about tf_static overriding
137126

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for graph_segment",
4+
"type": "object",
5+
"definitions": {
6+
"graph_segment": {
7+
"type": "object",
8+
"properties": {
9+
"target_height_ratio": {
10+
"type": "number",
11+
"description": "height on the image to retrieve the candidate road surface",
12+
"default": 0.85
13+
},
14+
"target_candidate_box_width": {
15+
"type": "number",
16+
"description": "size of the square area to search for candidate road surfaces",
17+
"default": 15
18+
},
19+
"pickup_additional_graph_segment": {
20+
"type": "boolean",
21+
"description": "if this is true, additional regions of similar color are retrieved",
22+
"default": true
23+
},
24+
"similarity_score_threshold": {
25+
"type": "number",
26+
"description": "threshold for picking up additional areas",
27+
"default": 0.8
28+
},
29+
"sigma": {
30+
"type": "number",
31+
"description": "parameter for cv::ximgproc::segmentation::GraphSegmentation",
32+
"default": 0.5
33+
},
34+
"k": {
35+
"type": "number",
36+
"description": "parameter for cv::ximgproc::segmentation::GraphSegmentation",
37+
"default": 300.0
38+
},
39+
"min_size": {
40+
"type": "number",
41+
"description": "parameter for cv::ximgproc::segmentation::GraphSegmentation",
42+
"default": 100.0
43+
}
44+
},
45+
"required": [
46+
"target_height_ratio",
47+
"target_candidate_box_width",
48+
"pickup_additional_graph_segment",
49+
"similarity_score_threshold",
50+
"sigma",
51+
"k",
52+
"min_size"
53+
],
54+
"additionalProperties": false
55+
}
56+
},
57+
"properties": {
58+
"/**": {
59+
"type": "object",
60+
"properties": {
61+
"ros__parameters": {
62+
"$ref": "#/definitions/graph_segment"
63+
}
64+
},
65+
"required": ["ros__parameters"],
66+
"additionalProperties": false
67+
}
68+
},
69+
"required": ["/**"],
70+
"additionalProperties": false
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for segment_filter",
4+
"type": "object",
5+
"definitions": {
6+
"segment_filter": {
7+
"type": "object",
8+
"properties": {
9+
"min_segment_length": {
10+
"type": "number",
11+
"description": "min length threshold (if it is negative, it is unlimited)",
12+
"default": 1.5
13+
},
14+
"max_segment_distance": {
15+
"type": "number",
16+
"description": "max distance threshold (if it is negative, it is unlimited)",
17+
"default": 30.0
18+
},
19+
"max_lateral_distance": {
20+
"type": "number",
21+
"description": "max lateral distance threshold (if it is negative, it is unlimited)",
22+
"default": 10.0
23+
},
24+
"publish_image_with_segment_for_debug": {
25+
"type": "boolean",
26+
"description": "toggle whether to publish the filtered line segment for debug",
27+
"default": true
28+
},
29+
"max_range": {
30+
"type": "number",
31+
"description": "range of debug projection visualization",
32+
"default": 20.0
33+
},
34+
"image_size": {
35+
"type": "number",
36+
"description": "image size of debug projection visualization",
37+
"default": 800
38+
}
39+
},
40+
"required": [
41+
"min_segment_length",
42+
"max_segment_distance",
43+
"max_lateral_distance",
44+
"publish_image_with_segment_for_debug",
45+
"max_range",
46+
"image_size"
47+
],
48+
"additionalProperties": false
49+
}
50+
},
51+
"properties": {
52+
"/**": {
53+
"type": "object",
54+
"properties": {
55+
"ros__parameters": {
56+
"$ref": "#/definitions/segment_filter"
57+
}
58+
},
59+
"required": ["ros__parameters"],
60+
"additionalProperties": false
61+
}
62+
},
63+
"required": ["/**"],
64+
"additionalProperties": false
65+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for undistort",
4+
"type": "object",
5+
"definitions": {
6+
"undistort": {
7+
"type": "object",
8+
"properties": {
9+
"use_sensor_qos": {
10+
"type": "boolean",
11+
"description": "whether to use sensor qos or not",
12+
"default": true
13+
},
14+
"width": {
15+
"type": "number",
16+
"description": "resized image width size",
17+
"default": 800
18+
},
19+
"override_frame_id": {
20+
"type": "string",
21+
"description": "value for overriding the camera's frame_id. if blank, frame_id of static_tf is not overwritten",
22+
"default": ""
23+
}
24+
},
25+
"required": ["use_sensor_qos", "width", "override_frame_id"],
26+
"additionalProperties": false
27+
}
28+
},
29+
"properties": {
30+
"/**": {
31+
"type": "object",
32+
"properties": {
33+
"ros__parameters": {
34+
"$ref": "#/definitions/undistort"
35+
}
36+
},
37+
"required": ["ros__parameters"],
38+
"additionalProperties": false
39+
}
40+
},
41+
"required": ["/**"],
42+
"additionalProperties": false
43+
}

localization/yabloc/yabloc_monitor/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ To be added,
2525
| Name | Type | Description |
2626
| -------------- | --------------------------------- | ------------------- |
2727
| `/diagnostics` | `diagnostic_msgs/DiagnosticArray` | Diagnostics outputs |
28+
29+
### Parameters
30+
31+
{{ json_to_markdown("localization/yabloc/yabloc_monitor/schema/yabloc_monitor.schema.json") }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "Parameters for yabloc_monitor",
4+
"type": "object",
5+
"definitions": {
6+
"yabloc_monitor": {
7+
"type": "object",
8+
"properties": {
9+
"availability/timestamp_tolerance": {
10+
"type": "number",
11+
"description": "tolerable time difference between current time and latest estimated pose",
12+
"default": 1.0
13+
}
14+
},
15+
"required": ["availability/timestamp_tolerance"],
16+
"additionalProperties": false
17+
}
18+
},
19+
"properties": {
20+
"/**": {
21+
"type": "object",
22+
"properties": {
23+
"ros__parameters": {
24+
"$ref": "#/definitions/yabloc_monitor"
25+
}
26+
},
27+
"required": ["ros__parameters"],
28+
"additionalProperties": false
29+
}
30+
},
31+
"required": ["/**"],
32+
"additionalProperties": false
33+
}

0 commit comments

Comments
 (0)