15 #ifndef BEHAVIOR_TREE_PLUGIN__VEHICLE__VEHICLE_ACTION_NODE_HPP_
16 #define BEHAVIOR_TREE_PLUGIN__VEHICLE__VEHICLE_ACTION_NODE_HPP_
18 #include <behaviortree_cpp_v3/action_node.h>
27 #include <traffic_simulator_msgs/msg/behavior_parameter.hpp>
28 #include <traffic_simulator_msgs/msg/obstacle.hpp>
29 #include <traffic_simulator_msgs/msg/vehicle_parameters.hpp>
30 #include <traffic_simulator_msgs/msg/waypoints_array.hpp>
43 BT::PortsList ports = {
45 BT::InputPort<std::shared_ptr<math::geometry::CatmullRomSpline>>(
"reference_trajectory"),
46 BT::InputPort<traffic_simulator_msgs::msg::BehaviorParameter>(
"behavior_parameter"),
47 BT::InputPort<traffic_simulator_msgs::msg::VehicleParameters>(
"vehicle_parameters"),
51 for (
const auto & parent_port : parent_ports) {
52 ports.emplace(parent_port.first, parent_port.second);
61 const traffic_simulator_msgs::msg::WaypointsArray & waypoints) = 0;
67 std::unique_ptr<math::geometry::CatmullRomSubspline>
trajectory;
Definition: action_node.hpp:41
static BT::PortsList providedPorts()
Definition: action_node.hpp:75
std::optional< double > target_speed
Definition: action_node.hpp:120
Definition: vehicle_action_node.hpp:36
virtual const traffic_simulator_msgs::msg::WaypointsArray calculateWaypoints()=0
void getBlackBoardValues()
Definition: vehicle_action_node.cpp:29
static BT::PortsList providedPorts()
Definition: vehicle_action_node.hpp:41
std::shared_ptr< math::geometry::CatmullRomSpline > reference_trajectory
Definition: vehicle_action_node.hpp:66
traffic_simulator_msgs::msg::VehicleParameters vehicle_parameters
Definition: vehicle_action_node.hpp:65
auto calculateUpdatedEntityStatus(double target_speed) const -> traffic_simulator::EntityStatus
Definition: vehicle_action_node.cpp:46
std::unique_ptr< math::geometry::CatmullRomSubspline > trajectory
Definition: vehicle_action_node.hpp:67
VehicleActionNode(const std::string &name, const BT::NodeConfiguration &config)
Definition: vehicle_action_node.cpp:24
auto calculateUpdatedEntityStatusInWorldFrame(double target_speed) const -> traffic_simulator::EntityStatus
Definition: vehicle_action_node.cpp:53
traffic_simulator_msgs::msg::BehaviorParameter behavior_parameter
Definition: vehicle_action_node.hpp:64
virtual const std::optional< traffic_simulator_msgs::msg::Obstacle > calculateObstacle(const traffic_simulator_msgs::msg::WaypointsArray &waypoints)=0
~VehicleActionNode() override=default
Definition: action_node.hpp:39
traffic_simulator_msgs::msg::EntityStatus EntityStatus
Definition: entity_status.hpp:25
std::string string
Definition: junit5.hpp:26