2 releases
0.0.2 | Aug 10, 2021 |
---|---|
0.0.1 | Jul 24, 2021 |
#94 in Robotics
25 downloads per month
Used in rclrust
23KB
682 lines
rclrust
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
Supporting Environments
- Rust: 1.56+
- ROS2:
- OS:
- Ubuntu
- DDS:
- Fast DDS (Default for Foxy)
- Cyclone DDS (Default for Galactic+)
Supporting features
- Code generation from
.msg
,.srv
,.action
- Loggers
- Publishers/Subscriptions
- Services/Clients
- Timers
- Parameters (without services)
TODO
- Parameter services/clients
- Actions
- Lifecycles
- More
- Unit test
- Documentation
- Examples (especially with ament)
- etc...
Distribution
RclRust 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" }
Examples
Prepare
$ git clone git@github.com:rclrust/rclrust.git
$ cd rclrust
$ cargo build
Pub/Sub
Publisher:
$ cargo run --features <distro> --examples publisher
Subscription
$ cargo run --features <distro> --examples subscription
Other examples are here, and examples with colcon are here.
Notice
The icon of RclRust was created by combinating and modifing the following materials.
- ros.svg © ROS (Licensed under CC BY 4.0)
- Gear-icon.png (Licensed under CC0 1.0)
The other ROS2 clients written in Rust
Dependencies
~7MB
~131K SLoC