Expand description
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
use mecha10_behavior_patterns::prelude::*;
use mecha10_behavior_runtime::prelude::*;
// Subsumption: Safety overrides task behavior
let subsumption = SubsumptionNode::new()
.add_layer(10, Box::new(SafetyBehavior)) // High priority
.add_layer(1, Box::new(TaskBehavior)); // Low priorityModules§
Structs§
- Ensemble
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” and its status is returned for that tick - lower-priority layers aren’t ticked at all that cycle, so their own internal progress (e.g. aSequenceNode’s current child index) is naturally preserved rather than reset, which is what gives a preempted lower layer “resume where it left off” semantics for free. - Weighted
Model