Skip to content

AlexKaravaev/ros2_rust

This branch is 1 commit ahead of, 122 commits behind ros2-rust/ros2_rust:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7155fc2 · Sep 17, 2022
Sep 17, 2022
Jul 31, 2022
Sep 17, 2022
Sep 12, 2022
Apr 17, 2022
Sep 12, 2022
Jul 31, 2022
Aug 16, 2022
Aug 24, 2020
Feb 25, 2022
Jul 20, 2022
Nov 26, 2017
Feb 2, 2018
Aug 16, 2022
Jul 8, 2022
Jul 8, 2022
Jul 8, 2022
Aug 31, 2022

Repository files navigation

ROS 2 for Rust

Target Status
Ubuntu 20.04 Build Status

Introduction

This is a set of projects (the rclrs client library, code generator, examples and more) that enables developers to write ROS 2 applications in Rust.

Features and limitations

The current set of features include:

  • Message generation
  • Support for publishers and subscriptions
  • Loaned messages (zero-copy)
  • Tunable QoS settings
  • Clients and services

Lots of things are still missing however, see the issue list for an overview. You are very welcome to contribute!

Since the client library is still rapidly evolving, there are no stability guarantees for the moment.

Sounds great, how can I try this out?

Here are the steps for building the ros2_rust examples in a vanilla Ubuntu Focal installation. See the in-depth guide for building ros2_rust packages for more details and options, including a Docker-based setup.

# Install Rust, e.g. as described in https://rustup.rs/
# Install ROS 2 as described in https://docs.ros.org/en/foxy/Installation.html
# Assuming you installed the minimal version of ROS 2, you need these additional packages:
sudo apt install -y git libclang-dev python3-pip python3-vcstool # libclang-dev is required by bindgen
# Install these plugins for cargo and colcon:
cargo install --debug cargo-ament-build  # --debug is faster to install
pip install git+https://github.com/colcon/colcon-cargo.git
pip install git+https://github.com/colcon/colcon-ros-cargo.git

mkdir -p workspace/src && cd workspace
git clone https://github.com/ros2-rust/ros2_rust.git src/ros2_rust
vcs import src < src/ros2_rust/ros2_rust_foxy.repos
. /opt/ros/foxy/setup.sh
colcon build

Then, to run the minimal pub-sub example, do this:

# In a new terminal (or tmux window)
. ./install/setup.sh
ros2 run examples_rclrs_minimal_pub_sub minimal_publisher
# In a new terminal (or tmux window)
. ./install/setup.sh
ros2 run examples_rclrs_minimal_pub_sub minimal_subscriber

or

# In a new terminal (or tmux window)
. ./install/setup.sh
ros2 launch examples_rclrs_minimal_pub_sub minimal_pub_sub.launch.xml

Further documentation articles:

About

Rust bindings for ROS2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 83.8%
  • EmberScript 6.0%
  • Python 5.1%
  • CMake 4.7%
  • Other 0.4%