|
@@ -178,45 +178,57 @@ func InitTriggerConfig() {
|
|
|
}
|
|
|
}
|
|
|
} else if TopicOfCh64wRLslidarPointCloud == topic2 { //8
|
|
|
- //f, ok := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
- //if ok != true {
|
|
|
- // c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *sensor_msgs.PointCloud2) string):", err)
|
|
|
- // continue
|
|
|
- //}
|
|
|
- //RuleOfCh64wRLslidarPointCloud = append(RuleOfCh64wRLslidarPointCloud, f)
|
|
|
- f1, ok1 := rule.(func(data *sensor_msgs.LaserScan) string)
|
|
|
+ f1, ok1 := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
if ok1 {
|
|
|
- RuleOfCh64wLScan1 = append(RuleOfCh64wLScan1, f1)
|
|
|
+ RuleOfCh64wRLslidarPointCloud1 = append(RuleOfCh64wRLslidarPointCloud1, f1)
|
|
|
} else {
|
|
|
- f2, ok2 := rule.(func(data *sensor_msgs.LaserScan, param *entity.PjisuvParam) string)
|
|
|
+ f2, ok2 := rule.(func(data *sensor_msgs.PointCloud2, param *entity.PjisuvParam) string)
|
|
|
if ok2 {
|
|
|
- RuleOfCh64wLScan2 = append(RuleOfCh64wLScan2, f2)
|
|
|
+ RuleOfCh64wRLslidarPointCloud2 = append(RuleOfCh64wRLslidarPointCloud2, f2)
|
|
|
} else {
|
|
|
c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
continue
|
|
|
}
|
|
|
}
|
|
|
} else if TopicOfCh64wRScan == topic2 { //9
|
|
|
- f, ok := rule.(func(data *sensor_msgs.LaserScan) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *sensor_msgs.LaserScan) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *sensor_msgs.LaserScan) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfCh64wRScan1 = append(RuleOfCh64wRScan1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *sensor_msgs.LaserScan, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfCh64wRScan2 = append(RuleOfCh64wRScan2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfCh64wRScan = append(RuleOfCh64wRScan, f)
|
|
|
} else if TopicOfCicvLidarclusterMovingObjects == topic2 { //10
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.PerceptionCicvMovingObjects) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.PerceptionCicvMovingObjects) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.PerceptionCicvMovingObjects) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfCicvLidarclusterMovingObjects1 = append(RuleOfCicvLidarclusterMovingObjects1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.PerceptionCicvMovingObjects, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfCicvLidarclusterMovingObjects2 = append(RuleOfCicvLidarclusterMovingObjects2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfCicvLidarclusterMovingObjects = append(RuleOfCicvLidarclusterMovingObjects, f)
|
|
|
} else if TopicOfCicvAmrTrajectory == topic2 { //11
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.Trajectory, param entity.PjisuvParam) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.Trajectory,param entity.PjisuvParam) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.Trajectory) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfCicvAmrTrajectory1 = append(RuleOfCicvAmrTrajectory1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.Trajectory, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfCicvAmrTrajectory2 = append(RuleOfCicvAmrTrajectory2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfCicvAmrTrajectory = append(RuleOfCicvAmrTrajectory, f)
|
|
|
} else if TopicOfCicvLocation == topic2 { //12
|
|
|
f1, ok1 := rule.(func(data *pjisuv_msgs.PerceptionLocalization) string)
|
|
|
if ok1 {
|
|
@@ -231,180 +243,330 @@ func InitTriggerConfig() {
|
|
|
}
|
|
|
}
|
|
|
} else if TopicOfCloudClusters == topic2 { //13
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.AutowareCloudClusterArray) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.AutowareCloudClusterArray) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.AutowareCloudClusterArray) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfCloudClusters1 = append(RuleOfCloudClusters1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.AutowareCloudClusterArray, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfCloudClusters2 = append(RuleOfCloudClusters2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfCloudClusters = append(RuleOfCloudClusters, f)
|
|
|
} else if TopicOfHeartbeatInfo == topic2 { //14
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.HeartBeatInfo) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.HeartBeatInfo) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.HeartBeatInfo) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfHeartbeatInfo1 = append(RuleOfHeartbeatInfo1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.HeartBeatInfo, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfHeartbeatInfo2 = append(RuleOfHeartbeatInfo2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfHeartbeatInfo = append(RuleOfHeartbeatInfo, f)
|
|
|
} else if TopicOfLidarPretreatmentCost == topic2 { //15
|
|
|
- f, ok := rule.(func(data *geometry_msgs.Vector3Stamped) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *geometry_msgs.Vector3Stamped) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *geometry_msgs.Vector3Stamped) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfLidarPretreatmentCost1 = append(RuleOfLidarPretreatmentCost1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *geometry_msgs.Vector3Stamped, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfLidarPretreatmentCost2 = append(RuleOfLidarPretreatmentCost2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfLidarPretreatmentCost = append(RuleOfLidarPretreatmentCost, f)
|
|
|
} else if TopicOfLidarPretreatmentOdometry == topic2 { //16
|
|
|
- f, ok := rule.(func(data *nav_msgs.Odometry) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *nav_msgs.Odometry) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *nav_msgs.Odometry) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfLidarPretreatmentOdometry1 = append(RuleOfLidarPretreatmentOdometry1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *nav_msgs.Odometry, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfLidarPretreatmentOdometry2 = append(RuleOfLidarPretreatmentOdometry2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfLidarPretreatmentOdometry = append(RuleOfLidarPretreatmentOdometry, f)
|
|
|
} else if TopicOfLidarRoi == topic2 { //17
|
|
|
- f, ok := rule.(func(data *geometry_msgs.PolygonStamped) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *geometry_msgs.PolygonStamped) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *geometry_msgs.PolygonStamped) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfLidarRoi1 = append(RuleOfLidarRoi1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *geometry_msgs.PolygonStamped, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfLidarRoi2 = append(RuleOfLidarRoi2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfLidarRoi = append(RuleOfLidarRoi, f)
|
|
|
} else if TopicOfLine1 == topic2 { //18
|
|
|
- f, ok := rule.(func(data *nav_msgs.Path) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *nav_msgs.Path) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *nav_msgs.Path) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfLine11 = append(RuleOfLine11, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *nav_msgs.Path, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfLine12 = append(RuleOfLine12, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfLine1 = append(RuleOfLine1, f)
|
|
|
} else if TopicOfLine2 == topic2 { //19
|
|
|
- f, ok := rule.(func(data *nav_msgs.Path) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *nav_msgs.Path) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *nav_msgs.Path) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfLine21 = append(RuleOfLine21, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *nav_msgs.Path, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfLine22 = append(RuleOfLine22, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfLine2 = append(RuleOfLine2, f)
|
|
|
} else if TopicOfMapPolygon == topic2 { //20
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.PolygonStamped, param entity.PjisuvParam) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.PolygonStamped,param entity.PjisuvParam) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.PolygonStamped) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfMapPolygon1 = append(RuleOfMapPolygon1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.PolygonStamped, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfMapPolygon2 = append(RuleOfMapPolygon2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfMapPolygon = append(RuleOfMapPolygon, f)
|
|
|
} else if TopicOfObstacleDisplay == topic2 { //21
|
|
|
- f, ok := rule.(func(data *visualization_msgs.MarkerArray) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *visualization_msgs.MarkerArray) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *visualization_msgs.MarkerArray) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfObstacleDisplay1 = append(RuleOfObstacleDisplay1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *visualization_msgs.MarkerArray, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfObstacleDisplay2 = append(RuleOfObstacleDisplay2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfObstacleDisplay = append(RuleOfObstacleDisplay, f)
|
|
|
} else if TopicOfPjControlPub == topic2 { //22
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.CommonVehicleCmd) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.CommonVehicleCmd) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.CommonVehicleCmd) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfPjControlPub1 = append(RuleOfPjControlPub1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.CommonVehicleCmd, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfPjControlPub2 = append(RuleOfPjControlPub2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfPjControlPub = append(RuleOfPjControlPub, f)
|
|
|
} else if TopicOfPointsCluster == topic2 { //23
|
|
|
- f, ok := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *sensor_msgs.PointCloud2) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfPointsCluster1 = append(RuleOfPointsCluster1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *sensor_msgs.PointCloud2, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfPointsCluster2 = append(RuleOfPointsCluster2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfPointsCluster = append(RuleOfPointsCluster, f)
|
|
|
} else if TopicOfPointsConcat == topic2 { //24
|
|
|
- f, ok := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *sensor_msgs.PointCloud2) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfPointsConcat1 = append(RuleOfPointsConcat1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *sensor_msgs.PointCloud2, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfPointsConcat2 = append(RuleOfPointsConcat2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfPointsConcat = append(RuleOfPointsConcat, f)
|
|
|
} else if TopicOfReferenceDisplay == topic2 { //25
|
|
|
- f, ok := rule.(func(data *nav_msgs.Path) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *nav_msgs.Path) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *nav_msgs.Path) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfReferenceDisplay1 = append(RuleOfReferenceDisplay1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *nav_msgs.Path, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfReferenceDisplay2 = append(RuleOfReferenceDisplay2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfReferenceDisplay = append(RuleOfReferenceDisplay, f)
|
|
|
} else if TopicOfReferenceTrajectory == topic2 { //26
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.Trajectory) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.Trajectory) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.Trajectory) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfReferenceTrajectory1 = append(RuleOfReferenceTrajectory1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.Trajectory, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfReferenceTrajectory2 = append(RuleOfReferenceTrajectory2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfReferenceTrajectory = append(RuleOfReferenceTrajectory, f)
|
|
|
} else if TopicOfRoiPoints == topic2 { //27
|
|
|
- f, ok := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *sensor_msgs.PointCloud2) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfRoiPoints1 = append(RuleOfRoiPoints1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *sensor_msgs.PointCloud2, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfRoiPoints2 = append(RuleOfRoiPoints2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfRoiPoints = append(RuleOfRoiPoints, f)
|
|
|
} else if TopicOfRoiPolygon == topic2 { //28
|
|
|
- f, ok := rule.(func(data *nav_msgs.Path) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *nav_msgs.Path) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *nav_msgs.Path) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfRoiPolygon1 = append(RuleOfRoiPolygon1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *nav_msgs.Path, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfRoiPolygon2 = append(RuleOfRoiPolygon2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfRoiPolygon = append(RuleOfRoiPolygon, f)
|
|
|
} else if TopicOfTf == topic2 { //29
|
|
|
- f, ok := rule.(func(data *tf2_msgs.TFMessage) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *tf2_msgs.TFMessage) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *tf2_msgs.TFMessage) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfTf1 = append(RuleOfTf1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *tf2_msgs.TFMessage, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfTf2 = append(RuleOfTf2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfTf = append(RuleOfTf, f)
|
|
|
} else if TopicOfTpperception == topic2 { //30
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.PerceptionObjects, param entity.PjisuvParam) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.PerceptionObjects, param entity.ExtendParam) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.PerceptionObjects) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfTpperception1 = append(RuleOfTpperception1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.PerceptionObjects, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfTpperception2 = append(RuleOfTpperception2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfTpperception = append(RuleOfTpperception, f)
|
|
|
} else if TopicOfTpperceptionVis == topic2 { //31
|
|
|
- f, ok := rule.(func(data *visualization_msgs.MarkerArray) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *visualization_msgs.MarkerArray) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *visualization_msgs.MarkerArray) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfTpperceptionVis1 = append(RuleOfTpperceptionVis1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *visualization_msgs.MarkerArray, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfTpperceptionVis2 = append(RuleOfTpperceptionVis2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfTpperceptionVis = append(RuleOfTpperceptionVis, f)
|
|
|
} else if TopicOfTprouteplan == topic2 { //32
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.RoutePlan) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.RoutePlan) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.RoutePlan) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfTprouteplan1 = append(RuleOfTprouteplan1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.RoutePlan, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfTprouteplan2 = append(RuleOfTprouteplan2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfTprouteplan = append(RuleOfTprouteplan, f)
|
|
|
} else if TopicOfTrajectoryDisplay == topic2 { //33
|
|
|
- f, ok := rule.(func(data *nav_msgs.Path) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *nav_msgs.Path) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *nav_msgs.Path) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfTrajectoryDisplay1 = append(RuleOfTrajectoryDisplay1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *nav_msgs.Path, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfTrajectoryDisplay2 = append(RuleOfTrajectoryDisplay2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfTrajectoryDisplay = append(RuleOfTrajectoryDisplay, f)
|
|
|
} else if TopicOfUngroundCloudpoints == topic2 { //34
|
|
|
- f, ok := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *sensor_msgs.PointCloud2) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *sensor_msgs.PointCloud2) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfUngroundCloudpoints1 = append(RuleOfUngroundCloudpoints1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *sensor_msgs.PointCloud2, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfUngroundCloudpoints2 = append(RuleOfUngroundCloudpoints2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfUngroundCloudpoints = append(RuleOfUngroundCloudpoints, f)
|
|
|
} else if TopicOfCameraImage == topic2 { //35
|
|
|
- f, ok := rule.(func(data *sensor_msgs.Image) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *sensor_msgs.Image) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *sensor_msgs.Image) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfCameraImage1 = append(RuleOfCameraImage1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *sensor_msgs.Image, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfCameraImage2 = append(RuleOfCameraImage2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfCameraImage = append(RuleOfCameraImage, f)
|
|
|
} else if TopicOfDataRead == topic2 { //36
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.Retrieval) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.Retrieval) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.Retrieval) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfDataRead1 = append(RuleOfDataRead1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.Retrieval, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfDataRead2 = append(RuleOfDataRead2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfDataRead = append(RuleOfDataRead, f)
|
|
|
} else if TopicOfPjVehicleFdbPub == topic2 { //39
|
|
|
- f, ok := rule.(func(data *pjisuv_msgs.VehicleFdb, param *entity.PjisuvParam) string)
|
|
|
- if ok != true {
|
|
|
- c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Topic方法必须是(func(data *pjisuv_msgs.VehicleFdb) string):", err)
|
|
|
- continue
|
|
|
+ f1, ok1 := rule.(func(data *pjisuv_msgs.VehicleFdb) string)
|
|
|
+ if ok1 {
|
|
|
+ RuleOfPjVehicleFdbPub1 = append(RuleOfPjVehicleFdbPub1, f1)
|
|
|
+ } else {
|
|
|
+ f2, ok2 := rule.(func(data *pjisuv_msgs.VehicleFdb, param *entity.PjisuvParam) string)
|
|
|
+ if ok2 {
|
|
|
+ RuleOfPjVehicleFdbPub2 = append(RuleOfPjVehicleFdbPub2, f2)
|
|
|
+ } else {
|
|
|
+ c_log.GlobalLogger.Error("插件", triggerLocalPath, "中的Rule方法参数格式错误:", err)
|
|
|
+ continue
|
|
|
+ }
|
|
|
}
|
|
|
- RuleOfPjVehicleFdbPub = append(RuleOfPjVehicleFdbPub, f)
|
|
|
} else {
|
|
|
c_log.GlobalLogger.Error("未知的topic:", topic2)
|
|
|
continue
|