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”; lower-priority layers aren’t ticked that cycle, preserving their internal progress. - Weighted
Model