孟令鑫 1 gadu atpakaļ
vecāks
revīzija
271e9b40c7

+ 20 - 0
amd64/kubernetes-scheduler/package/entity/camera_default.ini

@@ -0,0 +1,20 @@
+;默认的摄像头配置
+
+[Camera]
+; xyz unit: millimeter
+; hpr uint: degree
+; CameraFrameRate only affect video,
+CustomCamera = false
+CameraName = "custom_camera"
+CameraFovH = 45
+CameraFovV = 27
+CameraNear = 1
+CameraFar = 1500
+CameraResolution = "480*270"
+CameraFrameRate = 25
+CameraX = -15000
+CameraY = 0
+CameraZ = 5000
+CameraH = 0
+CameraP = 10
+CameraR = 0

+ 44 - 0
amd64/kubernetes-scheduler/package/entity/sensor.go

@@ -0,0 +1,44 @@
+package entity
+
+type Sensor struct {
+	SensorName string  `json:"sensor_name"` // 传感器名称
+	SensorNear float64 `json:"sensor_near"` // 盲区距离
+	SensorFar  float64 `json:"sensor_far"`  // 探测距离
+	SensorX    float64 `json:"sensor_x"`    // 传感器横向偏移量(x轴)
+	SensorY    float64 `json:"sensor_y"`    // 传感器纵向偏移量(y轴)
+	SensorZ    float64 `json:"sensor_z"`    // 传感器安装高度(z轴)
+	SensorH    float64 `json:"sensor_h"`    // 传感器横摆角
+	SensorP    float64 `json:"sensor_p"`    // 传感器俯仰角
+	SensorR    float64 `json:"sensor_r"`    // 传感器横滚角
+}
+
+// SensorParam 从数据闭环平台接收到的参数,通用
+type SensorParam struct {
+	Sensor
+	SensorForH       float64 `json:"sensor_fovH"`        // 水平视场角
+	SensorForV       float64 `json:"sensor_fovV"`        // 垂直视场角
+	SensorForHOffset float64 `json:"sensor_fovH_offset"` // 水平视场角偏移量
+	SensorForVOffset float64 `json:"sensor_fovV_offset"` // 垂直视场角偏移量
+}
+
+// SensorCamera 摄像头
+type SensorCamera struct {
+	Sensor
+	SensorForH       float64 `json:"sensor_fovH"`       // 水平现场角
+	SensorForV       float64 `json:"sensor_fovV"`       // 垂直现场角
+	SensorResolution float64 `json:"sensor_resolution"` // 分辨率
+	SensorFrameRate  float64 `json:"sensor_frameRate"`  // 帧率
+}
+
+// SensorOgt 完美传感器
+type SensorOgt struct {
+	Sensor
+	SensorForHLeft   float64 `json:"sensor_fovHLeft"`   // 水平现场角左
+	SensorForHRight  float64 `json:"sensor_fovHRight"`  // 水平现场角右
+	SensorForHTop    float64 `json:"sensor_fovVTop"`    // 垂直现场角顶
+	SensorForHBottom float64 `json:"sensor_fovVBottom"` // 垂直现场角底
+	SensorFilter     float64 `json:"sensor_filter"`     // 目标物筛选
+	SensorDisplay    float64 `json:"sensor_display"`    // 显示探测锥
+	SensorMaxObjects float64 `json:"sensor_maxObjects"` // 最大目标物个数
+	SensorPort       float64 `json:"sensor_port"`       // 端口
+}

+ 73 - 0
amd64/kubernetes-scheduler/package/entity/sensor.sql

@@ -0,0 +1,73 @@
+
+create table if not exists simulation.relation_config_sensor
+(
+    id             varchar(32)    not null comment '主键id'
+    primary key,
+    config_id      varchar(32)    null comment '配置id',
+    sensor_id      varchar(32)    null comment '传感器id',
+    sensor_type    varchar(32)    null comment '传感器类型',
+    sensor_x       decimal(19, 4) null comment '传感器横向偏移量(x轴)',
+    sensor_y       decimal(19, 4) null comment '传感器纵向偏移量(y轴)',
+    sensor_z       decimal(19, 4) null comment '传感器安装高度(z轴)',
+    sensor_h       decimal(19, 4) null comment '传感器横摆角',
+    sensor_p       decimal(19, 4) null comment '传感器俯仰角',
+    sensor_r       decimal(19, 4) null comment '传感器横滚角',
+    sensor_port    int            null comment '传感器端口',
+    create_time    datetime       null,
+    modify_time    datetime       null,
+    create_user_id varchar(32)    null,
+    modify_user_id varchar(32)    null,
+    is_deleted     varchar(1)     null
+    )
+    comment '配置与传感器关联表';
+
+
+create table if not exists simulation.model_sensor_camera
+(
+    id             varchar(32)    not null comment '主键id'
+    primary key,
+    sensor_code    varchar(32)    null comment '传感器编码',
+    sensor_name    varchar(500)   null comment '传感器名称',
+    description    text           null comment '传感器描述',
+    near_distance  decimal(19, 4) null comment '盲区距离',
+    far_distance   decimal(19, 4) null comment '探测距离',
+    fov_h          decimal(19, 4) null comment '水平现场角',
+    fov_v          decimal(19, 4) null comment '垂直现场角',
+    resolution     varchar(32)    null comment '分辨率',
+    frame_rate     decimal(19, 4) null comment '帧率',
+    self_display   varchar(1)     null comment '是否显示本车(1显示0不显示)',
+    share          varchar(32)    null comment '是否分享',
+    create_time    datetime       null,
+    modify_time    datetime       null,
+    create_user_id varchar(32)    null,
+    modify_user_id varchar(32)    null,
+    is_deleted     varchar(1)     null
+    )
+    comment '摄像头表';
+
+create table if not exists simulation.model_sensor_ogt
+(
+    id                varchar(32)    not null comment '主键id'
+        primary key,
+    sensor_code       varchar(32)    null comment '传感器编码',
+    sensor_name       varchar(500)   null comment '传感器名称',
+    description       text           null comment '传感器描述',
+    near_distance     decimal(19, 4) null comment '盲区距离',
+    far_distance      decimal(19, 4) null comment '探测距离',
+    fov_h_left        decimal(19, 4) null comment '水平现场角左',
+    fov_h_right       decimal(19, 4) null comment '水平现场角右',
+    fov_v_top         decimal(19, 4) null comment '垂直现场角顶',
+    fov_v_bottom      decimal(19, 4) null comment '垂直现场角底',
+    range_display     varchar(1)     null comment '显示探测锥',
+    max_objects       int            null comment '最大目标物个数',
+    coordinate_system varchar(32)    null comment '坐标系',
+    target_filter     varchar(640)   null comment '目标物筛选',
+    share             varchar(32)    null comment '是否分享',
+    create_time       datetime       null,
+    modify_time       datetime       null,
+    create_user_id    varchar(32)    null,
+    modify_user_id    varchar(32)    null,
+    is_deleted        varchar(1)     null
+)
+    comment '完美传感器表';
+

+ 15 - 0
amd64/kubernetes-scheduler/package/entity/sensor_filter.yaml

@@ -0,0 +1,15 @@
+sensor-filter:
+  - code: 0
+    name: 车辆
+  - code: 1
+    name: 行人
+  - code: 2
+    name: 交通信号灯
+  - code: 3
+    name: 交通标志
+  - code: 4
+    name: 障碍物
+  - code: 5
+    name: 车道信息
+  - code: 6
+    name: 路标

+ 4 - 0
amd64/kubernetes-scheduler/package/entity/水平视场角和垂直视场角计算公式.txt

@@ -0,0 +1,4 @@
+sensor_fovHLeft=水平视场角/2+水平视场角偏移量
+sensor_fovHRight=水平视场角/2-水平视场角偏移量
+SensorFovVTop=垂直视场角/2-垂直视场角偏移量
+SensorFovVBottom=垂直视场角/2+垂直视场角偏移量