|
@@ -40,9 +40,11 @@ var (
|
|
//Yowslice = make([]float64, 0)
|
|
//Yowslice = make([]float64, 0)
|
|
//AngleSlice = make([][]float64, 0)
|
|
//AngleSlice = make([][]float64, 0)
|
|
// /tpperception
|
|
// /tpperception
|
|
- ObjDicOfTpperception = make(map[uint32][][]float32)
|
|
|
|
- objTypeDicOfTpperception = make(map[uint32]uint8)
|
|
|
|
- objSpeedDicOfTpperception = make(map[uint32]float64)
|
|
|
|
|
|
+ Frame float32 = 0.0
|
|
|
|
+ ObjDicOfTpperception = make(map[uint32][][]float32)
|
|
|
|
+ objTypeDicOfTpperception = make(map[uint32]uint8)
|
|
|
|
+ objSpeedDicOfTpperception = make(map[uint32]float64)
|
|
|
|
+ PreCloseTargetSlice = []uint32{}
|
|
// /pji_control_pub
|
|
// /pji_control_pub
|
|
numCountPjiControlCommandOfPjControlPub int
|
|
numCountPjiControlCommandOfPjControlPub int
|
|
egoSteeringCmdOfPjControlPub []float64
|
|
egoSteeringCmdOfPjControlPub []float64
|
|
@@ -648,7 +650,7 @@ func ProduceWindow() {
|
|
shareVars.Store("PositionYOfCicvLocation", data.PositionY)
|
|
shareVars.Store("PositionYOfCicvLocation", data.PositionY)
|
|
shareVars.Store("Latitude", data.Latitude)
|
|
shareVars.Store("Latitude", data.Latitude)
|
|
shareVars.Store("Longitude", data.Longitude)
|
|
shareVars.Store("Longitude", data.Longitude)
|
|
- /*用于 陡坡-DescendingSteepHill/ClimbingSteepHill触发器
|
|
|
|
|
|
+ /*用于 陡坡-DescendingSteepHill/ClimbingSteepHill 侧翻预警-RolloverWarning 触发器
|
|
if NumOfCicvLocation%10==0{
|
|
if NumOfCicvLocation%10==0{
|
|
AngleSlice[0] = append(AngleSlice[0], data.Qx)
|
|
AngleSlice[0] = append(AngleSlice[0], data.Qx)
|
|
AngleSlice[1] = append(AngleSlice[1], data.Qy)
|
|
AngleSlice[1] = append(AngleSlice[1], data.Qy)
|
|
@@ -1522,7 +1524,7 @@ func ProduceWindow() {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
if _, ok := ObjDicOfTpperception[obj.Id]; !ok {
|
|
if _, ok := ObjDicOfTpperception[obj.Id]; !ok {
|
|
- ObjDicOfTpperception[obj.Id] = [][]float32{{}, {}, {}, {}, {}}
|
|
|
|
|
|
+ ObjDicOfTpperception[obj.Id] = [][]float32{{}, {}, {}, {}, {}, {}}
|
|
}
|
|
}
|
|
ObjDicOfTpperception[obj.Id][0] = append(ObjDicOfTpperception[obj.Id][0], obj.X)
|
|
ObjDicOfTpperception[obj.Id][0] = append(ObjDicOfTpperception[obj.Id][0], obj.X)
|
|
ObjDicOfTpperception[obj.Id][1] = append(ObjDicOfTpperception[obj.Id][1], obj.Y)
|
|
ObjDicOfTpperception[obj.Id][1] = append(ObjDicOfTpperception[obj.Id][1], obj.Y)
|
|
@@ -1530,6 +1532,7 @@ func ProduceWindow() {
|
|
absspeed := math.Sqrt(math.Pow(float64(obj.Vxabs), 2) + math.Pow(float64(obj.Vyabs), 2))
|
|
absspeed := math.Sqrt(math.Pow(float64(obj.Vxabs), 2) + math.Pow(float64(obj.Vyabs), 2))
|
|
ObjDicOfTpperception[obj.Id][3] = append(ObjDicOfTpperception[obj.Id][3], float32(absspeed))
|
|
ObjDicOfTpperception[obj.Id][3] = append(ObjDicOfTpperception[obj.Id][3], float32(absspeed))
|
|
ObjDicOfTpperception[obj.Id][4] = append(ObjDicOfTpperception[obj.Id][4], obj.Heading)
|
|
ObjDicOfTpperception[obj.Id][4] = append(ObjDicOfTpperception[obj.Id][4], obj.Heading)
|
|
|
|
+ ObjDicOfTpperception[obj.Id][5] = append(ObjDicOfTpperception[obj.Id][5], Frame)
|
|
|
|
|
|
objTypeDicOfTpperception[obj.Id] = obj.Type
|
|
objTypeDicOfTpperception[obj.Id] = obj.Type
|
|
objSpeedDicOfTpperception[obj.Id] = math.Pow(math.Pow(float64(obj.Vxabs), 2)+math.Pow(float64(obj.Vyabs), 2), 0.5)
|
|
objSpeedDicOfTpperception[obj.Id] = math.Pow(math.Pow(float64(obj.Vxabs), 2)+math.Pow(float64(obj.Vyabs), 2), 0.5)
|
|
@@ -1537,6 +1540,7 @@ func ProduceWindow() {
|
|
shareVars.Store("ObjDicOfTpperception", ObjDicOfTpperception)
|
|
shareVars.Store("ObjDicOfTpperception", ObjDicOfTpperception)
|
|
shareVars.Store("ObjTypeDicOfTpperception", objTypeDicOfTpperception)
|
|
shareVars.Store("ObjTypeDicOfTpperception", objTypeDicOfTpperception)
|
|
shareVars.Store("ObjSpeedDicOfTpperception", objSpeedDicOfTpperception)
|
|
shareVars.Store("ObjSpeedDicOfTpperception", objSpeedDicOfTpperception)
|
|
|
|
+ Frame++
|
|
},
|
|
},
|
|
})
|
|
})
|
|
if err == nil {
|
|
if err == nil {
|