「Change」
接入地图点云数据 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user