Minimal ROS 2 Rust bindings
Go to file
Martin Dahl 9bc75b69ac Update readme 2020-09-29 10:03:03 +02:00
common Initial bump to 🦊y. Note that this breaks eloquent compability! 2020-06-08 14:51:27 +02:00
examples Modify clock api + debug info for service clients 2020-09-16 08:52:15 +02:00
msg_gen Initial bump to 🦊y. Note that this breaks eloquent compability! 2020-06-08 14:51:27 +02:00
rcl Add support for the rcl logging api 2020-07-04 11:13:24 +02:00
src Accidentally removed Send on Clock 2020-09-16 09:02:07 +02:00
tests Cleanup untyped part 2 2019-08-30 10:43:21 +02:00
.gitignore Initial experiments with bindings and msg generation. 2019-08-19 21:05:26 +02:00
Cargo.toml Bump version to 0.0.5 2020-07-07 10:38:22 +02:00
README.md Update readme 2020-09-29 10:03:03 +02:00
build.rs Service servers! 🖥 2020-04-07 20:25:00 +02:00

README.md

R2R - Minimal ROS2 Rust bindings

Minimal bindings for ROS2 that do not require hooking in to the ROS2 build infrastructure. If you want a more ROS-oriented approach, see https://github.com/ros2-rust/ros2_rust. In these bindings, convenience Rust types are created by calling into the c introspection libraries to circumvent the .msg/.idl pipeline. The convenience types can be ignored when you need to trade convenience for performance, e.g. treating large chunks of data manually.

Manual is available on github pages https://sequenceplanner.github.io/r2r/

How to use

  1. Make sure you have libclang installed. (e.g. libclang-dev on ubuntu)
  2. Depend on this package: r2r = { git = "https://github.com/sequenceplanner/r2r" }.
  3. You need to source your ROS2 installation before building/running.
  4. The bindings will rebuild automatically if/when you source your workspace(s).
  5. If you make changes to existing message types, run cargo clean -p msg_gen to force recompilation of the rust message types on the next build.

A couple of examples are included in examples/

. /opt/ros/foxy/setup.sh
cargo build
cargo run --example subscriber_with_thread

An example application can be found here https://github.com/sequenceplanner/r2r-echo, which can be installed by running cargo install --git https://github.com/sequenceplanner/r2r-echo.

What works?

  • Up to date with ROS2 ~Dashing~ ~Eloquent~ Foxy
  • Building Rust types
  • Publish/subscribe
  • Services
  • Parameters

TODO

  • The code generation is currently just a big hack. Needs cleanup and refactoring.
  • Expose more of the RCL like QoS settings.
  • Action types?
  • Async API!