|
@@ -3,6 +3,7 @@ package main
|
|
import (
|
|
import (
|
|
"cicv-data-closedloop/pjisuv_msgs"
|
|
"cicv-data-closedloop/pjisuv_msgs"
|
|
"cicv-data-closedloop/pjisuv_param"
|
|
"cicv-data-closedloop/pjisuv_param"
|
|
|
|
+ "fmt"
|
|
"math"
|
|
"math"
|
|
"slices"
|
|
"slices"
|
|
)
|
|
)
|
|
@@ -17,6 +18,11 @@ func Label() string {
|
|
}
|
|
}
|
|
|
|
|
|
func Rule(data *pjisuv_msgs.Trajectory, param *pjisuv_param.PjisuvParam) string {
|
|
func Rule(data *pjisuv_msgs.Trajectory, param *pjisuv_param.PjisuvParam) string {
|
|
|
|
+ defer func() {
|
|
|
|
+ if r := recover(); r != nil {
|
|
|
|
+ fmt.Println("Recovered from panic:", r)
|
|
|
|
+ }
|
|
|
|
+ }()
|
|
var currentCurvateres []float64
|
|
var currentCurvateres []float64
|
|
for _, point := range data.Trajectoryinfo.Trajectorypoints {
|
|
for _, point := range data.Trajectoryinfo.Trajectorypoints {
|
|
currentCurvateres = append(currentCurvateres, math.Abs(float64(point.Curvature)))
|
|
currentCurvateres = append(currentCurvateres, math.Abs(float64(point.Curvature)))
|