scenario_simulator_v2 C++ API
follow_lane_action.hpp
Go to the documentation of this file.
1 // Copyright 2015 TIER IV, Inc. All rights reserved.
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 #ifndef BEHAVIOR_TREE_PLUGIN__PEDESTRIAN__FOLLOW_LANE_ACTION_HPP_
16 #define BEHAVIOR_TREE_PLUGIN__PEDESTRIAN__FOLLOW_LANE_ACTION_HPP_
17 
18 #include <behaviortree_cpp_v3/behavior_tree.h>
19 #include <behaviortree_cpp_v3/bt_factory.h>
20 
22 #include <memory>
23 #include <string>
25 #include <traffic_simulator_msgs/msg/entity_status.hpp>
26 #include <vector>
27 
28 namespace entity_behavior
29 {
30 namespace pedestrian
31 {
33 {
34 public:
35  FollowLaneAction(const std::string & name, const BT::NodeConfiguration & config);
36  BT::NodeStatus tick() override;
37  void getBlackBoardValues();
38  static BT::PortsList providedPorts()
39  {
40  BT::PortsList ports = {};
41  BT::PortsList parent_ports = entity_behavior::PedestrianActionNode::providedPorts();
42  for (const auto & parent_port : parent_ports) {
43  ports.emplace(parent_port.first, parent_port.second);
44  }
45  return ports;
46  }
47 };
48 } // namespace pedestrian
49 } // namespace entity_behavior
50 
51 #endif // BEHAVIOR_TREE_PLUGIN__PEDESTRIAN__FOLLOW_LANE_ACTION_HPP_
Definition: pedestrian_action_node.hpp:28
static BT::PortsList providedPorts()
Definition: pedestrian_action_node.hpp:32
Definition: follow_lane_action.hpp:33
static BT::PortsList providedPorts()
Definition: follow_lane_action.hpp:38
BT::NodeStatus tick() override
Definition: follow_lane_action.cpp:33
void getBlackBoardValues()
Definition: follow_lane_action.cpp:31
FollowLaneAction(const std::string &name, const BT::NodeConfiguration &config)
Definition: follow_lane_action.cpp:26
Definition: action_node.hpp:39
std::string string
Definition: junit5.hpp:26