From da8152ed6c41cae607dfdb7ab9849d81aa75e88a Mon Sep 17 00:00:00 2001 From: liujing Date: Wed, 29 Jun 2022 18:23:39 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=8CChange=E3=80=8D=20=E6=8E=A5=E5=85=A5?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=82=B9=E4=BA=91=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../autopilot/adapter/MoGoAdasListenerImpl.kt | 2 +- .../core/function/map/MapPointCloudSubscriber.kt | 16 +++++++++------- .../IMoGoAutopilotPointCloudListener.kt | 4 +--- .../CallerAutopilotPointCloudListenerManager.kt | 8 ++------ gradle.properties | 10 +--------- .../src/main/proto/mogo_point_cloud.proto | 4 ++-- 6 files changed, 16 insertions(+), 28 deletions(-) diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt index 52a0570336..fcea36b9d2 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoAdasListenerImpl.kt @@ -249,11 +249,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障碍物 diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt index 92b4fa575b..60561f01d9 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPointCloudSubscriber.kt @@ -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") } } \ No newline at end of file diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt index 3d73c8a06b..6bddda52bf 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotPointCloudListener.kt @@ -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?) } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPointCloudListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPointCloudListenerManager.kt index e05b1fd725..60042117c5 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPointCloudListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotPointCloudListenerManager.kt @@ -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) } } diff --git a/gradle.properties b/gradle.properties index 19695fab89..4ecb7d978c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -82,15 +82,7 @@ MOGO_LOCATION_VERSION=1.4.3.6 MOGO_TELEMATIC_VERSION=1.4.3.6 ######## MogoAiCloudSDK Version ######## # 自研地图 -<<<<<<< HEAD -<<<<<<< HEAD -MAP_SDK_VERSION=2.2.1.1 -======= -MAP_SDK_VERSION=2.2.1 ->>>>>>> f0fcf57f0 (「Change」) -======= -MAP_SDK_VERSION=2.2.1.1 ->>>>>>> 1f51e79dd (「Change」) +MAP_SDK_VERSION=2.3.0.7 MAP_SDK_OPERATION_VERSION=1.0.13 # websocket WEBSOCKET_VERSION=1.1.7 diff --git a/libraries/mogo-adas-data/src/main/proto/mogo_point_cloud.proto b/libraries/mogo-adas-data/src/main/proto/mogo_point_cloud.proto index 4d2393d46d..7d5013e35d 100644 --- a/libraries/mogo-adas-data/src/main/proto/mogo_point_cloud.proto +++ b/libraries/mogo-adas-data/src/main/proto/mogo_point_cloud.proto @@ -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]; } \ No newline at end of file