「Change」

点云高精地图集成

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-05-23 12:49:09 +08:00
parent 7a0f877a5c
commit 5f160b0688
6 changed files with 147 additions and 3 deletions

View File

@@ -172,6 +172,7 @@ public class MapFragment extends MvpFragment<MapView, MapPresenter>
// TODO 临时初始化地图监听工控机、OBU等数据监听器用于感知元素绘制
MapIdentifySubscriber.Companion.getInstance();
MapPointCloudSubscriber.Companion.getInstance();
}
@Override

View File

@@ -0,0 +1,48 @@
package com.mogo.eagle.core.function.map
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.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.zhidao.support.adas.high.common.PointCloudDecoder
import com.zhidaoauto.map.sdk.open.business.PointCloudHelper
import mogo.telematics.pad.MessagePad
import rule_segement.PointCloud
/**
* 订阅点云数据
* 数据来源工控机、OBU、云端下发
*
* @author donghongyu
*/
class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAutopilotPointCloudListener {
private val TAG = "MapPointCloudSubscriber"
init {
onCrate()
}
companion object {
val instance: MapPointCloudSubscriber by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
MapPointCloudSubscriber()
}
}
override fun onCrate() {
CallerAutopilotPointCloudListenerManager.addListener(TAG, this)
}
override fun onDestroy() {
CallerAutopilotPointCloudListenerManager.removeListener(TAG)
}
override fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: PointCloud.LidarPointCloud?) {
val data = PointCloudDecoder.decode(header, pointCloud)
val result = PointCloudHelper.updatePointCloudData(data, false, true, true)
//Logger.d(TAG, "result=$result")
}
}