17#include "auto_apms_behavior_tree/build_handler/build_handler_factory_interface.hpp"
23class TreeBuildHandlerFactoryTemplate :
public TreeBuildHandlerFactoryInterface
26 std::is_convertible_v<T *, TreeBuildHandler *>,
27 "Cannot convert T* to TreeBuildHandler*. Did you forget to specify the keyword 'public' when inheriting? --> class "
28 "T : public TreeBuildHandler");
31 std::is_constructible_v<T, rclcpp::Node::SharedPtr, core::NodeRegistrationLoader::SharedPtr>,
32 "You must implement a constructor with signature TreeBuildHandler(rclcpp::Node::SharedPtr ros_node_ptr, "
33 "NodeLoader::SharedPtr tree_node_loader_ptr).");
36 TreeBuildHandlerFactoryTemplate() =
default;
37 virtual ~TreeBuildHandlerFactoryTemplate() =
default;
39 TreeBuildHandler::SharedPtr makeShared(
40 rclcpp::Node::SharedPtr ros_node_ptr, core::NodeRegistrationLoader::SharedPtr tree_node_loader_ptr)
override final
42 return std::make_shared<T>(ros_node_ptr, tree_node_loader_ptr);
45 TreeBuildHandler::UniquePtr makeUnique(
46 rclcpp::Node::SharedPtr ros_node_ptr, core::NodeRegistrationLoader::SharedPtr tree_node_loader_ptr)
override final
48 return std::make_unique<T>(ros_node_ptr, tree_node_loader_ptr);
Useful tooling for incorporating behavior trees for task development.