LingxinMeng 1 år sedan
förälder
incheckning
894d04385e

+ 4 - 4
aarch64/kinglong/common/config/yaml/kinglong3-v2304-cloud-config.yaml

@@ -18,8 +18,8 @@ rpc-port: 12341
 ros:
   master-address: 192.168.1.102:11311
   nodes:
-    - /GlobalWay
-# 测试暂时注释掉
+    - /control
+#    - /GlobalWay
 #    - /ObstacleInfo
 #    - /ObstacleInfo_zd
 #    - /Trajectorydisplay
@@ -73,10 +73,10 @@ hosts:
         - "PKG_CONFIG_PATH=/usr/lib/pkgconfig"
         - "ROS_DISTRO=melodic"
     topics:
-      - /AutoModeStatus
+      - /AutoModeStatus # /control
       - /cam_objects
       - /cam_res
-      - /car_wheel
+      - /car_wheel # /control
       - /cicv/lidardeeplearning_moving_objects
       - /cicv/lidarcluster_moving_objects
       - /cicv/lidarfusionmovingobject

+ 20 - 20
kinglong_msgs/common_msgs.go

@@ -7,42 +7,42 @@ import (
 
 type FaultInfo struct {
 	msg.Package  `ros:"common_msgs"`
-	TimestampSec float64 `rosname:"timestamp_sec"`
-	ModuleName   string  `rosname:"module_name"`
-	Version      string  `rosname:"version"`
-	ErrorCode    int32   `rosname:"error_code"`
-	Msg          string  `rosname:"msg"`
-	FaultLevel   int8    `rosname:"fault_level"`
-	FaultType    int8    `rosname:"fault_type"`
+	TimestampSec float64
+	ModuleName   string
+	Version      string
+	ErrorCode    int32
+	Msg          string
+	FaultLevel   int8
+	FaultType    int8
 }
 
 type Header struct {
 	msg.Package    `ros:"common_msgs"`
-	SequenceNum    int32          `rosname:"sequence_num"`
-	TimeStamp      float64        `rosname:"time_stamp"`
-	ModuleName     string         `rosname:"module_name"`
-	Version        string         `rosname:"version"`
-	FaultVec       FaultVec       `rosname:"fault_vec"`
-	TimeStatistics TimeStatistics `rosname:"time_statistics"`
+	SequenceNum    int32
+	TimeStamp      float64
+	ModuleName     string
+	Version        string
+	FaultVec       FaultVec
+	TimeStatistics TimeStatistics
 }
 
 type FaultVec struct {
 	msg.Package      `ros:"common_msgs"`
-	InfoVec          []FaultInfo `rosname:"info_vec"`
-	ModuleFaultLevel int32       `rosname:"module_fault_level"`
+	InfoVec          []FaultInfo
+	ModuleFaultLevel int32
 }
 
 type TimeStatistics struct {
 	msg.Package      `ros:"common_msgs"`
-	DevTimeStatusMsg []TimeStatus `rosname:"sequence_num"`
-	SendingTimestamp float64      `rosname:"sequence_num"`
+	DevTimeStatusMsg []TimeStatus
+	SendingTimestamp float64
 }
 
 type TimeStatus struct {
 	msg.Package         `ros:"common_msgs"`
-	Dtime               float64 `rosname:"dtime"`
-	SourceNodeName      string  `rosname:"source_node_name"`
-	DestinationNodeName string  `rosname:"destination_node_name"`
+	Dtime               float64
+	SourceNodeName      string
+	DestinationNodeName string
 }
 
 type Retrieval struct {

+ 3 - 1
trigger/kinglong/cicv_location/brake/main/brake.go

@@ -2,6 +2,7 @@ package main
 
 import (
 	"cicv-data-closedloop/kinglong_msgs"
+	"fmt"
 )
 
 func Topic() string {
@@ -13,7 +14,8 @@ func Label() string {
 }
 
 func Rule(data *kinglong_msgs.PerceptionLocalization) string {
-	if data.AccelX*9.8 < -2.5 {
+	fmt.Println("当前减速度为:", data.AccelX)
+	if data.AccelX*9.8 < -5.0 {
 		return "brake"
 	} else {
 		return ""

+ 1 - 1
trigger/kinglong/tpperception/TTC/main/TTC.go

@@ -19,7 +19,7 @@ func Rule(data *kinglong_msgs.PerceptionObjects, velocityX float64, velocityY fl
 			theta := DegreesToRadians(yaw)
 			vxrel := (float64(obj.Vxabs)-velocityX)*math.Cos(theta) + (float64(obj.Vyabs)-velocityY)*math.Sin(theta)
 			ttc := -((float64(obj.X) - 5.2) / (vxrel + 0.001))
-			if ttc >= 0 && ttc <= 3 {
+			if ttc >= 0 && ttc <= 5 {
 				return "TTC"
 			}
 		}

+ 2 - 0
trigger/pjisuv/cicv_location/brake/main/brake.go

@@ -2,6 +2,7 @@ package main
 
 import (
 	"cicv-data-closedloop/pjisuv_msgs"
+	"fmt"
 )
 
 func Topic() string {
@@ -14,6 +15,7 @@ func Label() string {
 }
 
 func Rule(data *pjisuv_msgs.PerceptionLocalization) string {
+	fmt.Println("当前减速度为:", data.AccelX)
 	if data.AccelX*9.8 < -5.0 {
 		return "brake"
 	} else {