15 #ifndef BEHAVIOR_TREE_PLUGIN__VEHICLE__BEHAVIOR_TREE_HPP_
16 #define BEHAVIOR_TREE_PLUGIN__VEHICLE__BEHAVIOR_TREE_HPP_
18 #include <behaviortree_cpp_v3/bt_factory.h>
19 #include <behaviortree_cpp_v3/loggers/bt_cout_logger.h>
23 #include <geometry_msgs/msg/point.hpp>
30 #include <traffic_simulator_msgs/msg/entity_status.hpp>
31 #include <traffic_simulator_msgs/msg/obstacle.hpp>
32 #include <traffic_simulator_msgs/msg/waypoints_array.hpp>
34 #include <visualization_msgs/msg/marker_array.hpp>
41 auto update(
const double current_time,
const double step_time) ->
void override;
42 void configure(
const rclcpp::Logger & logger)
override;
50 #define DEFINE_GETTER_SETTER(NAME, TYPE) \
51 TYPE get##NAME() override { return tree_.rootBlackboard()->get<TYPE>(get##NAME##Key()); } \
52 void set##NAME(const TYPE & value) override \
54 tree_.rootBlackboard()->set<TYPE>(get##NAME##Key(), value); \
58 DEFINE_GETTER_SETTER(CanonicalizedEntityStatus, std::shared_ptr<traffic_simulator::CanonicalizedEntityStatus>)
78 #undef DEFINE_GETTER_SETTER
81 auto tickOnce(
const double current_time,
const double step_time) -> BT::NodeStatus;
82 auto createBehaviorTree(
const std::string & format_path) -> BT::Tree;
83 BT::BehaviorTreeFactory factory_;
85 std::unique_ptr<behavior_tree_plugin::LoggingEvent> logging_event_ptr_;
86 std::unique_ptr<behavior_tree_plugin::ResetRequestEvent> reset_request_event_ptr_;
Definition: behavior_plugin_base.hpp:40
Definition: behavior_tree.hpp:39
const std::string & getCurrentAction() const override
Definition: behavior_tree.cpp:140
auto getBehaviorParameter() -> traffic_simulator_msgs::msg::BehaviorParameter override
Definition: behavior_tree.cpp:101
auto setBehaviorParameter(const traffic_simulator_msgs::msg::BehaviorParameter &) -> void override
Definition: behavior_tree.cpp:107
void configure(const rclcpp::Logger &logger) override
Definition: behavior_tree.cpp:36
auto update(const double current_time, const double step_time) -> void override
Definition: behavior_tree.cpp:145
Definition: action_node.hpp:39
std::unordered_map< std::string, traffic_simulator::CanonicalizedEntityStatus > EntityStatusDict
Definition: behavior_plugin_base.hpp:37
Definition: bounding_box.hpp:32
Request
Definition: behavior.hpp:25
std::string string
Definition: junit5.hpp:26
#define DEFINE_GETTER_SETTER(NAME, TYPE)
Definition: behavior_tree.hpp:50