Skip to content

Commit

Permalink
分离base
Browse files Browse the repository at this point in the history
  • Loading branch information
171930433 committed Mar 15, 2024
1 parent 1450a57 commit e6ae53f
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 66 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ set(struct_pb_plugin_DIRS ${CMAKE_CURRENT_LIST_DIR}/src/protoc-plugin) # struct
set(Protobuf_IMPORT_DIRS ${struct_pb_plugin_DIRS} ) # 设置protoc --proto_path参数


add_subdirectory(src/protoc-plugin)
add_subdirectory(src/example)
# add_subdirectory(src/protoc-plugin)
add_subdirectory(src/example)
2 changes: 1 addition & 1 deletion src/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protobuf_generate_python(PROTO_PYTHON_SRCS

# 删除点云,图片proto记录文件
list(FILTER PROTO_FILES EXCLUDE REGEX "pointcloud\\.proto$|image\\.proto$")
message(status "-------${PROTO_FILES}-------")
# message(status "-------${PROTO_FILES}-------")


protobuf_generate_struct_pb(PROTO_STRUCT_SRCS PROTO_STRUCT_HDRS
Expand Down
59 changes: 0 additions & 59 deletions src/example/base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,6 @@ import "proto_to_struct.proto";

option(write_eigen_helper) = true;

enum ZFrameType{
None = 0;
VEHICLE_MODEL = 1; // 车辆运动约束虚拟帧
// 虚拟帧
IMU = 5; // IMU
CHASSIS_INFO = 6; // 车轮里程计
GNSS_POS = 7; // GNSS 观测值
GNSS_VEL = 8; // GNSS 观测值
GNSS_ALL = 9; // GNSS 观测值[vel pos dual_antenna]
//
CGI610 = 10;
Cpt7 = 11;
STATE = 15;
//
TRAJECTORY = 16;
ODOMETRY = 17;
//
PERCEPTION = 20;
SEMANTIC_MAP = 21;
LINESEGMENT = 25;
POLE = 26;
SIGN = 27;
SEMANTIC_MATCH = 40;
ZSemanticMatchDebugInfo = 41;
// LIDAR
PointCloud = 50;
LIDAR_MATCH = 51; // 激光匹配结果
PointCloudMapFileInfo = 52; // 地图文件信息
LIDAR_FRAME_MATCH = 55; // 激光匹配结果
LIDAR_MAP_MATCH = 56; // 激光匹配结果
// zloc_view
Zloc_Map_Msg = 60; // zloc_view 显示zlocmap_msg地图使用
Zmap_Map_Msg = 61; // zloc_view 显示zmap_msg地图使用
Localization_Msg = 62; // zloc_view 显示 localization/pose地图使用
CompressImage = 63; // zloc_view 显示图像使用
PerceptionLane = 64; // zloc_view 显示感知车道线使用
OrdinaryImage = 65; // zloc_view 显示图像使用
SourceCompressed_ColorImage = 66; // 用于建图的原始压缩彩色图像
SourceColorImage = 67; // 用于建图的原始彩色图像
SourceCompressed_GreyImage = 68; // 用于建图的原始压缩灰色图像
SourceGreyImage = 69; // 用于建图的原始灰色图像
PointCloud_LOCALMAP = 70; // 局部点云地图
PointCloud_GLOBALMAP = 71; // 全局点云地图
PointCloud_INIMAGE = 72; // 投影到图像上的点云
ODOMETRY_DELTA = 73; // 里程计增量信息
CvImage = 74; // 解码后的opencv图像格式
// 整点输出标志
FUSE_STATE_EPOCH = 127; // 整点输出标志
}

message ZFrame
{
double t0 = 1;
double t1 = 2;
double t2 = 3;
ZFrameType type = 4;
string channel_name = 5;
}

message Vector4f
{
option(eigen_typename) = "Eigen::Vector4f";
Expand Down
1 change: 1 addition & 0 deletions src/example/chasis.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
syntax = "proto3";
package zhito.inner_class;

import "zframe.proto";
import "base.proto";
import "proto_to_struct.proto";

Expand Down
3 changes: 2 additions & 1 deletion src/example/gnss.proto
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
syntax = "proto3";
package zhito.inner_class;

import "proto_to_struct.proto";
import "zframe.proto";
import "base.proto";
import "proto_to_struct.proto";

message ZGnss
{
Expand Down
2 changes: 1 addition & 1 deletion src/example/image.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package zhito.inner_class;

import "base.proto";
import "zframe.proto";

message ZImage
{
Expand Down
1 change: 1 addition & 0 deletions src/example/imu.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
syntax = "proto3";
package zhito.inner_class;

import "zframe.proto";
import "base.proto";
import "proto_to_struct.proto";

Expand Down
1 change: 1 addition & 0 deletions src/example/perception.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
syntax = "proto3";
package zhito.inner_class;

import "zframe.proto";
import "base.proto";
import "proto_to_struct.proto";

Expand Down
2 changes: 2 additions & 0 deletions src/example/pointcloud.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
syntax = "proto3";
package zhito.inner_class;

import "zframe.proto";
import "base.proto";
import "proto_to_struct.proto";

message ZPointCloudXYZIT
{
Expand Down
1 change: 1 addition & 0 deletions src/example/state.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
syntax = "proto3";
package zhito.inner_class;

import "zframe.proto";
import "base.proto";
import "proto_to_struct.proto";

Expand Down
64 changes: 64 additions & 0 deletions src/example/zframe.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
syntax = "proto3";
package zhito.inner_class;

import "base.proto";
import "proto_to_struct.proto";

enum ZFrameType{
None = 0;
VEHICLE_MODEL = 1; // 车辆运动约束虚拟帧
// 虚拟帧
IMU = 5; // IMU
CHASSIS_INFO = 6; // 车轮里程计
GNSS_POS = 7; // GNSS 观测值
GNSS_VEL = 8; // GNSS 观测值
GNSS_ALL = 9; // GNSS 观测值[vel pos dual_antenna]
//
CGI610 = 10;
Cpt7 = 11;
STATE = 15;
//
TRAJECTORY = 16;
ODOMETRY = 17;
//
PERCEPTION = 20;
SEMANTIC_MAP = 21;
LINESEGMENT = 25;
POLE = 26;
SIGN = 27;
SEMANTIC_MATCH = 40;
ZSemanticMatchDebugInfo = 41;
// LIDAR
PointCloud = 50;
LIDAR_MATCH = 51; // 激光匹配结果
PointCloudMapFileInfo = 52; // 地图文件信息
LIDAR_FRAME_MATCH = 55; // 激光匹配结果
LIDAR_MAP_MATCH = 56; // 激光匹配结果
// zloc_view
Zloc_Map_Msg = 60; // zloc_view 显示zlocmap_msg地图使用
Zmap_Map_Msg = 61; // zloc_view 显示zmap_msg地图使用
Localization_Msg = 62; // zloc_view 显示 localization/pose地图使用
CompressImage = 63; // zloc_view 显示图像使用
PerceptionLane = 64; // zloc_view 显示感知车道线使用
OrdinaryImage = 65; // zloc_view 显示图像使用
SourceCompressed_ColorImage = 66; // 用于建图的原始压缩彩色图像
SourceColorImage = 67; // 用于建图的原始彩色图像
SourceCompressed_GreyImage = 68; // 用于建图的原始压缩灰色图像
SourceGreyImage = 69; // 用于建图的原始灰色图像
PointCloud_LOCALMAP = 70; // 局部点云地图
PointCloud_GLOBALMAP = 71; // 全局点云地图
PointCloud_INIMAGE = 72; // 投影到图像上的点云
ODOMETRY_DELTA = 73; // 里程计增量信息
CvImage = 74; // 解码后的opencv图像格式
// 整点输出标志
FUSE_STATE_EPOCH = 127; // 整点输出标志
}

message ZFrame
{
double t0 = 1;
double t1 = 2;
double t2 = 3;
ZFrameType type = 4;
string channel_name = 5;
}
2 changes: 1 addition & 1 deletion src/example/zimage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <pcl/point_cloud.h>

#include "base.struct_pb.h"
#include "zframe.struct_pb.h"
#include "image.pb.h"

#include <opencv2/core.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/example/zpointcloud.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <pcl/point_cloud.h>

#include "base.struct_pb.h"
#include "zframe.struct_pb.h"
#include "pointcloud.pb.h"
#include "xyzit_points.hpp"

Expand Down

0 comments on commit e6ae53f

Please sign in to comment.