Skip to content

OUXT-Polaris/protolink

Repository files navigation

protolink

Introduction

Automatic Protocol Buffers generation tool to link ROS2 and microcontroller. The protocol buffer developed by google is used to provide ros2-independent communication.

Features

  • Generate .proto file from ROS2 message
  • Generate C++ protocol buffer API from .proto file
  • Generate ANSI-C protocol buffer API from .proto file using Nanopb
  • Generate function to interconversion between ROS2 message and Protocol Buffers

Requirements

  • ROS2 (humble or latest)
  • Python3

Installation

Install dependencies

$ sudo apt update
$ sudo apt install protobuf-compiler libpaho-mqtt-dev libpaho-mqttpp-dev cmake ninja-build

Clone repository

$ git clone https://github.com/OUXT-Polaris/protolink.git
$ cd protolink

How to Using

Note

It is recommended to create an external repository like protolink_drivers and add the protolink and geographic_msgs dependencies there.

When using geographic_msgs/GeoPose

Add denendent packages to package.xml

# <depend> .....
<depend>geographic_msgs</depend>

Add task to CMakeLists.txt

# include(cmake/add_protolink_message.cmake)....
add_protolink_message_from_ros_message("geographic_msgs" "GeoPose")

Generate .proto file and API

$ cmake -S . -B build -G "Ninja"
$ cmake --build build

Path of the generated API file

  • C++ API: build/...
  • ANSI-C API: build/nanopb-gen/...
  • proto file: build/proto_file/...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •