MoveIt Pro Behavior
Core Behaviors for MoveIt Pro
|
The SharedResourcesNodeLoaderBase class is a base class for Behavior loader plugins that register Behaviors inheriting from SharedResourcesNode. More...
#include <shared_resources_node_loader.hpp>
Public Member Functions | |
virtual void | registerBehaviors (BT::BehaviorTreeFactory &factory, const std::shared_ptr< BehaviorContext > &shared_resources)=0 |
This function is called within the constructor of moveit_studio::behavior_server::BehaviorServerNode to register a set of Behaviors with the BehaviorServer's BT::BehaviorTreeFactory. More... | |
The SharedResourcesNodeLoaderBase class is a base class for Behavior loader plugins that register Behaviors inheriting from SharedResourcesNode.
This allows us to write Behaviors that use constructors with signatures that are different from the normal signature of BehaviorTree.Cpp nodes, while still allowing the library responsible for creating the behavior tree to work without directly linking against Behavior libraries provided by downstream developers.
The approach used here is similar to the one outlined in Method 1 of Tutorial 8 in the BehaviorTree.Cpp repo: https://github.com/BehaviorTree/BehaviorTree.CPP/blob/master/docs/tutorial_08_additional_args.md#method-1-register-a-custom-builder
|
pure virtual |
This function is called within the constructor of moveit_studio::behavior_server::BehaviorServerNode to register a set of Behaviors with the BehaviorServer's BT::BehaviorTreeFactory.
factory | The BehaviorServer's BT::BehaviorTreeFactory |
shared_resources | The BehaviorServerNode's BehaviorContext. |
Implemented in moveit_studio::behaviors::VisionBehaviorsLoader, moveit_studio::behaviors::ServoBehaviorsLoader, moveit_studio::behaviors::NavBehaviorsLoader, moveit_studio::behaviors::MTCTaskSetupBehaviorsLoader, moveit_studio::behaviors::MTCCoreBehaviorsLoader, and moveit_studio::behaviors::CoreBehaviorsLoader.