15 #ifndef BEHAVIOR_TREE_PLUGIN__PEDESTRIAN__BEHAVIOR_TREE_HPP_
16 #define BEHAVIOR_TREE_PLUGIN__PEDESTRIAN__BEHAVIOR_TREE_HPP_
18 #include <behaviortree_cpp_v3/bt_factory.h>
19 #include <behaviortree_cpp_v3/loggers/bt_cout_logger.h>
25 #include <geometry_msgs/msg/point.hpp>
31 #include <traffic_simulator_msgs/msg/entity_status.hpp>
33 #include <visualization_msgs/msg/marker_array.hpp>
40 auto configure(
const rclcpp::Logger & logger) ->
void override;
41 auto update(
const double current_time,
const double step_time) ->
void override;
44 #define DEFINE_GETTER_SETTER(NAME, TYPE) \
45 TYPE get##NAME() override { return tree_.rootBlackboard()->get<TYPE>(get##NAME##Key()); } \
46 void set##NAME(const TYPE & value) override \
48 tree_.rootBlackboard()->set<TYPE>(get##NAME##Key(), value); \
75 #undef DEFINE_GETTER_SETTER
78 auto tickOnce(
const double current_time,
const double step_time) -> BT::NodeStatus;
79 auto createBehaviorTree(
const std::string & format_path) -> BT::Tree;
80 BT::BehaviorTreeFactory factory_;
82 std::unique_ptr<behavior_tree_plugin::LoggingEvent> logging_event_ptr_;
83 std::unique_ptr<behavior_tree_plugin::ResetRequestEvent> reset_request_event_ptr_;
Definition: behavior_plugin_base.hpp:43
Definition: behavior_tree.hpp:38
auto update(const double current_time, const double step_time) -> void override
Definition: behavior_tree.cpp:86
auto getCurrentAction() const -> const std::string &override
Definition: behavior_tree.cpp:81
auto configure(const rclcpp::Logger &logger) -> void override
Definition: behavior_tree.cpp:27
Definition: action_node.hpp:41
std::unordered_map< std::string, traffic_simulator::CanonicalizedEntityStatus > EntityStatusDict
Definition: behavior_plugin_base.hpp:38
std::unordered_map< std::pair< std::string, std::string >, double > EuclideanDistancesMap
Definition: behavior_plugin_base.hpp:40
Definition: bounding_box.hpp:32
Definition: lanelet_wrapper.hpp:43
Request
Definition: behavior.hpp:25
traffic_simulator::lane_change::Parameter Parameter
Definition: lane_change.hpp:27
geometry_msgs::msg::Pose Pose
Definition: lanelet_wrapper.hpp:70
Definition: operators.hpp:25
std::string string
Definition: junit5.hpp:26
#define DEFINE_GETTER_SETTER(NAME, TYPE)
Definition: behavior_tree.hpp:44
class definition for the walk straight action