Merge branch 'dev_robotaxi-d-app-module_270_220510_2.7.0_point' into dev_robotaxi-d-app-module_270_220510_2.7.0

# Conflicts:
#	core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
This commit is contained in:
donghongyu
2022-05-24 18:31:11 +08:00
9 changed files with 185 additions and 3 deletions

View File

@@ -3,7 +3,6 @@ package com.mogo.eagle.core.function.autopilot.adapter
import chassis.VehicleStateOuterClass
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HdMapBuildConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_ARRIVE
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_GUARDIAN
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_RECORD
@@ -33,10 +32,11 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListe
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager.invokeAutopilotCarStateData
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotWarnMessage
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotRotting
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager.invokeAutopilotTrajectory
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.zhidao.support.adas.high.AdasManager
@@ -241,6 +241,8 @@ class MoGoAdasListenerImpl : OnAdasListener {
override fun onPointCloud(header: MessagePad.Header?, pointCloud: PointCloud.LidarPointCloud?) {
//点云数据透传
//Logger.d("pointCloud","pointCloud"+pointCloud);
CallerAutopilotPointCloudListenerManager.invokeAutopilotPointCloudDataUpdate(header,pointCloud)
}
override fun onBasicInfoReq(

View File

@@ -550,6 +550,12 @@ class DebugSettingView @JvmOverloads constructor(
FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = isChecked
}
//TODO
tbIsDrawPath.setOnCheckedChangeListener { _, isChecked ->
}
// 初始化 GSP数据源 数据
rgGpsProvider.check(
when (FunctionBuildConfig.gpsProvider) {
@@ -603,6 +609,13 @@ class DebugSettingView @JvmOverloads constructor(
}
//初始化点云数据渲染情况
tbDrawPointCloudData.isChecked = FunctionBuildConfig.isDrawPointCloudData
//是否渲染点云数据
tbDrawPointCloudData.setOnCheckedChangeListener { _, isChecked ->
FunctionBuildConfig.isDrawPointCloudData = isChecked
}
// 模拟自动驾驶中
tbChangeAutoPilotStatus.setOnCheckedChangeListener { _, isChecked ->
CallerAutoPilotManager.setControlAutopilotCarAuto(isChecked)

View File

@@ -1480,6 +1480,21 @@
app:layout_constraintLeft_toLeftOf="@id/tbIsDrawAutopilotTrajectoryData"
app:layout_constraintRight_toRightOf="@id/tbIsDrawAutopilotTrajectoryData"/>
<ToggleButton
android:id="@+id/tbDrawPointCloudData"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:padding="@dimen/dp_10"
android:textColor="#000"
android:textOff="开启渲染点云数据"
android:textOn="关闭渲染点云数据"
android:textSize="@dimen/dp_24"
app:layout_constraintTop_toBottomOf="@id/tbIsDrawAutopilotTrajectoryData"
app:layout_constraintLeft_toRightOf="@id/tbChangeAutoPilotStatus"
app:layout_constraintRight_toRightOf="parent"
/>
<RadioGroup
android:id="@+id/rgGpsProvider"
android:layout_width="match_parent"

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,49 @@
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.CallerAutopilotPointCloudListenerManager
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?) {
// 根据配置动态控制点云是否绘制
if (FunctionBuildConfig.isDrawPointCloudData) {
val data = PointCloudDecoder.decode(header, pointCloud)
val result = PointCloudHelper.updatePointCloudData(data, false, true, true)
//Logger.d(TAG, "result=$result")
}
}
}