「Change」
接入地图点云数据 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -247,11 +247,11 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
override fun onPointCloud(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?) {
|
||||
//点云数据透传
|
||||
//Logger.d("pointCloud","pointCloud"+pointCloud);
|
||||
CallerAutopilotPointCloudListenerManager.invokeAutopilotPointCloudDataUpdate(header,pointCloud)
|
||||
}
|
||||
|
||||
override fun onPointCloud(pointCloud: ByteArray?) {
|
||||
//点云数据透传
|
||||
CallerAutopilotPointCloudListenerManager.invokeAutopilotPointCloudDataUpdate(pointCloud)
|
||||
}
|
||||
|
||||
//planning障碍物
|
||||
|
||||
@@ -4,10 +4,8 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoSubscriber
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
|
||||
import com.zhidao.support.adas.high.common.PointCloudDecoder
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.zhidaoauto.map.sdk.open.business.PointCloudHelper
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import rule_segement.MogoPointCloudOuterClass
|
||||
|
||||
/**
|
||||
* 订阅点云数据
|
||||
@@ -40,14 +38,16 @@ class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAuto
|
||||
CallerAutopilotPointCloudListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?) {
|
||||
override fun onAutopilotPointCloudDataUpdate(pointCloud: ByteArray?) {
|
||||
// 根据配置动态控制点云是否绘制
|
||||
if (FunctionBuildConfig.isDrawPointCloudData) {
|
||||
if (!isDrawPointCloud) {
|
||||
Logger.d(TAG, "====开启点云渲染====")
|
||||
isDrawPointCloud = true
|
||||
PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制
|
||||
}
|
||||
val data = PointCloudDecoder.decode(header, pointCloud)
|
||||
PointCloudHelper.setIsDrawPointCloud(true)//打开点云绘制
|
||||
|
||||
|
||||
/**
|
||||
* 更新点云数据
|
||||
@@ -57,13 +57,15 @@ class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAuto
|
||||
* @param isStrong 是否加粗显示
|
||||
* @return 是否执行
|
||||
*/
|
||||
val result = PointCloudHelper.updatePointCloudData(data, false, true, true)
|
||||
Logger.d(TAG, "====开始传入地图点云数据====")
|
||||
val result = PointCloudHelper.updatePointCloudDataByPb(pointCloud, false, true, true)
|
||||
Logger.d(TAG, "====结束传入地图点云数据=====$result")
|
||||
} else {
|
||||
if (isDrawPointCloud) {
|
||||
Logger.d(TAG, "====停止点云绘制====")
|
||||
isDrawPointCloud = false
|
||||
PointCloudHelper.setIsDrawPointCloud(false)//停止点云绘制
|
||||
}
|
||||
}
|
||||
//Logger.d(TAG, "result=$result")
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import rule_segement.MogoPointCloudOuterClass
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -15,6 +13,6 @@ interface IMoGoAutopilotPointCloudListener {
|
||||
*
|
||||
* @param pointCloud 点云数据
|
||||
*/
|
||||
fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?)
|
||||
fun onAutopilotPointCloudDataUpdate(pointCloud: ByteArray?)
|
||||
|
||||
}
|
||||
@@ -1,12 +1,8 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import androidx.annotation.Nullable
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import perception.TrafficLightOuterClass
|
||||
import rule_segement.MogoPointCloudOuterClass
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
/**
|
||||
@@ -62,11 +58,11 @@ object CallerAutopilotPointCloudListenerManager : CallerBase() {
|
||||
* 识别交通元素数据发生更新 回调
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?) {
|
||||
fun invokeAutopilotPointCloudDataUpdate(pointCloud: ByteArray?) {
|
||||
M_AUTOPILOT_IDENTIFY_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
listener.onAutopilotPointCloudDataUpdate(header,pointCloud)
|
||||
listener.onAutopilotPointCloudDataUpdate(pointCloud)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.4.3.6
|
||||
MOGO_TELEMATIC_VERSION=1.4.3.6
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.2.1.1
|
||||
MAP_SDK_VERSION=2.3.0.2
|
||||
MAP_SDK_OPERATION_VERSION=1.0.13
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
|
||||
@@ -12,6 +12,6 @@ message MogoPointCloud
|
||||
optional double self_roll = 5;
|
||||
optional double self_pitch = 6;
|
||||
optional double self_yaw = 7;
|
||||
repeated float del_data = 8 [packed=true];
|
||||
repeated float add_data = 9 [packed=true];
|
||||
repeated uint32 del_data = 8 [packed=true];
|
||||
repeated double add_data = 9 [packed=true];
|
||||
}
|
||||
Reference in New Issue
Block a user