|
@@ -2,6 +2,7 @@ package main
|
|
|
|
|
|
import (
|
|
|
"cicv-data-closedloop/pjisuv_msgs"
|
|
|
+ "cicv-data-closedloop/pjisuv_param"
|
|
|
"fmt"
|
|
|
"math"
|
|
|
)
|
|
@@ -32,7 +33,7 @@ var (
|
|
|
pointlist = []Point{point2, point3, point4, point5}
|
|
|
)
|
|
|
|
|
|
-func Rule(data *pjisuv_msgs.PerceptionLocalization) string {
|
|
|
+func Rule(data *pjisuv_msgs.PerceptionLocalization, param *pjisuv_param.PjisuvParam) string {
|
|
|
defer func() {
|
|
|
if r := recover(); r != nil {
|
|
|
fmt.Println("Recovered from panic:", r)
|
|
@@ -41,7 +42,7 @@ func Rule(data *pjisuv_msgs.PerceptionLocalization) string {
|
|
|
if count1%10 == 0 {
|
|
|
|
|
|
enterflag := IfEnter(pointlist, 25.0, data.Latitude, data.Longitude)
|
|
|
- if enterflag {
|
|
|
+ if enterflag && param.VelocityXOfCicvLocation >= 1 {
|
|
|
//eventLabel := "FindTrafficLight"
|
|
|
//fmt.Println(eventLabel)
|
|
|
return "FindTrafficLight"
|