LingxinMeng 1 år sedan
förälder
incheckning
32429e7ec8

+ 132 - 0
aarch64/pjisuv/common/config/yaml/pjisuv-012-cloud-config.yaml

@@ -0,0 +1,132 @@
+---
+monitor:
+  url: http://36.110.106.142:12341/web_server/monitor/insert
+platform:
+  url-device-auth: http://1.202.169.139:8081/device/auth
+  url-task-poll: http://1.202.169.139:8081/device/task/poll
+  url-task: http://1.202.169.139:8081/device/task
+full-collect: true
+bag-number: 3 # 无人驾驶比赛期间,这里不需要缓存
+config-refresh-interval: 60
+disk:
+  name: /dev/vdb # 磁盘名称
+  used: 800000000000 # 磁盘占用阈值,单位bytes
+bag-data-dir: /userdata/cicv-data-closedloop/data/
+bag-copy-dir: /userdata/cicv-data-closedloop/copy/
+time-to-label-json-path: /userdata/cicv-data-closedloop/timeToLabel.json
+triggers-dir: /userdata/cicv-data-closedloop/triggers/
+time-window-send-gap: 6
+tcp-port: 12340
+rpc-port: 12341
+ros:
+  master-address: 192.168.1.102:11311
+  nodes:
+    - /camera_output
+    - /ins
+    - /lidar_pretreatment
+    - /sensorfusion
+    - /planner_s4
+    - /control
+hosts:
+  - name: node1
+    ip: 192.168.1.102
+    rosbag:
+      path: "/opt/ros/melodic/bin/rosbag"
+      envs:
+        - "LD_LIBRARY_PATH=/opt/ros/melodic/lib:/usr/lib::/usr/lib:/userdata/third_lib/libaicc"
+        - "ROS_ETC_DIR=/opt/ros/melodic/etc/ros"
+        - "USER=root"
+        - "ROS_OS_OVERRIDE=openembedded"
+        - "PWD=/mnt/media/sda1/cicv-data-closedloop"
+        - "HOME=/home/root"
+        - "CMAKE_PREFIX_PATH=/opt/ros/melodic:/usr"
+        - "ROS_ROOT=/opt/ros/melodic/share/ros"
+        - "ROS_MASTER_URI=http://192.168.1.102:11311"
+        - "ROS_VERSION=1"
+        - "ROS_PYTHON_VERSION=2"
+        - "ROS_IP=192.168.1.102"
+        - "PYTHONPATH=/opt/ros/melodic/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages"
+        - "ROS_PACKAGE_PATH=/opt/ros/melodic/share"
+        - "PATH=/opt/ros/melodic/bin:/usr/bin/cyber/tools/cyber_service:/usr/bin/cyber/tools/cyber_node:/usr/bin/cyber/tools/cyber_channel:/usr/bin/cyber/tools/cyber_launch:/usr/bin/cyber/tools/cyber_monitor:/usr/bin/cyber/tools/cyber_recorder:/apollo/bazel-bin/cyber:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
+        - "PKG_CONFIG_PATH=/usr/lib/pkgconfig"
+        - "ROS_DISTRO=melodic"
+    topics:
+      - /camera_image # /camera_output
+      - /cicv_amr_trajectory #  /planner_s4
+      - /pj_control_pub # /control
+      - /data_read
+  - name: node2
+    ip: 192.168.1.103
+    rosbag:
+      path: "/opt/ros/melodic/bin/rosbag"
+      envs:
+        - "LD_LIBRARY_PATH=/opt/ros/melodic/lib:/usr/lib::/usr/lib:/userdata/third_lib"
+        - "ROS_ETC_DIR=/opt/ros/melodic/etc/ros"
+        - "USER=root"
+        - "ROS_OS_OVERRIDE=openembedded"
+        - "PWD=/mnt/media/sda1/cicv-data-closedloop"
+        - "HOME=/home/root"
+        - "CMAKE_PREFIX_PATH=/opt/ros/melodic:/usr"
+        - "ROS_ROOT=/opt/ros/melodic/share/ros"
+        - "ROS_MASTER_URI=http://192.168.1.102:11311"
+        - "ROS_VERSION=1"
+        - "ROS_PYTHON_VERSION=2"
+        - "ROS_IP=192.168.1.103"
+        - "PYTHONPATH=/opt/ros/melodic/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages"
+        - "ROS_PACKAGE_PATH=/opt/ros/melodic/share"
+        - "PATH=/opt/ros/melodic/bin:/usr/bin/cyber/tools/cyber_service:/usr/bin/cyber/tools/cyber_node:/usr/bin/cyber/tools/cyber_channel:/usr/bin/cyber/tools/cyber_launch:/usr/bin/cyber/tools/cyber_monitor:/usr/bin/cyber/tools/cyber_recorder:/apollo/bazel-bin/cyber:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin "
+        - "PKG_CONFIG_PATH=/usr/lib/pkgconfig"
+        - "ROS_DISTRO=melodic"
+    topics:
+      - /points_concat  # /lidar_pretreatment
+      - /tpperception # /sensorfusion
+      - /cicv_location  # /ins
+triggers:
+  - label: rapidaccel
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: brake
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: EmergencyStop
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: AutoDLimit
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: lanechange
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: brakefault
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: takeover
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: TTC
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image

+ 19 - 0
aarch64/pjisuv/common/config/yaml/pjisuv-012-soc1-local-config.yaml

@@ -0,0 +1,19 @@
+node:
+  name: node1
+  ip: 192.168.1.102
+# 数据闭环平台参数
+equipment-no: pjisuv-012
+secret-key: wdf47xgggqxmnko2
+# 获取oss连接信息的接口url
+url-get-oss-config: http://36.110.106.156:18379/oss/config?token=nXonLUcMtGcrQqqKiyygIwyVbvizE0wD
+# 金龙车数据前缀
+oss-base-prefix: pjisuv/
+# oss上的配置文件的名称
+cloud-config-filename: cloud-config.yaml
+# 将oss上的配置文件下载到本地的路径
+cloud-config-local-path: /userdata/cicv-data-closedloop/config/cloud-config.yaml
+restart-cmd:
+  dir: "/userdata/cicv-data-closedloop/"
+  name: "sh"
+  args:
+    - "start-soc1.sh"

+ 132 - 0
aarch64/pjisuv/common/config/yaml/pjisuv-015-cloud-config.yaml

@@ -0,0 +1,132 @@
+---
+monitor:
+  url: http://36.110.106.142:12341/web_server/monitor/insert
+platform:
+  url-device-auth: http://1.202.169.139:8081/device/auth
+  url-task-poll: http://1.202.169.139:8081/device/task/poll
+  url-task: http://1.202.169.139:8081/device/task
+full-collect: true
+bag-number: 3 # 无人驾驶比赛期间,这里不需要缓存
+config-refresh-interval: 60
+disk:
+  name: /dev/vdb # 磁盘名称
+  used: 800000000000 # 磁盘占用阈值,单位bytes
+bag-data-dir: /userdata/cicv-data-closedloop/data/
+bag-copy-dir: /userdata/cicv-data-closedloop/copy/
+time-to-label-json-path: /userdata/cicv-data-closedloop/timeToLabel.json
+triggers-dir: /userdata/cicv-data-closedloop/triggers/
+time-window-send-gap: 6
+tcp-port: 12340
+rpc-port: 12341
+ros:
+  master-address: 192.168.1.102:11311
+  nodes:
+    - /camera_output
+    - /ins
+    - /lidar_pretreatment
+    - /sensorfusion
+    - /planner_s4
+    - /control
+hosts:
+  - name: node1
+    ip: 192.168.1.102
+    rosbag:
+      path: "/opt/ros/melodic/bin/rosbag"
+      envs:
+        - "LD_LIBRARY_PATH=/opt/ros/melodic/lib:/usr/lib::/usr/lib:/userdata/third_lib/libaicc"
+        - "ROS_ETC_DIR=/opt/ros/melodic/etc/ros"
+        - "USER=root"
+        - "ROS_OS_OVERRIDE=openembedded"
+        - "PWD=/mnt/media/sda1/cicv-data-closedloop"
+        - "HOME=/home/root"
+        - "CMAKE_PREFIX_PATH=/opt/ros/melodic:/usr"
+        - "ROS_ROOT=/opt/ros/melodic/share/ros"
+        - "ROS_MASTER_URI=http://192.168.1.102:11311"
+        - "ROS_VERSION=1"
+        - "ROS_PYTHON_VERSION=2"
+        - "ROS_IP=192.168.1.102"
+        - "PYTHONPATH=/opt/ros/melodic/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages"
+        - "ROS_PACKAGE_PATH=/opt/ros/melodic/share"
+        - "PATH=/opt/ros/melodic/bin:/usr/bin/cyber/tools/cyber_service:/usr/bin/cyber/tools/cyber_node:/usr/bin/cyber/tools/cyber_channel:/usr/bin/cyber/tools/cyber_launch:/usr/bin/cyber/tools/cyber_monitor:/usr/bin/cyber/tools/cyber_recorder:/apollo/bazel-bin/cyber:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
+        - "PKG_CONFIG_PATH=/usr/lib/pkgconfig"
+        - "ROS_DISTRO=melodic"
+    topics:
+      - /camera_image # /camera_output
+      - /cicv_amr_trajectory #  /planner_s4
+      - /pj_control_pub # /control
+      - /data_read
+  - name: node2
+    ip: 192.168.1.103
+    rosbag:
+      path: "/opt/ros/melodic/bin/rosbag"
+      envs:
+        - "LD_LIBRARY_PATH=/opt/ros/melodic/lib:/usr/lib::/usr/lib:/userdata/third_lib"
+        - "ROS_ETC_DIR=/opt/ros/melodic/etc/ros"
+        - "USER=root"
+        - "ROS_OS_OVERRIDE=openembedded"
+        - "PWD=/mnt/media/sda1/cicv-data-closedloop"
+        - "HOME=/home/root"
+        - "CMAKE_PREFIX_PATH=/opt/ros/melodic:/usr"
+        - "ROS_ROOT=/opt/ros/melodic/share/ros"
+        - "ROS_MASTER_URI=http://192.168.1.102:11311"
+        - "ROS_VERSION=1"
+        - "ROS_PYTHON_VERSION=2"
+        - "ROS_IP=192.168.1.103"
+        - "PYTHONPATH=/opt/ros/melodic/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages"
+        - "ROS_PACKAGE_PATH=/opt/ros/melodic/share"
+        - "PATH=/opt/ros/melodic/bin:/usr/bin/cyber/tools/cyber_service:/usr/bin/cyber/tools/cyber_node:/usr/bin/cyber/tools/cyber_channel:/usr/bin/cyber/tools/cyber_launch:/usr/bin/cyber/tools/cyber_monitor:/usr/bin/cyber/tools/cyber_recorder:/apollo/bazel-bin/cyber:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin "
+        - "PKG_CONFIG_PATH=/usr/lib/pkgconfig"
+        - "ROS_DISTRO=melodic"
+    topics:
+      - /points_concat  # /lidar_pretreatment
+      - /tpperception # /sensorfusion
+      - /cicv_location  # /ins
+triggers:
+  - label: rapidaccel
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: brake
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: EmergencyStop
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: AutoDLimit
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: lanechange
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: brakefault
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: takeover
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image
+  - label: TTC
+    topics:
+      - /tpperception
+      - /points_concat
+      - /cicv_location
+      - /camera_image

+ 19 - 0
aarch64/pjisuv/common/config/yaml/pjisuv-015-soc1-local-config.yaml

@@ -0,0 +1,19 @@
+node:
+  name: node1
+  ip: 192.168.1.102
+# 数据闭环平台参数
+equipment-no: pjisuv-015
+secret-key: mq6xw6x64qunnm69
+# 获取oss连接信息的接口url
+url-get-oss-config: http://36.110.106.156:18379/oss/config?token=nXonLUcMtGcrQqqKiyygIwyVbvizE0wD
+# 金龙车数据前缀
+oss-base-prefix: pjisuv/
+# oss上的配置文件的名称
+cloud-config-filename: cloud-config.yaml
+# 将oss上的配置文件下载到本地的路径
+cloud-config-local-path: /userdata/cicv-data-closedloop/config/cloud-config.yaml
+restart-cmd:
+  dir: "/userdata/cicv-data-closedloop/"
+  name: "sh"
+  args:
+    - "start-soc1.sh"

+ 17 - 5
amd64/web_server/handler/h_exam.go

@@ -68,6 +68,10 @@ func Tick(c *gin.Context) {
 			c.JSON(http.StatusBadRequest, commonEntity.Response{Code: 500, Msg: "保存比赛开始时间报错。"})
 			return
 		}
+		c.JSON(http.StatusOK, commonEntity.Response{
+			Code: 200,
+			Msg:  "队伍 " + teamName + " 的考试开始。",
+		})
 	} else if !util.ContainsKey(cacheTeamName, teamName) && (math.Abs(positionX-InitialPositionX) > 5.00 || math.Abs(positionY-InitialPositionY) > 5.00) { // 不在起点(开始)
 		// 车辆不是在起点启动的自动驾驶模式
 		var result []webServerEntity.ExamPo
@@ -86,6 +90,7 @@ func Tick(c *gin.Context) {
 				// 添加队伍名到缓存中
 				cacheTeamName[teamName] = time.Now()
 			} else {
+				c_log.GlobalLogger.Errorf("队伍 %v 的考试车辆未在起点开启自动驾驶模式,且今日无考试记录,错误启动自动驾驶模式。", param.TeamName)
 				c.JSON(http.StatusOK, commonEntity.Response{
 					Code: 400,
 					Msg:  "车辆未在起点开启自动驾驶模式,且今日无考试记录,错误启动自动驾驶模式。",
@@ -103,17 +108,24 @@ func Tick(c *gin.Context) {
 			return
 		}
 		c_log.GlobalLogger.Infof("队伍 %v 的考试在中途中断后重新开始。", teamName)
+		c.JSON(http.StatusOK, commonEntity.Response{
+			Code: 200,
+			Msg:  "队伍 " + teamName + " 的考试在中途中断后重新开始。",
+		})
 	} else if util.ContainsKey(cacheTeamName, teamName) { // 进行中
 		cacheTeamName[teamName] = time.Now()
 		c_log.GlobalLogger.Errorf("接收到心跳信息,队伍名字为 %s,x坐标为  %.f,y坐标为 %.f ", teamName, positionX, positionY)
+		c.JSON(http.StatusOK, commonEntity.Response{
+			Code: 200,
+			Msg:  "队伍 " + teamName + " 的考试进行中,心跳接收成功。",
+		})
 	} else {
 		c_log.GlobalLogger.Errorf("接收到心跳信息但考试并未开始,队伍名字为 %s,x坐标为  %.f,y坐标为 %.f ", teamName, positionX, positionY)
+		c.JSON(http.StatusOK, commonEntity.Response{
+			Code: 200,
+			Msg:  "队伍 " + teamName + " 的考试未开始。",
+		})
 	}
-
-	c.JSON(http.StatusOK, commonEntity.Response{
-		Code: 200,
-		Msg:  "心跳接收成功。",
-	})
 }
 
 func ExamEndTicker() {