#ros2 #client #now

rclrust

ROS2 client written in Rust

2 releases

0.0.2 Aug 10, 2021
0.0.0 Jul 24, 2021

#143 in Robotics

Apache-2.0

160KB
4K SLoC

RclRust

Introduction

This is yet another ROS2 client library written in Rust.
I have implemented it independent of the ament or colcon. By using proc-macro to generate message-type and service-type code, crate dependency resolution can now be completed in cargo. This was inspired by rosrust.

Development environment

  • OS: Ubuntu 20.04
  • ROS2: Foxy
  • rustc: 1.54.0 (stable)

Supporting features

  • Code generation from .msg, .srv, .action
  • Loggers
  • Publishers/Subscriptions
  • Services/Clients
  • Timers
  • Parameters (without services)

TODO

  • Parameter services/clients
  • Actions
  • Multithread
  • Lifecycles
  • More
    • Unit test
    • Documentation
    • Examples (especially with ament)
  • CI
  • etc...

I'm not going to support

  • Components
    • Is it necessary for Rust?

Examples

Prepare

$ git clone git@github.com:rclrust/rclrust.git
$ cd rclrust
$ cargo build

Pub/Sub

Publisher:

$ cargo run --examples publisher

Subscription

$ cargo run --examples subscription

out

For more examples, see https://github.com/rclrust/rclrust/tree/main/rclrust/examples.

The other ROS2 clients written in Rust

Dependencies

~7–10MB
~190K SLoC