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 
24 #include <get_parameter/get_parameter.hpp>
25 #include <memory>
27 #include <string>
29 #include <traffic_simulator_msgs/msg/entity_status.hpp>
30 #include <vector>
31 
32 namespace entity_behavior
33 {
34 namespace pedestrian
35 {
36 enum class SeeAroundMode { blind, aware };
37 
39 {
40 public:
41  FollowLaneAction(const std::string & name, const BT::NodeConfiguration & config);
42  BT::NodeStatus tick() override;
43  void getBlackBoardValues() override;
44  static BT::PortsList providedPorts()
45  {
47  }
48  bool detectObstacleInLane(const lanelet::Ids pedestrian_lanes, const bool see_around) const;
49 
50 private:
51  SeeAroundMode should_respect_see_around;
52 };
53 } // namespace pedestrian
54 } // namespace entity_behavior
55 
56 #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:39
static BT::PortsList providedPorts()
Definition: follow_lane_action.hpp:44
BT::NodeStatus tick() override
Definition: follow_lane_action.cpp:107
FollowLaneAction(const std::string &name, const BT::NodeConfiguration &config)
Definition: follow_lane_action.cpp:26
void getBlackBoardValues() override
Definition: follow_lane_action.cpp:43
bool detectObstacleInLane(const lanelet::Ids pedestrian_lanes, const bool see_around) const
Definition: follow_lane_action.cpp:45
SeeAroundMode
Definition: follow_lane_action.hpp:36
Definition: action_node.hpp:40
std::string string
Definition: junit5.hpp:26