|
@@ -3,6 +3,7 @@ package main
|
|
|
import (
|
|
|
"cicv-data-closedloop/pjisuv_msgs"
|
|
|
"cicv-data-closedloop/pjisuv_param"
|
|
|
+ "fmt"
|
|
|
"math"
|
|
|
)
|
|
|
|
|
@@ -37,8 +38,9 @@ func Label() string {
|
|
|
|
|
|
func Rule(data *pjisuv_msgs.PerceptionObjects, param pjisuv_param.PjisuvParam) string {
|
|
|
for _, obj := range data.Objs {
|
|
|
- if math.Abs(float64(obj.Y)) <= 2 && obj.X >= 6 && param.VelocityYOfCicvLocation > 1 {
|
|
|
+ if math.Abs(float64(obj.Y)) <= 2 && obj.X >= 6 && param.VelocityYOfCicvLocation > 0.5 {
|
|
|
ttc := -((float64(obj.X) - 4) / (float64(obj.Vxrel) + 0.001))
|
|
|
+ fmt.Println("TTC值为:", ttc)
|
|
|
if ttc >= 0 && ttc <= 3 {
|
|
|
return "TTC"
|
|
|
}
|