agentic_robotics_core/
lib.rs

1//! ROS3 Core - Next-generation Robot Operating System
2//!
3//! A ground-up Rust rewrite of ROS targeting microsecond-scale determinism
4//! with hybrid WASM/native deployment via npm.
5
6pub mod middleware;
7pub mod serialization;
8pub mod message;
9pub mod publisher;
10pub mod subscriber;
11pub mod service;
12pub mod error;
13
14pub use middleware::Zenoh;
15pub use message::{Message, RobotState, PointCloud};
16pub use publisher::Publisher;
17pub use subscriber::Subscriber;
18pub use service::{Service, Queryable};
19pub use error::{Result, Error};
20
21/// ROS3 Core version
22pub const VERSION: &str = env!("CARGO_PKG_VERSION");
23
24/// Initialize ROS3 runtime
25pub fn init() -> Result<()> {
26    tracing_subscriber::fmt()
27        .with_target(false)
28        .with_thread_ids(true)
29        .with_level(true)
30        .init();
31
32    tracing::info!("ROS3 Core v{} initialized", VERSION);
33    Ok(())
34}
35
36#[cfg(test)]
37mod tests {
38    use super::*;
39
40    #[test]
41    fn test_init() {
42        let result = init();
43        assert!(result.is_ok());
44    }
45}