|
@@ -35,8 +35,10 @@ var (
|
|
|
cicvLocationTime = time.Now()
|
|
|
// -----------------------------共享变量
|
|
|
//cicv_location
|
|
|
+ //NumOfCicvLocation = 0
|
|
|
AccelXSlice = []float64{}
|
|
|
- Yowslice = make([]float64, 0)
|
|
|
+ //Yowslice = make([]float64, 0)
|
|
|
+ //AngleSlice = make([][]float64, 0)
|
|
|
// /tpperception
|
|
|
ObjDicOfTpperception = make(map[uint32][][]float32)
|
|
|
objTypeDicOfTpperception = make(map[uint32]uint8)
|
|
@@ -646,15 +648,27 @@ func ProduceWindow() {
|
|
|
shareVars.Store("PositionYOfCicvLocation", data.PositionY)
|
|
|
shareVars.Store("Latitude", data.Latitude)
|
|
|
shareVars.Store("Longitude", data.Longitude)
|
|
|
- /*
|
|
|
- Yowslice = append(Yowslice, data.Yaw)
|
|
|
- if len(Yowslice) >= 600 {
|
|
|
- Yowslice = Yowslice[1:]
|
|
|
- }
|
|
|
- shareVars.Store("Yowslice", Yowslice)
|
|
|
+ /*用于 陡坡-DescendingSteepHill/ClimbingSteepHill触发器
|
|
|
+ if NumOfCicvLocation%10==0{
|
|
|
+ AngleSlice[0] = append(AngleSlice[0], data.Qx)
|
|
|
+ AngleSlice[1] = append(AngleSlice[1], data.Qy)
|
|
|
+ AngleSlice[2] = append(AngleSlice[2], data.Qz)
|
|
|
+ AngleSlice[3] = append(AngleSlice[3], data.Qw)
|
|
|
+ shareVars.Store("AngleSlice", AngleSlice)
|
|
|
+ NumOfCicvLocation=1
|
|
|
+ }
|
|
|
+ NumOfCicvLocation++
|
|
|
*/
|
|
|
- // 用于判断是否在车间内
|
|
|
|
|
|
+ /*用于 掉头TurnAround触发器
|
|
|
+ Yowslice = append(Yowslice, data.Yaw)
|
|
|
+ if len(Yowslice) >= 600 {
|
|
|
+ Yowslice = Yowslice[1:]
|
|
|
+ }
|
|
|
+ shareVars.Store("Yowslice", Yowslice)
|
|
|
+ */
|
|
|
+
|
|
|
+ // 用于判断是否在车间内
|
|
|
if time.Since(cicvLocationTime).Seconds() > 1 {
|
|
|
p := Point{x: data.PositionX, y: data.PositionY}
|
|
|
OutsideWorkshopFlag := isPointInPolygon(p, vertices) //在车间返回0,不在车间返回1
|