Expand description
Mecha10 Behavior Runtime
Unified behavior composition system for robotics and AI: behavior logic is Rust code
Re-exports§
pub use actions::register_builtin_actions;pub use actions::LandNode;pub use actions::MoveNode;pub use actions::RlTaskNode;pub use actions::SensorCheckNode;pub use actions::SetRlTargetNode;pub use actions::TakeoffNode;pub use actions::TimerNode;pub use actions::WanderNode;pub use config::detect_project_root;pub use config::get_current_environment;pub use config::list_available_behaviors;pub use config::load_behavior_config;pub use config::resolve_behavior_config_path;pub use config::validate_behavior_composition_json;pub use config::validate_behavior_config;pub use config::BehaviorConfig;pub use config::CompositionConfig;pub use config::NodeConfig;pub use config::NodeReference;pub use config::ParallelPolicyConfig;pub use config::SubsumptionLayerConfig;pub use config::ValidationResult;pub use control::PidController;pub use control::PidGains;
Modules§
- actions
- Built-in action nodes for behavior trees.
- config
- Configuration management for behavior trees
- control
- Reusable control-loop primitives shared by behaviour action nodes.
- hot_
reload - Hot-reload functionality for behavior trees during development.
- prelude
Macros§
Structs§
- Behavior
Executor - Behavior
Loader - Context
- Execution
Context - Execution
Stats - Force
Failure Node - Always reports
Failureonce its child resolves, regardless of whether the child actually succeeded or failed;Runningpasses through unchanged. The mirror ofForceSuccessNode, useful inside aSelectorto force a fallback to the next option. - Force
Success Node - Always reports
Successonce its child resolves, regardless of whether the child actually succeeded or failed;Runningpasses through unchanged. Useful for an optional step whose failure shouldn’t abort the rest of aSequence. - Inverter
Node - Negates a
Success/Failureresult from its single child;Runningpasses through unchanged. The canonical decorator for turning a “condition” leaf/subtree into its opposite (e.g. “target NOT in range”) without duplicating the underlying check. - Node
Registry - Parallel
Node - Repeat
Node - Re-runs its child every time it succeeds, up to an optional fixed count; a
Failurefrom the child always ends the loop immediately withFailure.count: Nonerepeats indefinitely (e.g. a patrol leg re-run forever until something fails it). - Retry
Node - Re-runs its child up to
max_attemptstimes whenever it fails, succeeding as soon as one attempt succeeds; only reportsFailureonce every attempt has been exhausted. The complement ofRepeatNode(which loops on success). - Select
OrNode - Sequence
Node - Subsumption
Layer - A single priority layer in a
SubsumptionNode: a priority (higher wins) plus the behavior that implements it. - Subsumption
Node - Priority-based preemption (subsumption architecture): on each tick, tries each layer
highest-priority first. The first layer whose
tick()returnsRunning/Success“wins”; lower-priority layers aren’t ticked that cycle, preserving their internal progress. - Timeout
Node - Bounds how long its child may stay
Running: oncedurationelapses without the child resolving, immediately reportsFailure(resetting the child’s state). A child that resolves before the deadline passes its status straight through. - Watch
Node - Like
ParallelNode, but with no memory of a prior resolution: every child is ticked, every call, unconditionally. Needed for an interrupt-condition layer that must be re-evaluated indefinitely (e.g. the operator clicking/clearing repeatedly over a session).
Enums§
Traits§
Functions§
- boxed_
children_ mut - Maps an iterator of boxed child behaviors to
BehaviorNode::children_mut’s trait-object return type.