This is yet another ROS2 client library written in Rust.
I have implemented it independent of the ament or colcon.
By using proc-macro to generate message-type and service-type code, crate dependency resolution can now be completed in cargo. This was inspired by rosrust
.msg, .srv, .actionRclRust is supporting multiple distributions by using cargo features.
If you use a fixed distribution, set features in Cargo.toml as follows.
rclrust = { git = "https://github.com/rclrust/rclrust.git", features = ["foxy"] }
Otherwise, do not set features in Cargo.toml and pass target features like --featuers rclrust/${ROS_DISTRO} on build.
rclrust = { git = "https://github.com/rclrust/rclrust.git" }
$ git clone git@github.com:rclrust/rclrust.git
$ cd rclrust
$ cargo build
Publisher:
$ cargo run --features <distro> --examples publisher
Subscription
$ cargo run --features <distro> --examples subscription
Other examples are here, and examples with colcon are here.
The icon of RclRust was created by combinating and modifing the following materials.