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
80
86 TreeExecutorNodeOptions & setDefaultBuildHandler(const std::string & name);
87
95 TreeExecutorNodeOptions & setCommandActionName(const std::string & name);
96
104 TreeExecutorNodeOptions & setClearBlackboardServiceName(const std::string & name);
105
110 rclcpp::NodeOptions getROSNodeOptions() const;
111
112private:
113 friend class GenericTreeExecutorNode;
114
115 rclcpp::NodeOptions ros_node_options_;
116 bool enable_command_action_ = true;
117 bool enable_clear_blackboard_service_ = true;
118 bool scripting_enum_parameters_from_overrides_ = true;
119 bool scripting_enum_parameters_dynamic_ = true;
120 bool blackboard_parameters_from_overrides_ = true;
121 bool blackboard_parameters_dynamic_ = true;
122 bool strict_unkown_parameter_removal_ = true;
123 std::map<std::string, rclcpp::ParameterValue> custom_default_parameters_;
124 std::string command_action_name_;
125 std::string clear_blackboard_service_name_;
126};
127
128} // 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:65
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:77
TreeExecutorNodeOptions & enableClearBlackboardService(bool enable)
Enable or disable the clear blackboard service.
Definition options.cpp:33
TreeExecutorNodeOptions & enableStrictUnkownParameterRemoval(bool enable)
Enable or disable strict unkown parameter removal.
Definition options.cpp:53
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:71
TreeExecutorNodeOptions & setDefaultBuildHandler(const std::string &name)
Specify a default behavior tree build handler.
Definition options.cpp:59
Powerful tooling for incorporating behavior trees for task development.
Definition behavior.hpp:32