Rust Client for ROS2

Create a Rust Client for ROS2 from Scratch. Part 0: Integrate C API to Create ROS2 Node

Link ROS2 C API with Rust via `bindgen`, and create a `node` in Rust. Simple steps on how to use `bindgen`.

Marshal SHI
8 min readAug 13, 2020

--

Image by author

This is the first article in this series: Rust Client for ROS2 from Scratch.

The other parts are: 1.1 Create the Dynamic Library via CMake & Empy

Background

ROS2 is the latest version of ROS (Robot Operating System), which forms the basis for building applications related to robotics, and also provides a lot of libraries and tools for such applications. The primary advantage of moving from ROS to ROS2 is that ROS2 uses DDS for its communication system. Using DDS does not require a master node in ROS, which simplifies the communication protocol. For further information on the advantages and differences of “Using ROS2” and “Why ROS2?”, the article sheds some light on the features of ROS2.

Since we use ROS2 on robots and robot applications, it’s obvious that we need to write a different level of software to control the robot. For example, we need to use embedded code to control the hardware and furthermore, we need to use a higher-level code to perform…

--

--

Marshal SHI

Robots make our life easier | Robotics, Reinforcement Learning, Web, Python, Rust & Life Hacking. At MotivEdge.io