use super::{CargoDependency, Component, ComponentCatalog, ComponentType, Mecha10Config};
pub fn add_behaviors(catalog: &mut ComponentCatalog) {
catalog.insert(Component {
id: "idle_wander".to_string(),
name: "Idle Wander".to_string(),
description: "Basic wandering behavior with random direction changes".to_string(),
component_type: ComponentType::Behavior,
version: "0.1.0".to_string(),
category: "autonomous".to_string(),
tags: vec!["wander".to_string(), "autonomous".to_string()],
cargo_dependencies: vec![CargoDependency {
name: "mecha10-behavior-runtime".to_string(),
version: None,
path: Some("../../packages/behavior-runtime".to_string()),
features: vec![],
optional: false,
}],
files: vec![],
mecha10_config: Mecha10Config {
driver: None,
custom_node: None,
behavior: Some("idle_wander".to_string()),
},
});
catalog.insert(Component {
id: "patrol_simple".to_string(),
name: "Simple Patrol".to_string(),
description: "Square patrol pattern using timed movements".to_string(),
component_type: ComponentType::Behavior,
version: "0.1.0".to_string(),
category: "navigation".to_string(),
tags: vec!["patrol".to_string(), "waypoints".to_string(), "autonomous".to_string()],
cargo_dependencies: vec![CargoDependency {
name: "mecha10-behavior-runtime".to_string(),
version: None,
path: Some("../../packages/behavior-runtime".to_string()),
features: vec![],
optional: false,
}],
files: vec![],
mecha10_config: Mecha10Config {
driver: None,
custom_node: None,
behavior: Some("patrol_simple".to_string()),
},
});
catalog.insert(Component {
id: "find_target".to_string(),
name: "Find Target".to_string(),
description: "Hands control to the rl node until it reports the find_target task complete, while relaying live target-class overrides from the dashboard (/rl/control) - works against arbitrary targets and either of the rl node's policy_type inference backends (onnx or act_torchscript)".to_string(),
component_type: ComponentType::Behavior,
version: "0.1.0".to_string(),
category: "autonomous".to_string(),
tags: vec![
"rl".to_string(),
"find_target".to_string(),
"vision".to_string(),
"autonomous".to_string(),
],
cargo_dependencies: vec![CargoDependency {
name: "mecha10-behavior-runtime".to_string(),
version: None,
path: Some("../../packages/behavior-runtime".to_string()),
features: vec![],
optional: false,
}],
files: vec![],
mecha10_config: Mecha10Config {
driver: None,
custom_node: None,
behavior: Some("find_target".to_string()),
},
});
catalog.insert(Component {
id: "takeoff_land".to_string(),
name: "Takeoff & Land".to_string(),
description: "PID-stabilized quadcopter takeoff, a brief hover, then landing".to_string(),
component_type: ComponentType::Behavior,
version: "0.1.0".to_string(),
category: "flight".to_string(),
tags: vec![
"takeoff".to_string(),
"land".to_string(),
"flight".to_string(),
"autonomous".to_string(),
],
cargo_dependencies: vec![CargoDependency {
name: "mecha10-behavior-runtime".to_string(),
version: None,
path: Some("../../packages/behavior-runtime".to_string()),
features: vec![],
optional: false,
}],
files: vec![],
mecha10_config: Mecha10Config {
driver: None,
custom_node: None,
behavior: Some("takeoff_land".to_string()),
},
});
}