A high-performance, native bridge and code generator that exposes the entire MAVLink protocol as type-safe gRPC services using modern C++17.
Designed as a robust, type-safe alternative to mavlink2rest for professional UAV systems.
- Schema-First: Auto-generates Protobuf definitions (
.proto) directly from MAVLink XMLs. - High Performance: C++17 runtime bridge designed for low latency and efficient resource usage.
- Polyglot: Consume MAVLink telemetry in Python, Go, Rust, or Web clients via gRPC.
- Real-time Streaming: Bidirectional MAVLink message streaming with gRPC server-side streaming.
- Web Inspector: Built-in QGroundControl-style MAVLink inspector with live charts and frequency tracking.
Python-based code generator that converts MAVLink XML definitions to Protocol Buffer files and C++ conversion code. Uses Jinja2 templates to generate .proto files, gRPC service definitions, and C++ MAVLink↔Protobuf converters from XML message definitions.
C++17 MAVLink-to-gRPC bridge that connects to MAVLink devices (UDP/Serial) and exposes real-time bidirectional message streaming via gRPC. Implements connection management, message routing, and gRPC service (StreamMessages, SendMessage). Supports MAVSDK-style connection URLs like udp://:14550 or serial:///dev/ttyUSB0:57600.
QGroundControl-style web-based MAVLink inspector. Node.js backend (Express + Socket.IO) acts as gRPC client to the bridge and WebSocket server for the browser. Vanilla JavaScript frontend provides real-time message monitoring, frequency tracking, and multi-field chart visualization with Chart.js.
- C++: C++17 compatible compiler, CMake 3.10+, gRPC, Protocol Buffers
- Python: 3.8+
- Node.js: 20+
# Clone repository
git clone https://github.com/karakayahuseyin/mavlink2grpc.git
cd mavlink2grpc
# Run setup script (clones mavlink submodule, installs dependencies)
./setup.sh
# Generate proto files and C++ converters
cd generator
python3 main.py
# Select dialect: common.xml
# Build bridge
cd ../bridge/
cmake -B build
cmake --build build -j$(nproc)
# Install inspector dependencies
cd ../inspector
npm installStart px4 or any MAVLink-compatible autopilot simulator (e.g., px4_sitl).
cd bridge/build
./mav2grpc_bridge -c udp://:14550 -g 0.0.0.0:50051
# Change connection string (-c) as neededcd inspector
npm install
node server.js -g localhost:50051 -p 8000Open browser: http://localhost:8000