Merge branch 'dev_robotaxi-d-app-module_255_220303_2.5.5' into dev_robotaxi-d-app-module_260_220304_2.6.0
This commit is contained in:
@@ -66,10 +66,10 @@ class MoGoAutopilotProvider :
|
||||
CallerMapDataCollectorManager.registerOnMapCollectTaskListener(this)
|
||||
// "192.168.1.102"
|
||||
val options = AdasOptions.Builder()
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.ASSIGN)
|
||||
.setIpcAssignIP(FunctionBuildConfig.adasConnectIP)
|
||||
.setClient(false)
|
||||
.build()
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.FIXATION)
|
||||
.setIpcFixationIP(AdasManager.getInstance().getIPCFixationIPList(mContext))
|
||||
.setClient(false)
|
||||
.build()
|
||||
|
||||
AdasManager.getInstance().create(context, options)
|
||||
NSDNettyManager.getInstance().startNSDNettyServerWithSN(context, object :
|
||||
@@ -102,11 +102,10 @@ class MoGoAutopilotProvider :
|
||||
//FunctionBuildConfig.isDemoMode = true
|
||||
//FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true
|
||||
// "192.168.1.103"
|
||||
val options = AdasOptions.Builder()
|
||||
.setIpcConnectionMode(AdasOptions.IPC_CONNECTION_MODE.ASSIGN)
|
||||
.setIpcAssignIP(FunctionBuildConfig.adasConnectIP)
|
||||
.setClient(true)
|
||||
.build()
|
||||
val options = AdasOptions
|
||||
.Builder()
|
||||
.setClient(true)
|
||||
.build()
|
||||
AdasManager.getInstance().create(context, options)
|
||||
NSDNettyManager.getInstance()
|
||||
.searchAndConnectServer(context, MoGoAiCloudClientConfig.getInstance().sn, object :
|
||||
@@ -142,10 +141,6 @@ class MoGoAutopilotProvider :
|
||||
// 司机端监听
|
||||
if (FunctionBuildConfig.appIdentityMode == 0) {
|
||||
AdasManager.getInstance().setOnMultiDeviceListener { bytes ->
|
||||
Logger.d(
|
||||
TAG,
|
||||
"司机端接收到工控机吐出来的数据为:${Arrays.toString(bytes)}"
|
||||
)
|
||||
// 发送数据给乘客端
|
||||
if (NSDNettyManager.getInstance().isServerStart) {
|
||||
Logger.d(
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.module.common.drawer.IdentifyDataDrawer;
|
||||
import com.zhidao.support.adas.high.bean.CarStateInfo;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -50,9 +51,11 @@ public class MoGoHandAdasMsgManager implements
|
||||
if (autoPilotCarStateInfo != null) {
|
||||
//can数据转发
|
||||
AutopilotCarStateInfo.ValuesBean bean = autoPilotCarStateInfo.getValues();
|
||||
|
||||
if (bean != null) {
|
||||
//转向灯状态 0是正常 1是左转 2是右转
|
||||
int turnLight = bean.getTurn_light();
|
||||
//turnLightOften 是sdk适配的字段,后期建议CarStateInfo和AutopilotCarStateInfo统一成一个
|
||||
int turnLight = bean.getTurnLightOften();
|
||||
AmiClientManager.getInstance().setTurnLightState(turnLight);
|
||||
int brakeLight = bean.getBrake_light();
|
||||
// Logger.d(TAG, "onCarStateData ---- turnLight = " + turnLight + "---brakeLight = " + brakeLight);
|
||||
|
||||
@@ -81,6 +81,22 @@ public class AutopilotCarStateInfo implements Serializable {
|
||||
private int brake_light; //刹车灯状态
|
||||
private int frame_num;//统计发包个数
|
||||
|
||||
/**
|
||||
* 常开 常关 转向灯
|
||||
* 0 --关
|
||||
* 1 --左转
|
||||
* 2 --右转
|
||||
*/
|
||||
private int turnLightOften = 0;
|
||||
|
||||
public int getTurnLightOften() {
|
||||
return turnLightOften;
|
||||
}
|
||||
|
||||
public void setTurnLightOften(int turnLightOften) {
|
||||
this.turnLightOften = turnLightOften;
|
||||
}
|
||||
|
||||
public int getFrame_num() {
|
||||
return frame_num;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ MOGO_LOCATION_VERSION=1.3.31
|
||||
MOGO_TELEMATIC_VERSION=1.3.31
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.0.5.1
|
||||
MAP_SDK_VERSION=2.0.5.3
|
||||
MAP_SDK_OPERATION_VERSION=1.0.12
|
||||
# websocket
|
||||
WEBSOCKET_VERSION=1.1.7
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.service.routeoverlay;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo;
|
||||
@@ -17,7 +18,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils;
|
||||
import com.mogo.module.common.utils.DrivingDirectionUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -45,7 +46,7 @@ public class MogoRouteOverlayManager implements
|
||||
public void init() {
|
||||
CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG,this);
|
||||
CallerMapLocationListenerManager.INSTANCE.addListener(TAG, this);
|
||||
// intiDrawer();
|
||||
}
|
||||
|
||||
@@ -60,7 +61,7 @@ public class MogoRouteOverlayManager implements
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
private void intiDrawer(){
|
||||
private void intiDrawer() {
|
||||
RouteOverlayDrawer.getInstance(mContext).initdraw();
|
||||
}
|
||||
|
||||
@@ -97,7 +98,7 @@ public class MogoRouteOverlayManager implements
|
||||
|
||||
mTrajectoryList = mogoLatLngs;
|
||||
builder.append("}");
|
||||
//Log.d(TAG,builder.toString());
|
||||
Log.d(TAG, builder.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -110,13 +111,13 @@ public class MogoRouteOverlayManager implements
|
||||
latLngList.add(new MogoLatLng(routeModel.getLat(), routeModel.getLon()));
|
||||
}
|
||||
int listSize = latLngList.size();
|
||||
mEnding = latLngList.get(listSize-1);
|
||||
mEnding = latLngList.get(listSize - 1);
|
||||
// RouteOverlayDrawer.getInstance(mContext).addEndingMarker(latLngList.get(listSize - 1).lat,latLngList.get(listSize - 1).lon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData ){
|
||||
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData) {
|
||||
return;
|
||||
}
|
||||
this.STATUS_AUTOPILOT = autoPilotStatusInfo.getControl_pilotmode();
|
||||
@@ -128,7 +129,7 @@ public class MogoRouteOverlayManager implements
|
||||
// }else {
|
||||
//
|
||||
// }我
|
||||
if ( STATUS_AUTOPILOT != 1){
|
||||
if (STATUS_AUTOPILOT != 1) {
|
||||
RouteOverlayDrawer.getInstance(mContext).clearEndingMarker();
|
||||
RouteOverlayDrawer.getInstance(mContext).clearMogoRouteOverlay();
|
||||
}
|
||||
@@ -137,7 +138,7 @@ public class MogoRouteOverlayManager implements
|
||||
@Override
|
||||
public void onAutopilotArriveAtStation(@Nullable AutopilotStationInfo autopilotWayArrive) {
|
||||
|
||||
if(autopilotWayArrive == null){
|
||||
if (autopilotWayArrive == null) {
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "onArriveAt data : " + autopilotWayArrive.toString());
|
||||
@@ -156,17 +157,44 @@ public class MogoRouteOverlayManager implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location) {
|
||||
public void onLocationChanged(@Nullable MogoLocation location) { //todo 拖尾
|
||||
// mLocation = location;
|
||||
// if (mTrajectoryList.isEmpty()) {
|
||||
// return;
|
||||
// }
|
||||
// Log.d(TAG, "onLocationChanged : " + mTrajectoryList.size());
|
||||
// ArrayList list = new ArrayList();
|
||||
// for (MogoLatLng latLng : mTrajectoryList) {
|
||||
// if (!isPointOnCarFront(mLocation, latLng)) {
|
||||
// list.add(latLng);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// StringBuilder builder = new StringBuilder();
|
||||
// for (int i = 0; i < list.size(); i++) {
|
||||
// MogoLatLng latLng = (MogoLatLng) list.get(i);
|
||||
// builder.append(latLng.getLon()).append(",");
|
||||
// builder.append(latLng.getLat()).append(",");
|
||||
// }
|
||||
// Log.d(TAG, "onLocationChanged : " + GsonUtils.toJson(builder.toString()));
|
||||
// Log.d(TAG,"onLocationChanged size = " + list.size() + "---TrajectoryData = " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + "----" + STATUS_AUTOPILOT);
|
||||
// if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData || STATUS_AUTOPILOT == 1) {
|
||||
// RouteOverlayDrawer.getInstance(mContext).drawTrajectoryList(list);
|
||||
// }
|
||||
|
||||
mLocation = location;
|
||||
if (mTrajectoryList.isEmpty()){
|
||||
List<MogoLatLng> temp = mTrajectoryList;
|
||||
if (temp.isEmpty()){
|
||||
return;
|
||||
}
|
||||
// Log.e(TAG, "onLocationChanged: size = "+ mTrajectoryList.size()+" ----- "+mLocation.getLongitude()+"-"+mLocation.getLatitude());
|
||||
ArrayList list = new ArrayList();
|
||||
for (MogoLatLng latLng:mTrajectoryList) {
|
||||
if(!isPointOnCarFront(mLocation,latLng)){
|
||||
for (MogoLatLng latLng:temp) {
|
||||
// if(!isPointOnCarFront(mLocation,latLng)){
|
||||
list.add(latLng);
|
||||
}
|
||||
// }
|
||||
}
|
||||
Log.d(TAG,"TrajectoryData = " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + "---status = " + STATUS_AUTOPILOT + "----size = " + list.size());
|
||||
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData || STATUS_AUTOPILOT == 1){
|
||||
RouteOverlayDrawer.getInstance(mContext).drawTrajectoryList(list);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public class RouteOverlayDrawer {
|
||||
long drawstart = System.currentTimeMillis();
|
||||
|
||||
mPolylinePointList.clear();
|
||||
if (routeList != null) {
|
||||
if (routeList != null && routeList.size() > 0) {
|
||||
for (MogoLatLng latLng : routeList) {
|
||||
mPolylinePointList.add(latLng);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user