This repo is used to store struct formats used to transmit data on CEV vehicles. It intends to standardize commonly-used data types, providing modular serialization code to reduce drift across codebases and improve the developer experience on CEV.
Structs are stored as Protobuf definitions
(.proto). Protobuf is a mechanism developed by Google that enables
standardized, lightweight serialization that works across platforms.
In Fall 2026, CEV began switching from ROS 2 to a custom middleware based on the Zenoh publisher-subscriber protocol. At the same time, we began writing all new autonomy algorithms in Rust (and migrating some existing ones).
These changes introduced a need for custom pub-sub message definitions. Our main requirements are:
- Standardization. Without a standard, people tend to write custom serialization that ends up as technical debt.
- Language cross-compatibility. This ideally includes code generation i.e. automatically turning a language-agnostic type into a struct defined in a specific language.
Protobuf supports both of these, and is the industry standard for effeciently converting arbitrary types into raw bytes.
proto/cev/interfaces/v1/sensors.proto:
| topic | data name | type | type vague description |
|---|---|---|---|
| cev/sensors/imu | imu data | Imu |
timestamp + floats for each of the accelerometer data (f/b, l/r, u/d) and gyroscope (roll pitch yaw) - 6dof |
| cev/sensors/wheels/left_rpm | left wheel rpm | WheelSpeed |
timestamp + rotations/s, float |
| cev/sensors/wheels/right_rpm | right wheel rpm | WheelSpeed |
timestamp + rotations/s, float |
proto/cev/interfaces/v1/lidar.proto:
| topic | data name | type | type vague description |
|---|---|---|---|
| cev/sensors/lidar/raw_points | raw lidar points | PointCloud |
header + packed points: x, y, z, intensity as f32 (16 bytes per point) |
| cev/sensors/lidar/segmented_points | segmented lidar points | PointCloud |
raw point layout + i32 cluster id (20 bytes per point) |
| cev/sensors/lidar/range_graph | range graph | RangeGraph |
header + grid size + one RangeNode per (ring, azimuth) cell |
| cev/sensors/lidar/occupancy_grid/local | local occupancy grid | OccupancyGrid |
header + size, resolution, origin + row-major cell costs, one byte per cell (nav2 values). Lidar frame |
| cev/sensors/lidar/occupancy_grid/global | global occupancy grid | OccupancyGrid |
same layout as the local grid. World frame |
| cev/sensors/lidar/occupancy_grid/diff | occupancy grid changes | OccupancyGridDiff |
header + list of changed cells: (x, y, old cost, new cost) |
| cev/sensors/pose_world | lidar pose in world | Transform |
header + translation (Vector3) + rotation (Quaternion) |
| cev/sensors/pose_frame | lidar pose per frame | Transform |
same layout as pose_world. Pose used for each lidar frame |
TODO add common.proto
Messages are defined as .proto files in proto/cev/interfaces/[version]/.
Every PR to this repo
triggers CI to run generate.sh, which in turn runs protoc to compile
modified .proto files into Rust and Python code in gen/. This directory
contains the corresponding structs (or equivalent, depending on language) which
you can import into your projects.
We recommend adding this entire repo into your code as a Git submodule. Although this will likely carry some unnecessary code, it's the easiest way to track updates.
We follow Protocol Buffers Style Guide and Google Cloud API directory structure best practices regarding naming protobuf files and versioning them. This means the version number e.g. v1 identifies breaking changes, so we can add new versions as v2, v3, etc. to allow users to update without breaking their old code (and to use the new versions at their own pace).
You can find a directory of types in the above Messages section of this README.
If you would
like to add new struct(s), you can feel free to place them wherever makes
the most sense for you as a user. This could mean adding them to existing
.proto files or making a new .proto file.