Skip to content

Commit b94f739

Browse files
committed
refactor: Create JSON Schema files
Signed-off-by: Motsu-san <masahiro.sakamoto@tier4.jp>
1 parent 57f8a94 commit b94f739

8 files changed

+298
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "EKF Localizer Configuration",
4+
"type": "object",
5+
"properties": {
6+
"/**": {
7+
"type": "object",
8+
"properties": {
9+
"ros__parameters": {
10+
"type": "object",
11+
"properties": {
12+
"node": {
13+
"$ref": "sub/node.sub_schema.json#/definitions/node"
14+
},
15+
"pose_measurement": {
16+
"$ref": "sub/pose_measurement.sub_schema.json#/definitions/pose_measurement"
17+
},
18+
"twist_measurement": {
19+
"$ref": "sub/twist_measurement.sub_schema.json#/definitions/twist_measurement"
20+
},
21+
"process_noise": {
22+
"$ref": "sub/process_noise.sub_schema.json#/definitions/process_noise"
23+
},
24+
"simple_1d_filter_parameters": {
25+
"$ref": "sub/simple_1d_filter_parameters.sub_schema.json#/definitions/simple_1d_filter_parameters"
26+
},
27+
"diagnostics": {
28+
"$ref": "sub/diagnostics.sub_schema.json#/definitions/diagnostics"
29+
},
30+
"misc": {
31+
"$ref": "sub/misc.sub_schema.json#/definitions/misc"
32+
}
33+
},
34+
"required": [
35+
"node",
36+
"pose_measurement",
37+
"twist_measurement",
38+
"process_noise",
39+
"simple_1d_filter_parameters",
40+
"diagnostics",
41+
"misc"
42+
],
43+
"additionalProperties": false
44+
}
45+
},
46+
"required": [
47+
"ros__parameters"
48+
],
49+
"additionalProperties": false
50+
}
51+
},
52+
"required": [
53+
"/**"
54+
],
55+
"additionalProperties": false
56+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "EKF Localizer Configuration for Diagnostics",
4+
"definitions": {
5+
"diagnostics": {
6+
"type": "object",
7+
"properties": {
8+
"pose_no_update_count_threshold_warn": {
9+
"type": "integer",
10+
"description": "Warning threshold for pose update count.",
11+
"default": 50
12+
},
13+
"pose_no_update_count_threshold_error": {
14+
"type": "integer",
15+
"description": "Error threshold for pose update count.",
16+
"default": 100
17+
},
18+
"twist_no_update_count_threshold_warn": {
19+
"type": "integer",
20+
"description": "Warning threshold for twist update count.",
21+
"default": 50
22+
},
23+
"twist_no_update_count_threshold_error": {
24+
"type": "integer",
25+
"description": "Error threshold for twist update count.",
26+
"default": 100
27+
}
28+
},
29+
"required": [
30+
"pose_no_update_count_threshold_warn",
31+
"pose_no_update_count_threshold_error",
32+
"twist_no_update_count_threshold_warn",
33+
"twist_no_update_count_threshold_error"
34+
],
35+
"additionalProperties": false
36+
}
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "EKF Localizer Configuration for MISC",
4+
"definitions": {
5+
"misc": {
6+
"type": "object",
7+
"properties": {
8+
"threshold_observable_velocity_mps": {
9+
"type": "number",
10+
"description": "Velocity threshold for observability in meters per second.",
11+
"default": 0.0
12+
}
13+
},
14+
"required": [
15+
"threshold_observable_velocity_mps"
16+
],
17+
"additionalProperties": false
18+
}
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "EKF Localizer Configuration for node",
4+
"definitions": {
5+
"node": {
6+
"type": "object",
7+
"properties": {
8+
"show_debug_info": {
9+
"type": "boolean",
10+
"description": "Displays debug information if set to true.",
11+
"default": false
12+
},
13+
"predict_frequency": {
14+
"type": "number",
15+
"description": "Frequency of prediction cycles.",
16+
"default": 50.0
17+
},
18+
"tf_rate": {
19+
"type": "number",
20+
"description": "Frequency at which transform frames are published.",
21+
"default": 50.0
22+
},
23+
"publish_tf": {
24+
"type": "boolean",
25+
"description": "Determines whether transform frames are published.",
26+
"default": true
27+
},
28+
"extend_state_step": {
29+
"type": "integer",
30+
"description": "Number of steps for extending the state.",
31+
"default": 50
32+
},
33+
"enable_yaw_bias_estimation": {
34+
"type": "boolean",
35+
"description": "Enables yaw bias estimation.",
36+
"default": true
37+
}
38+
},
39+
"required": [
40+
"show_debug_info",
41+
"predict_frequency",
42+
"tf_rate",
43+
"publish_tf",
44+
"extend_state_step",
45+
"enable_yaw_bias_estimation"
46+
],
47+
"additionalProperties": false
48+
}
49+
}
50+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "EKF Localizer Configuration for Pose Measurement",
4+
"definitions": {
5+
"pose_measurement": {
6+
"type": "object",
7+
"properties": {
8+
"pose_additional_delay": {
9+
"type": "number",
10+
"description": "Additional delay for pose measurements.",
11+
"default": 0.0
12+
},
13+
"pose_measure_uncertainty_time": {
14+
"type": "number",
15+
"description": "Time uncertainty for pose measurements.",
16+
"default": 0.01
17+
},
18+
"pose_smoothing_steps": {
19+
"type": "integer",
20+
"description": "Number of steps for pose smoothing.",
21+
"default": 5
22+
},
23+
"pose_gate_dist": {
24+
"type": "number",
25+
"description": "Gate distance for pose measurements.",
26+
"default": 10000.0
27+
}
28+
},
29+
"required": [
30+
"pose_additional_delay",
31+
"pose_measure_uncertainty_time",
32+
"pose_smoothing_steps",
33+
"pose_gate_dist"
34+
],
35+
"additionalProperties": false
36+
}
37+
}
38+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "EKF Localizer Configuration for Process Noise",
4+
"definitions": {
5+
"process_noise": {
6+
"type": "object",
7+
"properties": {
8+
"proc_stddev_yaw_c": {
9+
"type": "number",
10+
"description": "Standard deviation of yaw in the process model.",
11+
"default": 0.005
12+
},
13+
"proc_stddev_vx_c": {
14+
"type": "number",
15+
"description": "Standard deviation of linear velocity in the process model.",
16+
"default": 10.0
17+
},
18+
"proc_stddev_wz_c": {
19+
"type": "number",
20+
"description": "Standard deviation of angular velocity in the process model.",
21+
"default": 5.0
22+
}
23+
},
24+
"required": [
25+
"proc_stddev_yaw_c",
26+
"proc_stddev_vx_c",
27+
"proc_stddev_wz_c"
28+
],
29+
"additionalProperties": false
30+
}
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "EKF Localizer Configuration of Simple 1D Filter Parameters",
4+
"definitions": {
5+
"simple_1d_filter_parameters": {
6+
"type": "object",
7+
"properties": {
8+
"z_filter_proc_dev": {
9+
"type": "number",
10+
"description": "Process deviation for the Z-axis filter.",
11+
"default": 1.0
12+
},
13+
"roll_filter_proc_dev": {
14+
"type": "number",
15+
"description": "Process deviation for the roll filter.",
16+
"default": 0.01
17+
},
18+
"pitch_filter_proc_dev": {
19+
"type": "number",
20+
"description": "Process deviation for the pitch filter.",
21+
"default": 0.01
22+
}
23+
},
24+
"required": [
25+
"z_filter_proc_dev",
26+
"roll_filter_proc_dev",
27+
"pitch_filter_proc_dev"
28+
],
29+
"additionalProperties": false
30+
}
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "EKF Localizer Configuration for Twist Measurement",
4+
"definitions": {
5+
"twist_measurement": {
6+
"type": "object",
7+
"properties": {
8+
"twist_additional_delay": {
9+
"type": "number",
10+
"description": "Additional delay for twist measurements.",
11+
"default": 0.0
12+
},
13+
"twist_smoothing_steps": {
14+
"type": "integer",
15+
"description": "Number of steps for twist smoothing.",
16+
"default": 2
17+
},
18+
"twist_gate_dist": {
19+
"type": "number",
20+
"description": "Gate distance for twist measurements.",
21+
"default": 10000.0
22+
}
23+
},
24+
"required": [
25+
"twist_additional_delay",
26+
"twist_smoothing_steps",
27+
"twist_gate_dist"
28+
],
29+
"additionalProperties": false
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)