Minimal ROS 2 Rust bindings
Go to file
Martin Dahl d0ca455b17 Testing for threading issues 2019-08-26 12:21:30 +02:00
common Initial experiments with bindings and msg generation. 2019-08-19 21:05:26 +02:00
examples Refactoring 2019-08-26 11:34:52 +02:00
msg_gen Start to cleanup codegen 2019-08-22 22:23:17 +02:00
rcl Able to generate convenience types for all built in dashing messages 2019-08-20 17:21:39 +02:00
src Refactoring 2019-08-26 11:34:52 +02:00
tests Testing for threading issues 2019-08-26 12:21:30 +02:00
.gitignore Initial experiments with bindings and msg generation. 2019-08-19 21:05:26 +02:00
Cargo.toml Started adding support for arrays and nested messages. More derives! 2019-08-20 11:07:09 +02:00
README.md "Native" publishers 2019-08-20 13:43:33 +02:00
build.rs Start to cleanup codegen 2019-08-22 22:23:17 +02:00
msgs.txt Minor changes and tests 2019-08-20 21:24:41 +02:00

README.md

R2R - Minimal ROS2 Rust bindings

Minimal bindings for ROS2 that does 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 of course be ignored when you need to trade convenience for performance, e.g. treating large chunks of data manually.

How to use

You need to source your ROS2 installation before building/running. A couple of examples are included in examples/

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

In order to avoid building everything, put the message types you need in msgs.txt before building. (Or just ros2 msg list > msgs.txt).

What works?

  • Only tested with ROS2 Dashing
  • Simple publish/subscribe, see examples.

TODO

  • The code generation is currently just a big hack. Needs cleanup and refactoring.
  • There is no proper abstractions for nodes etc. Reuse/share with https://github.com/ros2-rust/ros2_rust?
  • Implement error handling and cleanup code.