Crate ros_core_rs
source ·Expand description
This Rust library provides a standalone implementation of the ROS (Robot Operating System) core. It allows you to run a ROS master and communicate with other ROS nodes without relying on an external ROS installation. You can use this library to build ROS nodes entirely in Rust, including publishers and subscribers, without needing to use any other ROS dependencies.
§Examples
use url::Url;
async fn demo() -> anyhow::Result<()>{
const ROS_MASTER_URI: &str = "http://0.0.0.0:11311";
let uri = Url::parse(ROS_MASTER_URI).unwrap();
let socket_address = ros_core_rs::url_to_socket_addr(&uri)?;
let master = ros_core_rs::core::Master::new(&socket_address);
master.serve().await
}