Skip to main content

mecha10_behavior_runtime/
lib.rs

1//! Mecha10 Behavior Runtime
2//!
3//! Unified behavior composition system for robotics and AI: behavior logic is Rust code
4
5pub mod actions;
6mod behavior;
7mod composition;
8pub mod config;
9pub mod control;
10mod execution;
11mod loader;
12mod registry;
13mod status;
14#[cfg(test)]
15mod test_helpers;
16
17pub use actions::{
18    register_builtin_actions, GoToLocationNode, LandNode, MoveNode, RlTaskNode, SensorCheckNode,
19    SetGoToLocationTargetNode, SetRlTargetNode, TakeoffNode, TimerNode, WanderNode,
20};
21pub use behavior::{boxed_children_mut, BehaviorNode, BehaviorNodeExt, BoxedBehavior};
22pub use composition::{
23    ForceFailureNode, ForceSuccessNode, InverterNode, ParallelNode, ParallelPolicy, RepeatNode, RetryNode,
24    SelectOrNode, SequenceNode, SubsumptionLayer, SubsumptionNode, TimeoutNode, WatchNode,
25};
26pub use config::{
27    behavior_capabilities_satisfied, detect_project_root, get_current_environment, list_available_behaviors,
28    list_capable_behaviors, load_behavior_config, resolve_behavior_config_path, validate_behavior_composition_json,
29    validate_behavior_config, BehaviorConfig, CompositionConfig, NodeConfig, NodeReference, ParallelPolicyConfig,
30    SubsumptionLayerConfig, ValidationResult,
31};
32pub use control::{PidController, PidGains};
33pub use execution::{BehaviorExecutor, ExecutionContext, ExecutionStats};
34pub use loader::BehaviorLoader;
35pub use registry::NodeRegistry;
36pub use status::NodeStatus;
37
38pub mod hot_reload;
39
40pub use mecha10_core::Context;
41
42pub mod prelude {
43    pub use crate::actions::{
44        GoToLocationNode, LandNode, MoveNode, RlTaskNode, SensorCheckNode, SetGoToLocationTargetNode, SetRlTargetNode,
45        TakeoffNode, TimerNode, WanderNode,
46    };
47    pub use crate::behavior::{BehaviorNode, BehaviorNodeExt, BoxedBehavior};
48    pub use crate::composition::{
49        ForceFailureNode, ForceSuccessNode, InverterNode, ParallelNode, ParallelPolicy, RepeatNode, RetryNode,
50        SelectOrNode, SequenceNode, SubsumptionLayer, SubsumptionNode, TimeoutNode, WatchNode,
51    };
52    pub use crate::config::{
53        BehaviorConfig, CompositionConfig, NodeConfig, NodeReference, ParallelPolicyConfig, SubsumptionLayerConfig,
54    };
55    pub use crate::control::{PidController, PidGains};
56    pub use crate::execution::{BehaviorExecutor, ExecutionContext, ExecutionStats};
57    pub use crate::loader::BehaviorLoader;
58    pub use crate::registry::NodeRegistry;
59    pub use crate::status::NodeStatus;
60    pub use async_trait::async_trait;
61    pub use mecha10_core::Context;
62}