MoveIt Pro Behavior
Core Behaviors for 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>

Inheritance diagram for moveit_studio::behaviors::SharedResourcesNodeLoaderBase:

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.

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.


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