AutoAPMS
Resilient Robot Mission Management
Loading...
Searching...
No Matches
executor_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
17namespace auto_apms_mission
18{
19
20class OrchestratorExecutor : public auto_apms_behavior_tree::TreeExecutorNode
21{
22public:
23 explicit OrchestratorExecutor(rclcpp::NodeOptions options)
25 _AUTO_APMS_MISSION__ORCHESTRATOR_EXECUTOR_NAME,
26 Options(options).setDefaultBuildHandler("auto_apms_mission::SingleNodeMissionBuildHandler"))
27 {
28 }
29};
30
31class MissionExecutor : public auto_apms_behavior_tree::TreeExecutorNode
32{
33public:
34 explicit MissionExecutor(rclcpp::NodeOptions options)
35 : TreeExecutorNode(_AUTO_APMS_MISSION__MISSION_EXECUTOR_NAME, options)
36 {
37 }
38};
39
40class EventMonitorExecutor : public auto_apms_behavior_tree::TreeExecutorNode
41{
42public:
43 explicit EventMonitorExecutor(rclcpp::NodeOptions options)
44 : TreeExecutorNode(_AUTO_APMS_MISSION__EVENT_MONITOR_EXECUTOR_NAME, options)
45 {
46 }
47};
48
49class EventHandlerExecutor : public auto_apms_behavior_tree::TreeExecutorNode
50{
51public:
52 explicit EventHandlerExecutor(rclcpp::NodeOptions options)
53 : TreeExecutorNode(_AUTO_APMS_MISSION__EVENT_HANDLER_EXECUTOR_NAME, options)
54 {
55 }
56};
57
58} // namespace auto_apms_mission
59
60#include "rclcpp_components/register_node_macro.hpp"
61RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_mission::OrchestratorExecutor)
62RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_mission::MissionExecutor)
63RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_mission::EventMonitorExecutor)
64RCLCPP_COMPONENTS_REGISTER_NODE(auto_apms_mission::EventHandlerExecutor)
TreeExecutorNode(const std::string &name, TreeExecutorNodeOptions executor_options)
Constructor allowing to specify a custom node name and executor options.
Mission design utilities incorporating behavior trees to model the complexity of arbitrary operations...