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
//! Mecha10 Behavior Patterns
//!
//! This crate provides common behavior patterns as reusable `BehaviorNode` implementations.
//! These patterns solve common robotics problems like priority-based control and multi-model fusion.
//!
//! # Available Patterns
//!
//! - **Subsumption**: Priority-based layered control for safety-critical systems
//! - **Ensemble**: Multi-model fusion with various voting strategies
//!
//! # Example
//!
//! ```rust
//! use mecha10_behavior_patterns::prelude::*;
//! use mecha10_behavior_runtime::prelude::*;
//!
//! # #[derive(Debug)]
//! # struct SafetyBehavior;
//! # #[async_trait]
//! # impl BehaviorNode for SafetyBehavior {
//! # async fn tick(&mut self, _ctx: &Context) -> anyhow::Result<NodeStatus> {
//! # Ok(NodeStatus::Success)
//! # }
//! # }
//! # #[derive(Debug)]
//! # struct TaskBehavior;
//! # #[async_trait]
//! # impl BehaviorNode for TaskBehavior {
//! # async fn tick(&mut self, _ctx: &Context) -> anyhow::Result<NodeStatus> {
//! # Ok(NodeStatus::Success)
//! # }
//! # }
//!
//! // Subsumption: Safety overrides task behavior
//! let subsumption = SubsumptionNode::new()
//! .add_layer(10, Box::new(SafetyBehavior)) // High priority
//! .add_layer(1, Box::new(TaskBehavior)); // Low priority
//! ```
// Re-export pattern nodes
pub use ;
pub use ;
/// Prelude module for convenient imports