[chang]adas lib 移除透传障碍物接口

This commit is contained in:
xinfengkun
2022-05-18 18:08:18 +08:00
parent 04222e3bdf
commit 048630673f
12 changed files with 4 additions and 248 deletions

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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);
/**
* 透传的点云数据
*

View File

@@ -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, "自动驾驶设备基础信息请求"),

View File

@@ -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) {

View File

@@ -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);
}
}
}