Merge branch 'dev_robotaxi-d-app-module_280_220608_2.8.0' into dev_robotaxi-d-app-module_280_taxi_passenger
This commit is contained in:
@@ -63,14 +63,14 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.material
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
implementation "androidx.recyclerview:recyclerview:1.2.0"
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
implementation rootProject.ext.dependencies.gson
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation project(':libraries:mogo-adas-other')
|
||||
// implementation 'com.zhidao.support.adas:high:2.7.0.0'
|
||||
// implementation 'com.zhidao.support.adas:high:2.8.0.0'
|
||||
// implementation 'com.zhjt.mogo.adas.data:adas-data:2.6.6.0'
|
||||
compileOnly project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import java.util.*
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.function.Consumer
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -52,37 +53,36 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
|
||||
//todo reset color
|
||||
override fun renderPlanningWarningObj(planningObjects: List<MessagePad.PlanningObject>?) {
|
||||
// if (planningObjects == null) {
|
||||
// if (colorTrafficData.size == 0) {
|
||||
// return
|
||||
// }
|
||||
// colorTrafficData.forEach {
|
||||
// val cacheData = mMarkersCaches[it] //todo 是否要直接绘制 还是等下一帧
|
||||
// if (cacheData != null) {
|
||||
// mMarkersCaches[it] = cacheData.toBuilder().setColor("#D8D8D8FF").build()
|
||||
// }
|
||||
// }
|
||||
// colorTrafficData.clear()
|
||||
// return
|
||||
// }
|
||||
// val tempTrafficData = ArrayList<TrackedObject>()
|
||||
// planningObjects.forEach {
|
||||
// val trackId = it.uuid.toString()
|
||||
// val cacheData = mMarkersCaches[trackId]
|
||||
// if (cacheData != null) {
|
||||
// colorTrafficData.add(trackId)
|
||||
// when (it.type) {
|
||||
// 0 -> {
|
||||
// tempTrafficData.add(cacheData.toBuilder().setColor("#FF3C45FF").build())
|
||||
// }
|
||||
// 1 -> {
|
||||
// tempTrafficData.add(cacheData.toBuilder().setColor("#FFD53EFF").build())
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
// .updateBatchMarkerPosition(tempTrafficData)
|
||||
// }
|
||||
// todo test code 用于模拟感知物
|
||||
// val resultList: ArrayList<TrackedObject> = ArrayList()
|
||||
// val obj = TrackedObject.newBuilder().setUuid(67025).setLongitude(112.57413261072935).setLatitude(26.821571389153718).setHeading(329.9748205834151).setSpeed(0.0).setType(3).build()
|
||||
// resultList.add(obj)
|
||||
// renderAdasRecognizedResult(resultList)
|
||||
|
||||
if (planningObjects == null) {
|
||||
if (colorTrafficData.size == 0) {
|
||||
return
|
||||
}
|
||||
colorTrafficData.forEach {
|
||||
val cacheData = mMarkersCaches[it] //todo 是否要直接绘制 还是等下一帧
|
||||
if (cacheData != null) {
|
||||
mMarkersCaches[it] = cacheData.toBuilder().setColor("#D8D8D8FF").build()
|
||||
}
|
||||
}
|
||||
colorTrafficData.clear()
|
||||
return
|
||||
}
|
||||
val tempTrafficData = ArrayList<TrackedObject>()
|
||||
planningObjects.forEach {
|
||||
val trackId = it.uuid.toString()
|
||||
val cacheData = mMarkersCaches[trackId]
|
||||
if (cacheData != null) {
|
||||
colorTrafficData.add(trackId)
|
||||
tempTrafficData.add(cacheData.toBuilder().setColor("#FFD53EFF").build())
|
||||
}
|
||||
MogoMarkerManager.getInstance(AbsMogoApplication.getApp())
|
||||
.updateBatchMarkerPosition(tempTrafficData)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
@@ -130,6 +130,9 @@ public class ObjectUtils {
|
||||
markerOptions.setRotateAngle((float) trafficData.getHeading());
|
||||
markerOptions.setLat(trafficData.getLatitude());
|
||||
markerOptions.setLon(trafficData.getLongitude());
|
||||
if(trafficData.getColor()!=null && !trafficData.getColor().isEmpty()){
|
||||
markerOptions.setColor(trafficData.getColor());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -376,9 +376,9 @@ public class RouteOverlayDrawer {
|
||||
isExcept = true;
|
||||
}
|
||||
long drawEnd = SystemClock.elapsedRealtime();
|
||||
Log.d("Route", "draw cost:" + (drawEnd - drawStart) + "ms and isExcept:" + isExcept + "::removeCount:" + removeCount + "::total:" + total);
|
||||
// Log.d("Route", "draw cost:" + (drawEnd - drawStart) + "ms and isExcept:" + isExcept + "::removeCount:" + removeCount + "::total:" + total);
|
||||
} catch (Throwable t) {
|
||||
Log.d("Route","error:" + Log.getStackTraceString(t));
|
||||
// Log.d("Route","error:" + Log.getStackTraceString(t));
|
||||
} finally {
|
||||
try {
|
||||
if (isExcept) {
|
||||
@@ -394,7 +394,7 @@ public class RouteOverlayDrawer {
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
Log.d("Route", "error2:" + Log.getStackTraceString(t));
|
||||
// Log.d("Route", "error2:" + Log.getStackTraceString(t));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -431,10 +431,10 @@ public class RouteOverlayDrawer {
|
||||
// 计算车辆与点之间的夹角
|
||||
long diffAngle = DrivingDirectionUtils.getDegreeOfCar2Poi2(
|
||||
car_lon, car_lat, lon, lat, car_head);
|
||||
Log.d("Route", "isPointOnCarFront: angle->" + diffAngle);
|
||||
// Log.d("Route", "isPointOnCarFront: angle->" + diffAngle);
|
||||
return diffAngle;
|
||||
} finally {
|
||||
Log.d("Route", "isPointOnCarFront cost:" + (SystemClock.elapsedRealtime() - start) + "ms");
|
||||
// Log.d("Route", "isPointOnCarFront cost:" + (SystemClock.elapsedRealtime() - start) + "ms");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user