MoveIt Pro Behavior Interface  5.0.1
Library for developing custom behaviors for use in MoveIt Pro
moveit_studio::behaviors::SharedResourcesNodeLoaderBase Class Referenceabstract

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...
 

Detailed Description

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

Member Function Documentation

◆ registerBehaviors()

virtual void moveit_studio::behaviors::SharedResourcesNodeLoaderBase::registerBehaviors ( BT::BehaviorTreeFactory &  factory,
const std::shared_ptr< BehaviorContext > &  shared_resources 
)
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.

Parameters
factoryThe BehaviorServer's BT::BehaviorTreeFactory
shared_resourcesThe BehaviorServerNode's BehaviorContext.

The documentation for this class was generated from the following file: