AutoAPMS
Streamlining behaviors in ROS 2
Loading...
Searching...
No Matches
options.hpp
1// Copyright 2026 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// http://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#pragma once
16
17#include <map>
18#include <string>
19
20#include "rclcpp/rclcpp.hpp"
21
23{
24
32{
33public:
38 TreeExecutorNodeOptions(const rclcpp::NodeOptions & ros_node_options = rclcpp::NodeOptions());
39
46
53
60 TreeExecutorNodeOptions & enableScriptingEnumParameters(bool from_overrides, bool dynamic);
61
68 TreeExecutorNodeOptions & enableGlobalBlackboardParameters(bool from_overrides, bool dynamic);
69
75 TreeExecutorNodeOptions & setDefaultBuildHandler(const std::string & name);
76
84 TreeExecutorNodeOptions & setCommandActionName(const std::string & name);
85
94
99 rclcpp::NodeOptions getROSNodeOptions() const;
100
101private:
102 friend class GenericTreeExecutorNode;
103
104 rclcpp::NodeOptions ros_node_options_;
105 bool enable_command_action_ = true;
106 bool enable_clear_blackboard_service_ = true;
107 bool scripting_enum_parameters_from_overrides_ = true;
108 bool scripting_enum_parameters_dynamic_ = true;
109 bool blackboard_parameters_from_overrides_ = true;
110 bool blackboard_parameters_dynamic_ = true;
111 std::map<std::string, rclcpp::ParameterValue> custom_default_parameters_;
112 std::string command_action_name_;
113 std::string clear_blackboard_service_name_;
114};
115
116} // namespace auto_apms_behavior_tree
TreeExecutorNodeOptions & setCommandActionName(const std::string &name)
Set a custom name for the command tree executor action server.
Definition options.cpp:59
TreeExecutorNodeOptions & enableScriptingEnumParameters(bool from_overrides, bool dynamic)
Configure whether the executor accepts scripting enum parameters.
Definition options.cpp:39
rclcpp::NodeOptions getROSNodeOptions() const
Get the ROS 2 node options that comply with the given options.
Definition options.cpp:71
TreeExecutorNodeOptions & enableClearBlackboardService(bool enable)
Enable or disable the clear blackboard service.
Definition options.cpp:33
TreeExecutorNodeOptions(const rclcpp::NodeOptions &ros_node_options=rclcpp::NodeOptions())
Constructor.
Definition options.cpp:22
TreeExecutorNodeOptions & enableGlobalBlackboardParameters(bool from_overrides, bool dynamic)
Configure whether the executor accepts global blackboard parameters.
Definition options.cpp:46
TreeExecutorNodeOptions & enableCommandAction(bool enable)
Enable or disable the CommandTreeExecutor action interface.
Definition options.cpp:27
TreeExecutorNodeOptions & setClearBlackboardServiceName(const std::string &name)
Set a custom name for the clear blackboard service.
Definition options.cpp:65
TreeExecutorNodeOptions & setDefaultBuildHandler(const std::string &name)
Specify a default behavior tree build handler.
Definition options.cpp:53
Powerful tooling for incorporating behavior trees for task development.
Definition behavior.hpp:32