Minimal ROS 2 Rust bindings
Go to file
Martin Dahl e55f6de515 Readme 2019-10-09 08:32:48 +02:00
common Remove the need for msgs.txt 2019-10-08 16:43:36 +02:00
examples Cleanup untyped part 2 2019-08-30 10:43:21 +02:00
msg_gen Remove the need for msgs.txt 2019-10-08 16:43:36 +02:00
rcl Remove the need for msgs.txt 2019-10-08 16:43:36 +02:00
src Refactor publisher code 2019-08-30 10:56:06 +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 Error type which is simply copy paste:d from the generated bindings 2019-08-29 11:50:20 +02:00
README.md Readme 2019-10-09 08:32:48 +02:00
build.rs Remove the need for msgs.txt 2019-10-08 16:43:36 +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.

How to use

  1. Depend on this package: r2r = { git = "https://github.com/sequenceplanner/r2r" }.
  2. You need to source your ROS2 installation before building/running.
  3. The bindings will rebuild automatically if/when you source your workspace(s).
  4. 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/dashing/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
  • Building Rust types
  • Publish/subscribe

TODO

  • The code generation is currently just a big hack. Needs cleanup and refactoring.
  • Expose more of the RCL like QoS settings.
  • Services and action types...