Skip to content

Commit

Permalink
chore(schema): restrict sensor_model parameter to only the sensor m…
Browse files Browse the repository at this point in the history
…odel in the current schema file
  • Loading branch information
mojomex committed Sep 11, 2024
1 parent 89ff10c commit 1127491
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 15 deletions.
5 changes: 4 additions & 1 deletion nebula_ros/schema/ARS548.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/Bpearl.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/Helios.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/Pandar128E4X.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/Pandar40P.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/Pandar64.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/PandarAT128.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/PandarQT128.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/PandarQT64.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/PandarXT32.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/PandarXT32M.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/SRR520.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/VLP16.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/VLP32.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion nebula_ros/schema/VLS128.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1127491

Please sign in to comment.