AutoAPMS
Streamlining behaviors in ROS 2
Loading...
Searching...
No Matches
NodeRegistrationInterface Class Referenceabstract

Interface used for registering behavior tree node plugins. More...

#include <auto_apms_behavior_tree_core/node/node_registration_interface.hpp>

Inheritance diagram for NodeRegistrationInterface:

Public Member Functions

virtual bool requiresRosNodeContext () const =0
 Determine whether a valid instance of RosNodeContext is required for registering the behavior tree node associated with this instance.
 
virtual void registerWithBehaviorTreeFactory (BT::BehaviorTreeFactory &factory, const std::string &registration_name, const RosNodeContext *const context_ptr=nullptr) const =0
 Register the node associated with this instance with a behavior tree factory.
 

Detailed Description

Interface used for registering behavior tree node plugins.

See also
NodeRegistrationTemplate
AUTO_APMS_BEHAVIOR_TREE_REGISTER_NODE

Definition at line 28 of file node_registration_interface.hpp.

Member Function Documentation

◆ requiresRosNodeContext()

virtual bool requiresRosNodeContext ( ) const
pure virtual

Determine whether a valid instance of RosNodeContext is required for registering the behavior tree node associated with this instance.

This method effectively allows to observe whether the underlying behavior tree node is a ROS 2 specific node or not.

Returns
true if you must pass a RosNodeContext instance to registerWithBehaviorTreeFactory, false otherwise.

◆ registerWithBehaviorTreeFactory()

virtual void registerWithBehaviorTreeFactory ( BT::BehaviorTreeFactory & factory,
const std::string & registration_name,
const RosNodeContext *const context_ptr = nullptr ) const
pure virtual

Register the node associated with this instance with a behavior tree factory.

Parameters
factoryBehavior tree factory instance.
registration_nameType name under which this node is to be registered.
context_ptrOptional pointer to a RosNodeContext required if the node to be registered is ROS 2 specific.
Exceptions
std::invalid_argumentif node to be registered is ROS 2 specific but context_ptr was omitted.

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