[Change]
1、升级高精地图打开点云 2、增加点云日志输出 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -249,6 +249,7 @@ 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?) {
|
||||
|
||||
@@ -3,9 +3,13 @@ package com.mogo.eagle.core.function.map
|
||||
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.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
|
||||
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
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
* 订阅点云数据
|
||||
@@ -56,9 +60,9 @@ class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAuto
|
||||
* @param isStrong 是否加粗显示
|
||||
* @return 是否执行
|
||||
*/
|
||||
Logger.d(TAG, "====开始传入地图点云数据====")
|
||||
//Logger.d(TAG, "====开始传入地图点云数据====")
|
||||
val result = PointCloudHelper.updatePointCloudDataByPb(pointCloud, false, true, true)
|
||||
Logger.d(TAG, "====结束传入地图点云数据=====$result")
|
||||
//Logger.d(TAG, "====结束传入地图点云数据=====$result")
|
||||
} else {
|
||||
if (isDrawPointCloud) {
|
||||
Logger.d(TAG, "====停止点云绘制====")
|
||||
@@ -67,4 +71,16 @@ class MapPointCloudSubscriber private constructor() : IMoGoSubscriber, IMoGoAuto
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?) {
|
||||
// Logger.d(TAG, "数据对比:"
|
||||
// + "\n自车定位:自车的 satelliteTime==${getPrettyNumber(CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().satelliteTime.toString())} 经纬度:${CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().locationLat},${CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().locationLon}"
|
||||
// + "\n点云数据:点云的 header?.timestamp==${getPrettyNumber(header?.timestamp.toString())} 经纬度:${pointCloud?.selfLatitude},${pointCloud?.selfLongitude} 点云数量:addDataCount==${pointCloud?.addDataCount} delDataCount===${pointCloud?.delDataCount} "
|
||||
// )
|
||||
}
|
||||
|
||||
fun getPrettyNumber(number: String): String {
|
||||
return BigDecimal.valueOf(number.toDouble())
|
||||
.stripTrailingZeros().toPlainString()
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ object FunctionBuildConfig {
|
||||
*/
|
||||
@Volatile
|
||||
@JvmField
|
||||
var isDrawPointCloudData = false
|
||||
var isDrawPointCloudData = true
|
||||
|
||||
/**
|
||||
* 地图是否忽略判断条件直接绘制工控机引导线数据&全局路径规划
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import rule_segement.MogoPointCloudOuterClass
|
||||
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -15,4 +18,9 @@ interface IMoGoAutopilotPointCloudListener {
|
||||
*/
|
||||
fun onAutopilotPointCloudDataUpdate(pointCloud: ByteArray?)
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
fun onAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?)
|
||||
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.mogo.eagle.core.function.call.autopilot
|
||||
import androidx.annotation.Nullable
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPointCloudListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import rule_segement.MogoPointCloudOuterClass
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
/**
|
||||
@@ -13,11 +15,11 @@ import java.util.concurrent.ConcurrentHashMap
|
||||
object CallerAutopilotPointCloudListenerManager : CallerBase() {
|
||||
|
||||
// 存储所有注册了监听的对象,invokeXXXX进行遍历回调,将信息同步
|
||||
private val M_AUTOPILOT_IDENTIFY_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotPointCloudListener> =
|
||||
private val M_POINT_CLOUD_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotPointCloudListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
/**
|
||||
* 添加 域控制器感知数据 监听
|
||||
* 添加 点云数据 监听
|
||||
* @param tag 标记,用来注销监听使用
|
||||
* @param listener 监听回调
|
||||
*/
|
||||
@@ -25,10 +27,10 @@ object CallerAutopilotPointCloudListenerManager : CallerBase() {
|
||||
@Nullable tag: String,
|
||||
@Nullable listener: IMoGoAutopilotPointCloudListener
|
||||
) {
|
||||
if (M_AUTOPILOT_IDENTIFY_LISTENERS.containsKey(tag)) {
|
||||
if (M_POINT_CLOUD_LISTENERS.containsKey(tag)) {
|
||||
return
|
||||
}
|
||||
M_AUTOPILOT_IDENTIFY_LISTENERS[tag] = listener
|
||||
M_POINT_CLOUD_LISTENERS[tag] = listener
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,34 +38,46 @@ object CallerAutopilotPointCloudListenerManager : CallerBase() {
|
||||
* @param tag 标记,用来注销监听使用
|
||||
*/
|
||||
fun removeListener(@Nullable tag: String) {
|
||||
if (!M_AUTOPILOT_IDENTIFY_LISTENERS.containsKey(tag)) {
|
||||
if (!M_POINT_CLOUD_LISTENERS.containsKey(tag)) {
|
||||
return
|
||||
}
|
||||
M_AUTOPILOT_IDENTIFY_LISTENERS.remove(tag)
|
||||
M_POINT_CLOUD_LISTENERS.remove(tag)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除自动驾驶按钮选中监听
|
||||
* 删除 点云数据 监听
|
||||
* @param listener 要删除的监听对象
|
||||
*/
|
||||
fun removeListener(@Nullable listener: IMoGoAutopilotPointCloudListener) {
|
||||
M_AUTOPILOT_IDENTIFY_LISTENERS.forEach {
|
||||
M_POINT_CLOUD_LISTENERS.forEach {
|
||||
if (it.value == listener) {
|
||||
M_AUTOPILOT_IDENTIFY_LISTENERS.remove(it.key)
|
||||
M_POINT_CLOUD_LISTENERS.remove(it.key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 识别交通元素数据发生更新 回调
|
||||
* 点云数据 回调
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotPointCloudDataUpdate(pointCloud: ByteArray?) {
|
||||
M_AUTOPILOT_IDENTIFY_LISTENERS.forEach {
|
||||
M_POINT_CLOUD_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
listener.onAutopilotPointCloudDataUpdate(pointCloud)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 点云数据 回调
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotPointCloudDataUpdate(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?) {
|
||||
M_POINT_CLOUD_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
listener.onAutopilotPointCloudDataUpdate(header, pointCloud)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.4.3.7
|
||||
MOGO_TELEMATIC_VERSION=1.4.3.7
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.3.0.10
|
||||
MAP_SDK_VERSION=2.3.0.11
|
||||
MAP_SDK_OPERATION_VERSION=1.0.13
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
|
||||
@@ -988,6 +988,7 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
bean.setLon(gnssInfo.getLongitude());
|
||||
bean.setLat(gnssInfo.getLatitude());
|
||||
bean.setGnss_speed(((float) gnssInfo.getGnssSpeed()));
|
||||
bean.setReceiverDataTime(System.currentTimeMillis());
|
||||
// 使用外部定位数据修改自车位置
|
||||
mMapView.getLocationClient().updateRTKAutoPilotLocation(bean);
|
||||
CallerMapUIServiceManager.INSTANCE.getSingletonLocationClient(getContext()).updateLocation(bean);
|
||||
|
||||
Reference in New Issue
Block a user