AutoAPMS
Resilient Robot Mission Management
Loading...
Searching...
No Matches
executor_node_components.cpp
1// Copyright 2024 Robin Müller
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#include "auto_apms_behavior_tree/executor/executor_node.hpp"
16
18{
19
20class NoUndeclaredParamsExecutorNode : public TreeExecutorNode
21{
22public:
23 NoUndeclaredParamsExecutorNode(rclcpp::NodeOptions options)
25 _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_DEFAULT_NAME, TreeExecutorNodeOptions(options)
26 .enableScriptingEnumParameters(false, false)
27 .enableGlobalBlackboardParameters(false, false))
28 {
29 }
30};
31
32class OnlyScriptingEnumParamsExecutorNode : public TreeExecutorNode
33{
34public:
35 OnlyScriptingEnumParamsExecutorNode(rclcpp::NodeOptions options)
37 _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_DEFAULT_NAME, TreeExecutorNodeOptions(options)
38 .enableScriptingEnumParameters(true, true)
39 .enableGlobalBlackboardParameters(false, false))
40 {
41 }
42};
43
44class OnlyBlackboardParamsExecutorNode : public TreeExecutorNode
45{
46public:
47 OnlyBlackboardParamsExecutorNode(rclcpp::NodeOptions options)
49 _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_DEFAULT_NAME, TreeExecutorNodeOptions(options)
50 .enableScriptingEnumParameters(false, false)
51 .enableGlobalBlackboardParameters(true, true))
52 {
53 }
54};
55
56class OnlyInitialScriptingEnumParamsExecutorNode : public TreeExecutorNode
57{
58public:
59 OnlyInitialScriptingEnumParamsExecutorNode(rclcpp::NodeOptions options)
61 _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_DEFAULT_NAME, TreeExecutorNodeOptions(options)
62 .enableScriptingEnumParameters(true, false)
63 .enableGlobalBlackboardParameters(false, false))
64 {
65 }
66};
67
68class OnlyInitialBlackboardParamsExecutorNode : public TreeExecutorNode
69{
70public:
71 OnlyInitialBlackboardParamsExecutorNode(rclcpp::NodeOptions options)
73 _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_DEFAULT_NAME, TreeExecutorNodeOptions(options)
74 .enableScriptingEnumParameters(false, false)
75 .enableGlobalBlackboardParameters(true, false))
76 {
77 }
78};
79
80} // namespace auto_apms_behavior_tree
81
82#include "rclcpp_components/register_node_macro.hpp"
83RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_behavior_tree::TreeExecutorNode)
84RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_behavior_tree::NoUndeclaredParamsExecutorNode)
85RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_behavior_tree::OnlyScriptingEnumParamsExecutorNode)
86RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_behavior_tree::OnlyBlackboardParamsExecutorNode)
87RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_behavior_tree::OnlyInitialScriptingEnumParamsExecutorNode)
88RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_behavior_tree::OnlyInitialBlackboardParamsExecutorNode)
Flexible ROS 2 node implementing a standardized interface for dynamically executing behavior trees.
TreeExecutorNode(const std::string &name, TreeExecutorNodeOptions executor_options)
Constructor allowing to specify a custom node name and executor options.
Useful tooling for incorporating behavior trees for task development.
Definition builder.hpp:30