scenario_simulator_v2 C++ API
pedestrian_action_node.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__PEDESTRIAN_ACTION_NODE_HPP_
16 #define BEHAVIOR_TREE_PLUGIN__PEDESTRIAN__PEDESTRIAN_ACTION_NODE_HPP_
17 
18 #include <behaviortree_cpp_v3/action_node.h>
19 
21 #include <memory>
22 #include <string>
23 #include <traffic_simulator_msgs/msg/pedestrian_parameters.hpp>
24 
25 namespace entity_behavior
26 {
27 enum class SeeAroundMode { blind, aware };
29 {
30 public:
31  PedestrianActionNode(const std::string & name, const BT::NodeConfiguration & config);
32  void getBlackBoardValues() override;
33  static BT::PortsList providedPorts()
34  {
35  // clang-format off
36  return BT::PortsList({
37  BT::InputPort<traffic_simulator_msgs::msg::PedestrianParameters>("pedestrian_parameters"),
39  // clang-format on
40  }
41  traffic_simulator_msgs::msg::PedestrianParameters pedestrian_parameters;
42  auto calculateUpdatedEntityStatusInWorldFrame(double target_speed) const
44  auto calculateUpdatedEntityStatus(double target_speed) const -> traffic_simulator::EntityStatus;
45 
46 protected:
48 };
49 } // namespace entity_behavior
50 
51 #endif // BEHAVIOR_TREE_PLUGIN__PEDESTRIAN__PEDESTRIAN_ACTION_NODE_HPP_
Definition: action_node.hpp:47
static BT::PortsList providedPorts()
Definition: action_node.hpp:78
Definition: pedestrian_action_node.hpp:29
PedestrianActionNode(const std::string &name, const BT::NodeConfiguration &config)
Definition: pedestrian_action_node.cpp:24
static BT::PortsList providedPorts()
Definition: pedestrian_action_node.hpp:33
void getBlackBoardValues() override
Definition: pedestrian_action_node.cpp:30
traffic_simulator_msgs::msg::PedestrianParameters pedestrian_parameters
Definition: pedestrian_action_node.hpp:41
SeeAroundMode should_respect_see_around
Definition: pedestrian_action_node.hpp:47
auto calculateUpdatedEntityStatus(double target_speed) const -> traffic_simulator::EntityStatus
Definition: pedestrian_action_node.cpp:52
auto calculateUpdatedEntityStatusInWorldFrame(double target_speed) const -> traffic_simulator::EntityStatus
Definition: pedestrian_action_node.cpp:59
Definition: action_node.hpp:43
SeeAroundMode
Definition: pedestrian_action_node.hpp:27
traffic_simulator_msgs::msg::EntityStatus EntityStatus
Definition: entity_status.hpp:25
std::string string
Definition: junit5.hpp:26