[8.0.0] ADAS LIB 障碍物轨迹预测2025(老版本完全废弃已移除);增加域控障碍物类型转换成鹰眼使用的障碍物类型方法;
This commit is contained in:
@@ -56,6 +56,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotGetParamRespon
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyPlanningObj
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokePredictionObstacleTrajectory
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordConfig
|
||||
@@ -136,7 +137,7 @@ import packet_mytest_upload.CopyBag
|
||||
import perception.FusionTrafficLightOuterClass
|
||||
import perception.LaneMarkOuterClass
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
import prediction.Prediction
|
||||
import prediction2025.Prediction2025
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import system_master.SsmInfo
|
||||
import system_master.SystemStatusInfo
|
||||
@@ -435,12 +436,12 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
return type
|
||||
}
|
||||
|
||||
//他车轨迹预测
|
||||
//障碍物轨迹预测
|
||||
override fun onPredictionObstacleTrajectory(
|
||||
header: MessagePad.Header?,
|
||||
predictionObjects: Prediction.mPredictionObjects?
|
||||
header: MessagePad.Header,
|
||||
predictionObjects: Prediction2025.mPredictionObjects
|
||||
) {
|
||||
//他车轨迹预测
|
||||
invokePredictionObstacleTrajectory(predictionObjects)
|
||||
}
|
||||
|
||||
//todo 新增稳定设备类型需要添加,目的避免在nuc设备上使用此类功能
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.api.autopilot
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.v2x.*
|
||||
import perception.FusionTrafficLightOuterClass
|
||||
import prediction2025.Prediction2025
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -34,6 +35,12 @@ interface IMoGoAutopilotIdentifyListener {
|
||||
*/
|
||||
fun onAutopilotIdentifyDataUpdate(trafficData: List<MessagePad.TrackedObject>?) {}
|
||||
|
||||
/**
|
||||
* 障碍物轨迹预测
|
||||
*
|
||||
* @param predictionObjects 预测数据
|
||||
*/
|
||||
fun onPredictionObstacleTrajectory(predictionObjects: Prediction2025.mPredictionObjects){}
|
||||
/**
|
||||
* planning识别感知预警物体
|
||||
*/
|
||||
|
||||
@@ -2,9 +2,11 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.zhjt.mogo.adas.data.Adas
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.v2x.*
|
||||
import perception.FusionTrafficLightOuterClass
|
||||
import prediction2025.Prediction2025
|
||||
|
||||
/**
|
||||
* 域控制器感知数据
|
||||
@@ -13,6 +15,33 @@ import perception.FusionTrafficLightOuterClass
|
||||
*/
|
||||
object CallerAutopilotIdentifyListenerManager : CallerBase<IMoGoAutopilotIdentifyListener>() {
|
||||
|
||||
private val typeMap: Map<Adas.TrackedObjectType, Adas.TrackedObjectClassID> = mapOf(
|
||||
Adas.TrackedObjectType.TYPE_PEDESTRIAN to Adas.TrackedObjectClassID.Person,
|
||||
Adas.TrackedObjectType.TYPE_MOTOR to Adas.TrackedObjectClassID.MotorCycle,
|
||||
Adas.TrackedObjectType.TYPE_BICYCLE to Adas.TrackedObjectClassID.Bicycle,
|
||||
Adas.TrackedObjectType.TYPE_CAR to Adas.TrackedObjectClassID.Car,
|
||||
Adas.TrackedObjectType.TYPE_TRUCK to Adas.TrackedObjectClassID.Truck,
|
||||
Adas.TrackedObjectType.TYPE_BUS to Adas.TrackedObjectClassID.Bus,
|
||||
Adas.TrackedObjectType.TYPE_WARNINGTRIANGLE to Adas.TrackedObjectClassID.WarningTriangle,
|
||||
Adas.TrackedObjectType.TYPE_ROADWORK_OCCUPY_0501 to Adas.TrackedObjectClassID.RoadWork_occupy_0501,
|
||||
Adas.TrackedObjectType.TYPE_ROADWORK_BREAK_0502 to Adas.TrackedObjectClassID.RoadWork_break_0502,
|
||||
Adas.TrackedObjectType.TYPE_ROAD_CONGESTION to Adas.TrackedObjectClassID.ROAD_CONGESTION
|
||||
)
|
||||
|
||||
/**
|
||||
* 域控障碍物类型转换成鹰眼使用的类型
|
||||
*
|
||||
* @param classType 域控障碍物类型(目前只有Prediction2025.mPredictionObjects.objs_app.classtype 是域控的障碍物类型)
|
||||
*/
|
||||
fun trackedObjectTypeTransform(classType: Int): Int {
|
||||
var type = Adas.TrackedObjectType.forNumber(classType)
|
||||
if (type == null) {
|
||||
type = Adas.TrackedObjectType.TYPE_UNKNOWN
|
||||
}
|
||||
val classId = typeMap[type] ?: Adas.TrackedObjectClassID.Unknown
|
||||
return classId.number
|
||||
}
|
||||
|
||||
/**
|
||||
* 识别交通元素数据发生更新 回调
|
||||
*/
|
||||
@@ -24,6 +53,14 @@ object CallerAutopilotIdentifyListenerManager : CallerBase<IMoGoAutopilotIdentif
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun invokePredictionObstacleTrajectory(predictionObjects: Prediction2025.mPredictionObjects) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onPredictionObstacleTrajectory(predictionObjects)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* planning识别感知预警物体
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user