2 releases
Uses new Rust 2024
new 0.1.1 | May 20, 2025 |
---|---|
0.1.0 | May 19, 2025 |
#8 in #rune
154 downloads per month
Used in rune-r2r-cli
15KB
298 lines
rune-r2r
Bindings for ROS to use with rune
scripts.
Example:
let node = ros::Node::create("rune_r2r_node", "rune_r2r_namespace")?;
let sub = node.subscribe("message", "std_msgs/msg/String", ros::QosProfile::create_default())?;
let publisher = node.create_publisher("message", "std_msgs/msg/String", ros::QosProfile::create_default())?;
publisher.publish(#{ data: "hello"})?;
node.spin_once(200);
let msg = sub.next().await??;
println!("Received: '{:?}'", msg.data);
How to use
rune
does not currently support dynamic module, rune-r2r
can be used from the command line using rune-r2r-cli, or by loading rune_r2r::module()
in a rune context:
use rune::Context;
let mut rune_context = Context::with_default_modules()?;
rune_context.install(rune_r2r::module()?)?;
Dependencies
~23–44MB
~799K SLoC