[change]移除点云解析回调
This commit is contained in:
@@ -847,15 +847,15 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onPointCloud(MessagePad.Header header, MogoPointCloudOuterClass.MogoPointCloud pointCloud) {
|
||||
MyPointCloud base = new MyPointCloud(header, pointCloud, sdf);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
// String data = PointCloudDecoder.decode(header, pointCloud);
|
||||
// Log.i("dddd", "data==" + data.length());
|
||||
// Log.i("dddd", "data==" + data);
|
||||
// LogSave.getInstance().saveLog("转换数据=" + data);
|
||||
}
|
||||
// @Override
|
||||
// public void onPointCloud(MessagePad.Header header, MogoPointCloudOuterClass.MogoPointCloud pointCloud) {
|
||||
// MyPointCloud base = new MyPointCloud(header, pointCloud, sdf);
|
||||
// DataDistribution.getInstance().addData(base);
|
||||
//// String data = PointCloudDecoder.decode(header, pointCloud);
|
||||
//// Log.i("dddd", "data==" + data.length());
|
||||
//// Log.i("dddd", "data==" + data);
|
||||
//// LogSave.getInstance().saveLog("转换数据=" + data);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onPointCloud(byte[] pointCloud) {
|
||||
|
||||
@@ -246,11 +246,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(header: MessagePad.Header?, pointCloud: MogoPointCloudOuterClass.MogoPointCloud?) {
|
||||
// //点云数据透传
|
||||
// //Logger.d("pointCloud","pointCloud"+pointCloud);
|
||||
// CallerAutopilotPointCloudListenerManager.invokeAutopilotPointCloudDataUpdate(header, pointCloud)
|
||||
// }
|
||||
|
||||
override fun onPointCloud(pointCloud: ByteArray?) {
|
||||
//点云数据透传
|
||||
|
||||
@@ -63,13 +63,11 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
private static final String TAG = AdasChannel.class.getSimpleName();
|
||||
private static final String THREAD_NAME_DISPATCH_EVENT = "IPCEventDispatchHandler";//除点云单独拆分线程以外都是用此名称
|
||||
private static final String THREAD_NAME_DISPATCH_POINT_CLOUD = "IPCPointCloudDispatchHandler";
|
||||
private static final String THREAD_NAME_DISPATCH_PARSE_POINT_CLOUD = "IPCParsePointCloudDispatchHandler";//解析点云线程 地图支持后将会删除
|
||||
private FpgaSocket mSocket;
|
||||
private RawUnpack rawUnpack;//业务数据拆包
|
||||
private RawPack rawPack;//数据打包
|
||||
private DispatchHandler dispatchHandler;//分发
|
||||
private DispatchHandler dispatchHandlerPointCloud;//原始的点云数据分发
|
||||
private DispatchHandler dispatchHandlerParsePointCloud;//解析过的点云数据分发 地图支持后将会删除
|
||||
private Timer checkCompatibilityTimer;//检查版本兼容性定时器 连接成功后5秒内等待工控机发送配置信息
|
||||
/**
|
||||
* 与工控机链接状态
|
||||
@@ -159,7 +157,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
//启用线程分发
|
||||
dispatchHandler = new DispatchHandler(THREAD_NAME_DISPATCH_EVENT, this);
|
||||
dispatchHandlerPointCloud = new DispatchHandler(THREAD_NAME_DISPATCH_POINT_CLOUD, this);
|
||||
dispatchHandlerParsePointCloud = new DispatchHandler(THREAD_NAME_DISPATCH_PARSE_POINT_CLOUD, this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -285,8 +282,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
if (dispatchHandlerPointCloud != null) {
|
||||
dispatchHandlerPointCloud.sendRawMessage(raw);
|
||||
}
|
||||
if (dispatchHandlerParsePointCloud != null)
|
||||
dispatchHandlerParsePointCloud.sendRawMessage(raw);
|
||||
} else {
|
||||
if (dispatchHandler != null)
|
||||
dispatchHandler.sendRawMessage(raw);
|
||||
@@ -511,9 +506,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
if (dispatchHandlerPointCloud != null) {
|
||||
dispatchHandlerPointCloud.start();
|
||||
}
|
||||
if (dispatchHandlerParsePointCloud != null) {
|
||||
dispatchHandlerParsePointCloud.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -524,9 +516,6 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
if (dispatchHandlerPointCloud != null) {
|
||||
dispatchHandlerPointCloud.stop();
|
||||
}
|
||||
if (dispatchHandlerParsePointCloud != null) {
|
||||
dispatchHandlerParsePointCloud.stop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,6 @@ import mogo_msg.MogoReportMsg;
|
||||
import perception.TrafficLightOuterClass;
|
||||
import prediction.Prediction;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
import rule_segement.MogoPointCloudOuterClass;
|
||||
import system_master.SystemStatusInfo;
|
||||
|
||||
/**
|
||||
@@ -89,14 +88,6 @@ public interface OnAdasListener {
|
||||
*/
|
||||
void onPredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects predictionObjects);
|
||||
|
||||
/**
|
||||
* 透传的点云数据
|
||||
*
|
||||
* @param header 头
|
||||
* @param pointCloud 数据
|
||||
*/
|
||||
void onPointCloud(MessagePad.Header header, MogoPointCloudOuterClass.MogoPointCloud pointCloud);
|
||||
|
||||
/**
|
||||
* 透传的点云数据
|
||||
*
|
||||
|
||||
@@ -19,7 +19,6 @@ public class MyMessageFactory implements IMyMessageFactory {
|
||||
private IMsg reportMessage;//监控事件报告
|
||||
private IMsg perceptionTrafficLightMessage;//感知红绿灯
|
||||
private IMsg predictionObstacleTrajectoryMessage;//他车轨迹预测
|
||||
private IMsg pointCloudMessage;//透传点云数据
|
||||
private IMsg planningObjectsMessage;//planning障碍物
|
||||
|
||||
private IMsg basicInfoReqMessage;//自动驾驶设备基础信息请求
|
||||
@@ -82,12 +81,6 @@ public class MyMessageFactory implements IMyMessageFactory {
|
||||
predictionObstacleTrajectoryMessage = new PredictionObstacleTrajectoryMessage();
|
||||
}
|
||||
return predictionObstacleTrajectoryMessage;
|
||||
} else if (messageType == MessageType.TYPE_RECEIVE_POINT_CLOUD.typeCode) {
|
||||
//点云透传
|
||||
if (pointCloudMessage == null) {
|
||||
pointCloudMessage = new PointCloudMessage();
|
||||
}
|
||||
return pointCloudMessage;
|
||||
} else if (messageType == MessageType.TYPE_RECEIVE_PLANNING_OBJECTS.typeCode) {
|
||||
//planning障碍物
|
||||
if (planningObjectsMessage == null) {
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
|
||||
import rule_segement.MogoPointCloudOuterClass;
|
||||
|
||||
/**
|
||||
* 透传点云数据
|
||||
*/
|
||||
public class PointCloudMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
MogoPointCloudOuterClass.MogoPointCloud pointCloud = MogoPointCloudOuterClass.MogoPointCloud.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
if (adasListener != null) {
|
||||
adasListener.onPointCloud(raw.getHeader(), pointCloud);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user