Minimal ROS 2 Rust bindings
Go to file
Martin Dahl f0597576dc Examples for node querying and "untyped" publish/subscribe 2019-08-27 14:21:53 +02:00
common Initial experiments with bindings and msg generation. 2019-08-19 21:05:26 +02:00
examples Examples for node querying and "untyped" publish/subscribe 2019-08-27 14:21:53 +02:00
msg_gen Support for querying the network and working with "untyped" msgs 2019-08-27 13:33:30 +02:00
rcl Support for querying the network and working with "untyped" msgs 2019-08-27 13:33:30 +02:00
src Examples for node querying and "untyped" publish/subscribe 2019-08-27 14:21:53 +02:00
tests Examples for node querying and "untyped" publish/subscribe 2019-08-27 14:21:53 +02:00
.gitignore Initial experiments with bindings and msg generation. 2019-08-19 21:05:26 +02:00
Cargo.toml Support for querying the network and working with "untyped" msgs 2019-08-27 13:33:30 +02:00
README.md Updated readme 2019-08-26 13:48:28 +02:00
build.rs Support for querying the network and working with "untyped" msgs 2019-08-27 13:33:30 +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 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 if you want everything).

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.
  • Implement error handling. Now all methods just return Err(()).
  • Expose more of the RCL.