AutoAPMS
Streamlining behaviors in ROS 2
Loading...
Searching...
No Matches
definitions.hpp
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#pragma once
16
17#include <map>
18#include <string>
19#include <vector>
20
21#include "behaviortree_cpp/basic_types.h"
22#include "behaviortree_cpp/bt_factory.h"
23
28
34{
35
36using Tree = BT::Tree;
37using TreeBlackboard = BT::Blackboard;
38using TreeBlackboardSharedPtr = std::shared_ptr<TreeBlackboard>;
39using TreeConstructor = std::function<Tree(TreeBlackboardSharedPtr)>;
40
45{
47 std::string port_name;
49 std::string port_type;
51 std::string port_default;
55 std::string port_description;
57 BT::PortDirection port_direction;
58};
59
64{
66 BT::NodeType type;
68 std::vector<NodePortInfo> port_infos;
69};
70
72using NodeModelMap = std::map<std::string, NodeModel>;
73
74} // namespace auto_apms_behavior_tree
Powerful tooling for incorporating behavior trees for task development.
Definition behavior.hpp:32
std::map< std::string, NodeModel > NodeModelMap
Mapping of node registration names and their implementation details.
Data structure encapsulating the information of all ports implemented by a behavior tree node.
BT::NodeType type
Abstract type of the node.
std::vector< NodePortInfo > port_infos
Vector of implementation details for each data port.
Implementation details of a single data port.
std::string port_default
Default value of the port encoded as string.
bool port_has_default
Flag whether the port implements a default value or not.
std::string port_description
Description of the port.
BT::PortDirection port_direction
Direction of the port.
std::string port_type
String representation of the C++ type given to the port.
std::string port_name
Name of the port.