1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
//! # ZeroClaw Robot Kit
//!
//! A standalone robotics toolkit that integrates with ZeroClaw for AI-powered robots.
//!
//! ## Features
//!
//! - **Drive**: Omni-directional motor control (ROS2, serial, GPIO, mock)
//! - **Look**: Camera capture + vision model description (Ollama)
//! - **Listen**: Speech-to-text via Whisper.cpp
//! - **Speak**: Text-to-speech via Piper TTS
//! - **Sense**: LIDAR, motion sensors, ultrasonic distance
//! - **Emote**: LED matrix expressions and sound effects
//! - **Safety**: Independent safety monitor (collision avoidance, E-stop, watchdog)
//!
//! ## Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────┐
//! │ ZeroClaw AI Brain (or any controller) │
//! │ "Move forward, find the ball, tell me what you see" │
//! └─────────────────────┬───────────────────────────────────┘
//! │ Tool calls
//! ▼
//! ┌─────────────────────────────────────────────────────────┐
//! │ zeroclaw-robot-kit │
//! │ ┌─────────┐ ┌──────┐ ┌────────┐ ┌───────┐ ┌───────┐ │
//! │ │ drive │ │ look │ │ listen │ │ speak │ │ sense │ │
//! │ └────┬────┘ └──┬───┘ └───┬────┘ └───┬───┘ └───┬───┘ │
//! │ │ │ │ │ │ │
//! │ ┌────┴─────────┴─────────┴──────────┴─────────┴────┐ │
//! │ │ SafetyMonitor (parallel) │ │
//! │ │ • Pre-move obstacle check │ │
//! │ │ • Proximity-based speed limiting │ │
//! │ │ • Bump sensor response │ │
//! │ │ • Watchdog auto-stop │ │
//! │ │ • Hardware E-stop override │ │
//! │ └──────────────────────────────────────────────────┘ │
//! └─────────────────────────────────────────────────────────┘
//! │
//! ▼
//! ┌─────────────────────────────────────────────────────────┐
//! │ Hardware: Motors, Camera, Mic, Speaker, LIDAR, LEDs │
//! └─────────────────────────────────────────────────────────┘
//! ```
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use zeroclaw_robot_kit::{RobotConfig, DriveTool, SafetyMonitor, SafeDrive};
//! use std::sync::Arc;
//!
//! #[tokio::main]
//! async fn main() {
//! // Load configuration
//! let config = RobotConfig::default();
//!
//! // Create safety monitor
//! let (safety, _rx) = SafetyMonitor::new(config.safety.clone());
//! let safety = Arc::new(safety);
//!
//! // Wrap drive with safety
//! let drive = Arc::new(DriveTool::new(config.clone()));
//! let safe_drive = SafeDrive::new(drive, safety.clone());
//!
//! // Use tools...
//! let result = safe_drive.execute(serde_json::json!({
//! "action": "forward",
//! "distance": 1.0
//! })).await;
//! }
//! ```
//!
//! ## Standalone Usage
//!
//! This crate can be used independently of ZeroClaw. It defines its own
//! `Tool` trait that is compatible with ZeroClaw's but doesn't require it.
//!
//! ## Safety
//!
//! **The AI can REQUEST movement, but SafetyMonitor ALLOWS it.**
//!
//! The safety system runs as an independent task and can override any
//! AI decision. This prevents collisions even if the LLM hallucinates.
// TODO: Re-enable once all public items are documented
// #![warn(missing_docs)]
// Re-exports for convenience
pub use RobotConfig;
pub use ;
pub use DriveTool;
pub use EmoteTool;
pub use ListenTool;
pub use LookTool;
pub use SenseTool;
pub use SpeakTool;
pub use ;
/// Crate version
pub const VERSION: &str = env!;
/// Create all robot tools with default configuration
///
/// Returns a Vec of boxed tools ready for use with an agent.
/// Create all robot tools with safety wrapper on drive