Expand description
Core implementation of behaviortree.
§behaviortree-core
behaviortree-core is the foundational crate of behaviortree.
It defines the core traits, data structures, built-in control-flow behaviors, tree runtime, and XML export.
It does not contain the factory/parser (see behaviortree-factory) or the optional feature-gated behaviors (see behaviortree-behaviors).
Re-exports§
pub use behavior_data::BehaviorData;pub use behavior_description::BehaviorDescription;pub use behavior_kind::BehaviorKind;pub use behavior_state::BehaviorState;pub use behavior_traits::Behavior;pub use behavior_traits::BehaviorExecution;pub use behavior_traits::BehaviorRegistry;pub use error::Error;pub use pre_post_conditions::POST_CONDITIONS;pub use pre_post_conditions::PRE_CONDITIONS;pub use tree::observer::tree_observer::BehaviorTreeObserver;pub use tree::BehaviorTree;pub use tree::BehaviorTreeElement;pub use tree::BehaviorTreeElementList;pub use tree::TreeElementKind;pub use tree::BehaviorTreeMessage;pub use tree::observer::groot2::connector_data::Groot2ConnectorData;pub use xml::creator::XmlCreator;pub use tree::observer::groot2::connector_std::Groot2Connector;
Modules§
- behavior_
data - Built-In behaviors of
behaviortree. - behavior_
description BehaviorDescriptionimplementation.- behavior_
kind - BehaviorKind
- behavior_
state - BehaviorState
- behavior_
traits - Core behavior traits.
- behaviors
- Core behaviors of a behaviortree which are always available.
- error
behaviortreebehavior errors- pre_
post_ conditions PreConditionsandPostConditionsimplementation.- tree
behaviortreetree module.- xml
behaviortreexml module.
Macros§
- create_
port_ array - Creates an array of ports.
- port_
array_ init - Creation macro for
PortArrayinit function - register_
scripting_ enum - Macro to register enums for scripting.
Enum must derive
ScriptEnum. It is also possible to register discrete value(s).
Constants§
- ACTION
BehaviorKindliteral “Action”- AUTOREMAP
- Literals for scripting ports
- CONDITION
BehaviorKindliteral “Condition”- CONTROL
BehaviorKindliteral “Control”- DECORATOR
BehaviorKindliteral “Decorator”- DEFAULT
- Literal “default” for ports etc.
- EMPTY_
STR - Often needed empty str
- FAILURE
BehaviorStateliteral “Failure”- FAILURE_
IF - ID
- Literal “ID” for ports etc.
- IDLE
BehaviorStateliteral “Idle”- NAME
- Literal “name” for ports etc.
- ON_
FAILURE - ON_
HALTED - ON_
SUCCESS - POST
- RUNNING
BehaviorStateliteral “Running”- SKIPPED
BehaviorStateliteral “Skipped”- SKIP_IF
- SUBTREE
BehaviorKindliteral"SubTree"- SUCCESS
BehaviorStateliteral “Success”- SUCCESS_
IF - WHILE
Type Aliases§
- Arc
- Behavior
Creation Fn - Type alias for a behavior creation function
- Behavior
Ptr - Pointer to a behavior.
- Behavior
Result - Result type definition for behaviors.
- Behavior
Tick Callback BehaviorDatastate change callback signature.- Mutex
- RwLock
- RwLock
Read Guard - RwLock
Write Guard