[chang]adas lib 移除透传障碍物接口
This commit is contained in:
@@ -10,7 +10,6 @@ import com.zhidao.adas.client.bean.GlobalPathResp;
|
||||
import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.MyPointCloud;
|
||||
import com.zhidao.adas.client.bean.PerceptionObstacles;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PredictionObstacleTrajectory;
|
||||
import com.zhidao.adas.client.bean.RecordPanel;
|
||||
@@ -103,7 +102,6 @@ public class DataDistribution {
|
||||
public final List<String> listMogoReportMessage = new ArrayList<>();
|
||||
public final List<String> listPerceptionTrafficLight = new ArrayList<>();
|
||||
public final List<String> listPredictionObstacleTrajectory = new ArrayList<>();
|
||||
public final List<String> listPerceptionObstacles = new ArrayList<>();
|
||||
public final List<String> listBasicInfoReq = new ArrayList<>();
|
||||
public final List<String> listRecordPanel = new ArrayList<>();
|
||||
public final List<String> listGlobalPathResp = new ArrayList<>();
|
||||
@@ -238,19 +236,6 @@ public class DataDistribution {
|
||||
// for (OnAdasClientListener listener : listeners) {
|
||||
// listener.onRefresh();
|
||||
// }
|
||||
// }
|
||||
} else if (data instanceof PerceptionObstacles) {
|
||||
listPerceptionObstacles.add(0, time + str);
|
||||
if (listPerceptionObstacles.size() > LIST_SIZE) {
|
||||
listPerceptionObstacles.remove(listPerceptionObstacles.size() - 1);
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onRefresh();
|
||||
}
|
||||
// if (!listeners.isEmpty()) {
|
||||
// for (OnAdasClientListener listener : listeners) {
|
||||
// listener.onRefresh();
|
||||
// }
|
||||
// }
|
||||
} else if (data instanceof BasicInfoReq) {
|
||||
listBasicInfoReq.add(0, time + str);
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.zhidao.adas.client.bean;
|
||||
|
||||
import com.google.protobuf.TextFormat;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import perception.ObjectOuterClass;
|
||||
import prediction.Prediction;
|
||||
|
||||
public class PerceptionObstacles extends BaseInfo {
|
||||
public final ObjectOuterClass.TrackedObjects bean;
|
||||
|
||||
public PerceptionObstacles(MessagePad.Header header, ObjectOuterClass.TrackedObjects bean) {
|
||||
super("接收", bean.getSerializedSize(), header);
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + TextFormat.printer().escapingNonAscii(false).printToString(bean);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -139,9 +139,6 @@ public class InfoFragment extends BaseFragment {
|
||||
case Constants.TITLE.RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY:
|
||||
adapter.setData(DataDistribution.getInstance().listPredictionObstacleTrajectory);
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_PERCEPTION_OBSTACLES:
|
||||
adapter.setData(DataDistribution.getInstance().listPerceptionObstacles);
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_POINT_CLOUD:
|
||||
adapter.setData(DataDistribution.getInstance().listPointCloud);
|
||||
break;
|
||||
|
||||
@@ -60,7 +60,6 @@ import com.zhidao.adas.client.bean.GnssInfo;
|
||||
import com.zhidao.adas.client.bean.IPCConnectState;
|
||||
import com.zhidao.adas.client.bean.MogoReportMessage;
|
||||
import com.zhidao.adas.client.bean.MyPointCloud;
|
||||
import com.zhidao.adas.client.bean.PerceptionObstacles;
|
||||
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
||||
import com.zhidao.adas.client.bean.PredictionObstacleTrajectory;
|
||||
import com.zhidao.adas.client.bean.RecordPanel;
|
||||
@@ -78,7 +77,6 @@ import com.zhidao.support.adas.high.OnMultiDeviceListener;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.PointCloudDecoder;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
|
||||
@@ -95,7 +93,6 @@ import chassis.VehicleStateOuterClass;
|
||||
import io.netty.channel.Channel;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import perception.ObjectOuterClass;
|
||||
import perception.TrafficLightOuterClass;
|
||||
import prediction.Prediction;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
@@ -148,7 +145,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
private InfoFragment reportMessageFragment;
|
||||
private InfoFragment perceptionTrafficLightFragment;
|
||||
private InfoFragment predictionObstacleTrajectoryFragment;
|
||||
private InfoFragment perceptionObstaclesFragment;
|
||||
private InfoFragment pointCloudFragment;
|
||||
private VersionFragment versionFragment;
|
||||
private FragmentManager manager;
|
||||
@@ -527,7 +523,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_GNSS_INFO);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_TRAJECTORY);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_TRACKED_OBJECTS);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_PERCEPTION_OBSTACLES);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_POINT_CLOUD);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_VEHICLE_STATE);
|
||||
titleFragmentData.add(Constants.TITLE.RECEIVE_AUTOPILOT_STATE);
|
||||
@@ -703,16 +698,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
transaction.commit();
|
||||
}
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_PERCEPTION_OBSTACLES:
|
||||
showToastCenter("此接口目前弃用");
|
||||
// hintTrackedObjects(true);
|
||||
if (perceptionObstaclesFragment == null)
|
||||
perceptionObstaclesFragment = new InfoFragment(data);
|
||||
if (!perceptionObstaclesFragment.isVisible()) {
|
||||
transaction.replace(R.id.fl_info, perceptionObstaclesFragment);
|
||||
transaction.commit();
|
||||
}
|
||||
break;
|
||||
case Constants.TITLE.RECEIVE_POINT_CLOUD:
|
||||
if (pointCloudFragment == null)
|
||||
pointCloudFragment = new InfoFragment(data);
|
||||
@@ -882,11 +867,6 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTrackedObjects(MessagePad.Header header, ObjectOuterClass.TrackedObjects trackedObjects) {
|
||||
PerceptionObstacles base = new PerceptionObstacles(header, trackedObjects);
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPointCloud(MessagePad.Header header, PointCloud.LidarPointCloud pointCloud) {
|
||||
|
||||
@@ -151,7 +151,6 @@ public class Constants {
|
||||
String RECEIVE_REPORT_MESSAGE = "监控事件";
|
||||
String RECEIVE_PERCEPTION_TRAFFIC_LIGHT = "感知红绿灯";
|
||||
String RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY = "他车轨迹预测";
|
||||
String RECEIVE_PERCEPTION_OBSTACLES = "透传障碍物";
|
||||
String RECEIVE_POINT_CLOUD = "点云透传";
|
||||
|
||||
// String RECEIVE_BASIC_INFO_REQ = "自动驾驶设备基础信息请求";
|
||||
|
||||
@@ -47,7 +47,6 @@ import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
import mogo_msg.MogoReportMsg
|
||||
import perception.ObjectOuterClass
|
||||
import perception.TrafficLightOuterClass
|
||||
import prediction.Prediction
|
||||
import record_cache.RecordPanelOuterClass
|
||||
@@ -101,18 +100,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 透传的融合障碍物 他车数据
|
||||
* 当 MessagePad.CarConfigResp.getProtocolVersionValue() >=3 时此回调有数据,老接口“MessagePad.TrackedObjects”不会回调任何数据
|
||||
*
|
||||
* @param header 头
|
||||
* @param trackedObjects 数据
|
||||
*/
|
||||
override fun onTrackedObjects(
|
||||
header: MessagePad.Header?,
|
||||
trackedObjects: ObjectOuterClass.TrackedObjects?
|
||||
) {
|
||||
}
|
||||
|
||||
//自车定位信息
|
||||
@ChainLog(
|
||||
@@ -238,7 +225,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
header: MessagePad.Header?,
|
||||
trafficLights: TrafficLightOuterClass.TrafficLights?
|
||||
) {
|
||||
if(trafficLights != null){
|
||||
if (trafficLights != null) {
|
||||
CallerAutopilotIdentifyListenerManager.invokeAutopilotPerceptionTrafficLight(
|
||||
trafficLights
|
||||
)
|
||||
@@ -269,7 +256,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
linkCode = CHAIN_LINK_ADAS,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_CONFIG,
|
||||
paramIndexes = [0,1],
|
||||
paramIndexes = [0, 1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onCarConfigResp(
|
||||
|
||||
@@ -3,7 +3,7 @@ package mogo.telematics.pad;
|
||||
|
||||
enum ProtocolVersion{
|
||||
Defaultver = 0;
|
||||
CurrentVersion = 4; //每次修改proto文件增加1
|
||||
CurrentVersion = 3; //每次修改proto文件增加1
|
||||
}
|
||||
|
||||
enum MessageType
|
||||
@@ -18,8 +18,7 @@ enum MessageType
|
||||
MsgTypeReportMessage = 0x10005; //监控事件报告
|
||||
MsgTypePerceptionTrafficLight = 0x10006; //感知红绿灯
|
||||
MsgTypePredictionObstacleTrajectory = 0x10007; //他车轨迹预测
|
||||
MsgTypePerceptionObstacles = 0x10008; //透传的融合障碍物
|
||||
MsgTypePointCloud = 0x10009; //点云透传
|
||||
MsgTypePointCloud = 0x10008; //点云透传
|
||||
|
||||
MsgTypeBasicInfoReq = 0x10100; //自动驾驶设备基础信息请求
|
||||
MsgTypeBasicInfoResp = 0x10101; //自动驾驶设备基础信息应答
|
||||
@@ -131,9 +130,6 @@ message AutopilotState
|
||||
// message definition for MessageType: MsgTypePredictionObstacleTrajectory
|
||||
// refer to prediction.proto
|
||||
|
||||
// message definition for MessageType: MsgTypePerceptionObstacles
|
||||
// refer to TrackedObjects in object.proto
|
||||
|
||||
// message definition for MessageType: MsgTypePointCloud
|
||||
// refer to point_cloud.proto
|
||||
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
syntax = "proto2";
|
||||
package perception;
|
||||
|
||||
import "header.proto";
|
||||
import "geometry.proto";
|
||||
|
||||
enum ObjectType {
|
||||
TYPE_UNKNOWN = 0;
|
||||
TYPE_PEDESTRIAN = 3;
|
||||
TYPE_BICYCLE = 4;
|
||||
TYPE_MOTOR = 5;
|
||||
TYPE_RIDER = 6;
|
||||
TYPE_CAR = 7;
|
||||
TYPE_TRUCK = 8;
|
||||
TYPE_BUS = 9;
|
||||
TYPE_TRAIN = 10;
|
||||
TYPE_SIGN = 20;
|
||||
TYPE_LIGHT = 30;
|
||||
TYPE_RED = 31;
|
||||
TYPE_GREEN = 32;
|
||||
TYPE_YELLOW = 33;
|
||||
TYPE_BLACK = 34;
|
||||
TYPE_TRIANGLEROADBLOCK = 35;
|
||||
TYPE_WARNINGTRIANGLE = 36;
|
||||
TYPE_UNKNOWN_SMALL = 91;
|
||||
TYPE_UNKNOWN_BIG = 92;
|
||||
TYPE_UNKNOWN_STATIC = 93;
|
||||
TYPE_UNKNOWN_DYNAMIC = 94;
|
||||
}
|
||||
|
||||
message BBox2D {
|
||||
optional double xmin = 1 [default = nan]; // in pixel.
|
||||
optional double ymin = 2 [default = nan];
|
||||
optional double xmax = 3 [default = nan];
|
||||
optional double ymax = 4 [default = nan];
|
||||
}
|
||||
|
||||
message CameraObjectSupplement {
|
||||
optional bool on_use = 1 [default = false];
|
||||
optional BBox2D box = 2;
|
||||
optional int32 cols = 3;
|
||||
optional int32 rows = 4;
|
||||
}
|
||||
|
||||
message LidarObjectSupplement {
|
||||
optional bool on_use = 1 [default = false];
|
||||
// Format: [x0, y0, z0, x1, y1, z1...]
|
||||
repeated double cloud = 2 [packed = true];
|
||||
}
|
||||
|
||||
message RadarObjectSupplement {
|
||||
optional bool on_use = 1 [default = false];
|
||||
optional float x = 2;
|
||||
optional float y = 3;
|
||||
optional float relative_vel_x = 4;
|
||||
optional float relative_vel_y = 5;
|
||||
optional float absolute_vel_x = 6;
|
||||
optional float absolute_vel_y = 7;
|
||||
}
|
||||
|
||||
message Object {
|
||||
optional uint32 id = 1; // obj id, after tracked
|
||||
optional string sensor_name = 2;
|
||||
|
||||
optional ObjectType type = 3; // obj category
|
||||
|
||||
optional double time_stamp = 4; // sensing time
|
||||
optional float confidence = 5; // probability
|
||||
optional int32 status = 6; // reserved
|
||||
|
||||
optional float x_distance = 7; // longitudinal distance
|
||||
optional float y_distance = 8; // lateral distance
|
||||
optional float angle = 9; // obj angle relative to host vehicle
|
||||
|
||||
optional geometry.Point center = 10; // x,y,z in meter
|
||||
optional geometry.Point centroid = 11;
|
||||
optional geometry.Vector3 size = 12; // length width height(in meter)
|
||||
repeated geometry.Point contour = 13; // contour points
|
||||
|
||||
optional geometry.Vector3 velocity = 14; // sharing with visual/tracked obj
|
||||
optional geometry.Vector3 acceleration = 15;
|
||||
|
||||
optional double tracking_time = 16;
|
||||
|
||||
// camera supplement
|
||||
optional CameraObjectSupplement camera_supplement = 17;
|
||||
// lidar supplement
|
||||
optional LidarObjectSupplement lidar_supplement = 18;
|
||||
// radar supplement
|
||||
optional RadarObjectSupplement radar_supplement = 19;
|
||||
//lidar polygon
|
||||
repeated geometry.Point polygon = 20; // polygon points
|
||||
}
|
||||
|
||||
message TrackedObject {
|
||||
optional Object obj = 1;
|
||||
|
||||
optional float yaw = 2; //box orientation angle from x axis, counter clockwise(in rad),range 0 to 2*pi
|
||||
optional float yaw_rate = 3; //in rad/s
|
||||
optional geometry.Vector3 velocity = 4; // absolute velocity, in m/s, vx, vy, vz
|
||||
repeated geometry.Trace trace = 5; // historical positions
|
||||
repeated geometry.Trace prediction = 6; // predicted global position in future stamp
|
||||
|
||||
optional float absolute_longitude_v = 7; // along lane speed, m/s
|
||||
optional float absolute_longitude_a = 8; // in m/s2, longitudinal acc
|
||||
optional float absolute_lateral_v = 9; // vertical to lane speed, left positive, m/s
|
||||
|
||||
optional double longitude = 10; // longitude , in degrees
|
||||
optional double latitude = 11; // latitude , in degrees
|
||||
optional double alt = 12; // height above mean sea level in meters
|
||||
|
||||
optional double longitude_p = 13; // position in East , in meters
|
||||
optional double latitude_p = 14; // position in North , in meters
|
||||
|
||||
optional double speed = 15; //absolute speed
|
||||
|
||||
//float x_speed // longitudinal speed relative to host vehicle, m/s
|
||||
//float y_speed // lateral speed relative to host vehicle, m/s
|
||||
}
|
||||
|
||||
message TrackedObjects {
|
||||
optional common.Header header = 1;
|
||||
optional string sensor_name = 2;
|
||||
repeated TrackedObject objs = 3;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo_msg.MogoReportMsg;
|
||||
import perception.ObjectOuterClass;
|
||||
import perception.TrafficLightOuterClass;
|
||||
import prediction.Prediction;
|
||||
import record_cache.RecordPanelOuterClass;
|
||||
@@ -89,15 +88,6 @@ public interface OnAdasListener {
|
||||
*/
|
||||
void onPredictionObstacleTrajectory(MessagePad.Header header, Prediction.mPredictionObjects predictionObjects);
|
||||
|
||||
/**
|
||||
* 透传的融合障碍物 他车数据
|
||||
* 当 MessagePad.CarConfigResp.getProtocolVersionValue() >=3 时此回调有数据,老接口“MessagePad.TrackedObjects”不会回调任何数据
|
||||
*
|
||||
* @param header 头
|
||||
* @param trackedObjects 数据
|
||||
*/
|
||||
void onTrackedObjects(MessagePad.Header header, ObjectOuterClass.TrackedObjects trackedObjects);
|
||||
|
||||
/**
|
||||
* 透传的点云数据
|
||||
*
|
||||
|
||||
@@ -20,7 +20,6 @@ public enum MessageType {
|
||||
TYPE_RECEIVE_REPORT_MESSAGE(MessagePad.MessageType.MsgTypeReportMessage, "监控事件报告"),
|
||||
TYPE_RECEIVE_PERCEPTION_TRAFFIC_LIGHT(MessagePad.MessageType.MsgTypePerceptionTrafficLight, "感知红绿灯"),
|
||||
TYPE_RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY(MessagePad.MessageType.MsgTypePredictionObstacleTrajectory, "他车轨迹预测"),
|
||||
TYPE_RECEIVE_PERCEPTION_OBSTACLES(MessagePad.MessageType.MsgTypePerceptionObstacles, "透传的融合障碍物"),
|
||||
TYPE_RECEIVE_POINT_CLOUD(MessagePad.MessageType.MsgTypePointCloud, "点云透传"),
|
||||
|
||||
TYPE_RECEIVE_BASIC_INFO_REQ(MessagePad.MessageType.MsgTypeBasicInfoReq, "自动驾驶设备基础信息请求"),
|
||||
|
||||
@@ -19,7 +19,6 @@ public class MyMessageFactory implements IMyMessageFactory {
|
||||
private IMsg reportMessage;//监控事件报告
|
||||
private IMsg perceptionTrafficLightMessage;//感知红绿灯
|
||||
private IMsg predictionObstacleTrajectoryMessage;//他车轨迹预测
|
||||
private IMsg perceptionObstaclesMessage;//透传的融合障碍物
|
||||
private IMsg pointCloudMessage;//透传点云数据
|
||||
|
||||
private IMsg basicInfoReqMessage;//自动驾驶设备基础信息请求
|
||||
@@ -80,12 +79,6 @@ public class MyMessageFactory implements IMyMessageFactory {
|
||||
predictionObstacleTrajectoryMessage = new PredictionObstacleTrajectoryMessage();
|
||||
}
|
||||
return predictionObstacleTrajectoryMessage;
|
||||
} else if (messageType == MessageType.TYPE_RECEIVE_PERCEPTION_OBSTACLES.typeCode) {
|
||||
//他车轨迹预测
|
||||
if (perceptionObstaclesMessage == null) {
|
||||
perceptionObstaclesMessage = new PerceptionObstaclesMessage();
|
||||
}
|
||||
return perceptionObstaclesMessage;
|
||||
} else if (messageType == MessageType.TYPE_RECEIVE_POINT_CLOUD.typeCode) {
|
||||
//他车轨迹预测
|
||||
if (pointCloudMessage == null) {
|
||||
|
||||
@@ -1,21 +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 perception.ObjectOuterClass;
|
||||
|
||||
/**
|
||||
* 透传的融合障碍物 ProtocolVersion >=3 版本生效
|
||||
*/
|
||||
public class PerceptionObstaclesMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
ObjectOuterClass.TrackedObjects trackedObjects = ObjectOuterClass.TrackedObjects.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
if (adasListener != null) {
|
||||
adasListener.onTrackedObjects(raw.getHeader(), trackedObjects);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user