From 1127491caf52b34b35f1eace93ae96c3b1130fa6 Mon Sep 17 00:00:00 2001 From: Max SCHMELLER Date: Wed, 11 Sep 2024 18:12:21 +0900 Subject: [PATCH] chore(schema): restrict `sensor_model` parameter to only the sensor model in the current schema file --- nebula_ros/schema/ARS548.schema.json | 5 ++++- nebula_ros/schema/Bpearl.schema.json | 5 ++++- nebula_ros/schema/Helios.schema.json | 5 ++++- nebula_ros/schema/Pandar128E4X.schema.json | 5 ++++- nebula_ros/schema/Pandar40P.schema.json | 5 ++++- nebula_ros/schema/Pandar64.schema.json | 5 ++++- nebula_ros/schema/PandarAT128.schema.json | 5 ++++- nebula_ros/schema/PandarQT128.schema.json | 5 ++++- nebula_ros/schema/PandarQT64.schema.json | 5 ++++- nebula_ros/schema/PandarXT32.schema.json | 5 ++++- nebula_ros/schema/PandarXT32M.schema.json | 5 ++++- nebula_ros/schema/SRR520.schema.json | 5 ++++- nebula_ros/schema/VLP16.schema.json | 5 ++++- nebula_ros/schema/VLP32.schema.json | 5 ++++- nebula_ros/schema/VLS128.schema.json | 5 ++++- 15 files changed, 60 insertions(+), 15 deletions(-) diff --git a/nebula_ros/schema/ARS548.schema.json b/nebula_ros/schema/ARS548.schema.json index 1245c1190..d16385400 100644 --- a/nebula_ros/schema/ARS548.schema.json +++ b/nebula_ros/schema/ARS548.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/configuration_vehicle_wheelbase" }, "sensor_model": { - "$ref": "sub/radar_continental.json#/definitions/sensor_model" + "$ref": "sub/radar_continental.json#/definitions/sensor_model", + "enum": [ + "ARS548" + ] } }, "required": [ diff --git a/nebula_ros/schema/Bpearl.schema.json b/nebula_ros/schema/Bpearl.schema.json index 17326d0fd..65a9bf9f1 100644 --- a/nebula_ros/schema/Bpearl.schema.json +++ b/nebula_ros/schema/Bpearl.schema.json @@ -46,7 +46,10 @@ "$ref": "sub/misc.json#/definitions/dual_return_distance_threshold" }, "sensor_model": { - "$ref": "sub/lidar_robosense.json#/definitions/sensor_model" + "$ref": "sub/lidar_robosense.json#/definitions/sensor_model", + "enum": [ + "Bpearl" + ] }, "return_mode": { "$ref": "sub/lidar_robosense.json#/definitions/return_mode" diff --git a/nebula_ros/schema/Helios.schema.json b/nebula_ros/schema/Helios.schema.json index 6e4881c1c..3c3cec750 100644 --- a/nebula_ros/schema/Helios.schema.json +++ b/nebula_ros/schema/Helios.schema.json @@ -46,7 +46,10 @@ "$ref": "sub/misc.json#/definitions/dual_return_distance_threshold" }, "sensor_model": { - "$ref": "sub/lidar_robosense.json#/definitions/sensor_model" + "$ref": "sub/lidar_robosense.json#/definitions/sensor_model", + "enum": [ + "Helios" + ] }, "return_mode": { "$ref": "sub/lidar_robosense.json#/definitions/return_mode" diff --git a/nebula_ros/schema/Pandar128E4X.schema.json b/nebula_ros/schema/Pandar128E4X.schema.json index 9de8b1134..308c8c2d5 100644 --- a/nebula_ros/schema/Pandar128E4X.schema.json +++ b/nebula_ros/schema/Pandar128E4X.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_hesai.json#/definitions/sensor_model" + "$ref": "sub/lidar_hesai.json#/definitions/sensor_model", + "enum": [ + "Pandar128E4X" + ] }, "calibration_file": { "$ref": "sub/lidar_hesai.json#/definitions/calibration_file" diff --git a/nebula_ros/schema/Pandar40P.schema.json b/nebula_ros/schema/Pandar40P.schema.json index f83cdc393..2436eb538 100644 --- a/nebula_ros/schema/Pandar40P.schema.json +++ b/nebula_ros/schema/Pandar40P.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_hesai.json#/definitions/sensor_model" + "$ref": "sub/lidar_hesai.json#/definitions/sensor_model", + "enum": [ + "Pandar40P" + ] }, "calibration_file": { "$ref": "sub/lidar_hesai.json#/definitions/calibration_file" diff --git a/nebula_ros/schema/Pandar64.schema.json b/nebula_ros/schema/Pandar64.schema.json index 0b15a0f9b..ffb71d7d4 100644 --- a/nebula_ros/schema/Pandar64.schema.json +++ b/nebula_ros/schema/Pandar64.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_hesai.json#/definitions/sensor_model" + "$ref": "sub/lidar_hesai.json#/definitions/sensor_model", + "enum": [ + "Pandar64" + ] }, "rotation_speed": { "$ref": "sub/lidar_hesai.json#/definitions/rotation_speed" diff --git a/nebula_ros/schema/PandarAT128.schema.json b/nebula_ros/schema/PandarAT128.schema.json index 08c85e108..d98084a7a 100644 --- a/nebula_ros/schema/PandarAT128.schema.json +++ b/nebula_ros/schema/PandarAT128.schema.json @@ -64,7 +64,10 @@ "maximum": 150.0 }, "sensor_model": { - "$ref": "sub/lidar_hesai.json#/definitions/sensor_model" + "$ref": "sub/lidar_hesai.json#/definitions/sensor_model", + "enum": [ + "PandarAT128" + ] }, "calibration_file": { "$ref": "sub/lidar_hesai.json#/definitions/calibration_file" diff --git a/nebula_ros/schema/PandarQT128.schema.json b/nebula_ros/schema/PandarQT128.schema.json index efac39914..7eb8334dd 100644 --- a/nebula_ros/schema/PandarQT128.schema.json +++ b/nebula_ros/schema/PandarQT128.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_hesai.json#/definitions/sensor_model" + "$ref": "sub/lidar_hesai.json#/definitions/sensor_model", + "enum": [ + "PandarQT128" + ] }, "calibration_file": { "$ref": "sub/lidar_hesai.json#/definitions/calibration_file" diff --git a/nebula_ros/schema/PandarQT64.schema.json b/nebula_ros/schema/PandarQT64.schema.json index bb16cfcbb..5bc765b41 100644 --- a/nebula_ros/schema/PandarQT64.schema.json +++ b/nebula_ros/schema/PandarQT64.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_hesai.json#/definitions/sensor_model" + "$ref": "sub/lidar_hesai.json#/definitions/sensor_model", + "enum": [ + "PandarQT64" + ] }, "calibration_file": { "$ref": "sub/lidar_hesai.json#/definitions/calibration_file" diff --git a/nebula_ros/schema/PandarXT32.schema.json b/nebula_ros/schema/PandarXT32.schema.json index e4ff2eae9..fadb5f873 100644 --- a/nebula_ros/schema/PandarXT32.schema.json +++ b/nebula_ros/schema/PandarXT32.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_hesai.json#/definitions/sensor_model" + "$ref": "sub/lidar_hesai.json#/definitions/sensor_model", + "enum": [ + "PandarXT32" + ] }, "calibration_file": { "$ref": "sub/lidar_hesai.json#/definitions/calibration_file" diff --git a/nebula_ros/schema/PandarXT32M.schema.json b/nebula_ros/schema/PandarXT32M.schema.json index 43198d162..e7c522652 100644 --- a/nebula_ros/schema/PandarXT32M.schema.json +++ b/nebula_ros/schema/PandarXT32M.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_hesai.json#/definitions/sensor_model" + "$ref": "sub/lidar_hesai.json#/definitions/sensor_model", + "enum": [ + "PandarXT32M" + ] }, "calibration_file": { "$ref": "sub/lidar_hesai.json#/definitions/calibration_file" diff --git a/nebula_ros/schema/SRR520.schema.json b/nebula_ros/schema/SRR520.schema.json index 0c3004a64..1936602e1 100644 --- a/nebula_ros/schema/SRR520.schema.json +++ b/nebula_ros/schema/SRR520.schema.json @@ -37,7 +37,10 @@ "$ref": "sub/misc.json#/definitions/configuration_vehicle_wheelbase" }, "sensor_model": { - "$ref": "sub/radar_continental.json#/definitions/sensor_model" + "$ref": "sub/radar_continental.json#/definitions/sensor_model", + "enum": [ + "SRR520" + ] } }, "required": [ diff --git a/nebula_ros/schema/VLP16.schema.json b/nebula_ros/schema/VLP16.schema.json index db72f5778..45c2317dd 100644 --- a/nebula_ros/schema/VLP16.schema.json +++ b/nebula_ros/schema/VLP16.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_velodyne.json#/definitions/sensor_model" + "$ref": "sub/lidar_velodyne.json#/definitions/sensor_model", + "enum": [ + "VLP16" + ] }, "calibration_file": { "$ref": "sub/lidar_velodyne.json#/definitions/calibration_file" diff --git a/nebula_ros/schema/VLP32.schema.json b/nebula_ros/schema/VLP32.schema.json index 55cbc546d..0c988ef92 100644 --- a/nebula_ros/schema/VLP32.schema.json +++ b/nebula_ros/schema/VLP32.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_velodyne.json#/definitions/sensor_model" + "$ref": "sub/lidar_velodyne.json#/definitions/sensor_model", + "enum": [ + "VLP32" + ] }, "calibration_file": { "$ref": "sub/lidar_velodyne.json#/definitions/calibration_file" diff --git a/nebula_ros/schema/VLS128.schema.json b/nebula_ros/schema/VLS128.schema.json index 86ddcb79f..17f3f0b36 100644 --- a/nebula_ros/schema/VLS128.schema.json +++ b/nebula_ros/schema/VLS128.schema.json @@ -52,7 +52,10 @@ "$ref": "sub/misc.json#/definitions/scan_phase" }, "sensor_model": { - "$ref": "sub/lidar_velodyne.json#/definitions/sensor_model" + "$ref": "sub/lidar_velodyne.json#/definitions/sensor_model", + "enum": [ + "VLS128" + ] }, "calibration_file": { "$ref": "sub/lidar_velodyne.json#/definitions/calibration_file"