21 namespace std_ph = std::placeholders;
80 RCLCPP_INFO_STREAM(get_logger(),
"YieldPlugin Params: " <<
config_);
87 mob_resp_pub_ = create_publisher<carma_v2x_msgs::msg::MobilityResponse>(
"outgoing_mobility_response", 1);
88 lc_status_pub_ = create_publisher<carma_planning_msgs::msg::LaneChangeStatus>(
"cooperative_lane_change_status", 10);
93 georeference_sub_ = create_subscription<std_msgs::msg::String>(
"georeference", 10,
94 [
this](
const std_msgs::msg::String::SharedPtr msg) {
95 worker_->set_georeference_string(msg->data);
99 external_objects_sub_ = create_subscription<carma_perception_msgs::msg::ExternalObjectList>(
"external_object_predictions", 20,
100 [
this](
const carma_perception_msgs::msg::ExternalObjectList::SharedPtr msg) {
101 worker_->set_external_objects(msg->objects);
104 return CallbackReturn::SUCCESS;
108 std::shared_ptr<rmw_request_id_t> srv_header,
109 carma_planning_msgs::srv::PlanTrajectory::Request::SharedPtr req,
110 carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr resp)
112 worker_->plan_trajectory_callback(req, resp);
127#include "rclcpp_components/register_node_macro.hpp"
virtual carma_wm::WorldModelConstPtr get_world_model() final
Method to return the default world model provided as a convience by this base class If this method or...
ROS node for the YieldPlugin.
YieldPluginNode(const rclcpp::NodeOptions &)
Node constructor.
rclcpp_lifecycle::LifecyclePublisher< carma_planning_msgs::msg::LaneChangeStatus >::SharedPtr lc_status_pub_
rclcpp::Subscription< carma_v2x_msgs::msg::MobilityRequest >::SharedPtr mob_request_sub_
YieldPluginConfig config_
void plan_trajectory_callback(std::shared_ptr< rmw_request_id_t > srv_header, carma_planning_msgs::srv::PlanTrajectory::Request::SharedPtr req, carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr resp) override
Extending class provided callback which should return a planned trajectory based on the provided traj...
rclcpp::Subscription< carma_v2x_msgs::msg::BSM >::SharedPtr bsm_sub_
std::shared_ptr< YieldPlugin > worker_
rclcpp::Subscription< carma_perception_msgs::msg::ExternalObjectList >::SharedPtr external_objects_sub_
std::string get_version_id() override final
Returns the version id of this plugin.
bool get_availability() override
Get the availability status of this plugin based on the current operating environment....
carma_ros2_utils::CallbackReturn on_configure_plugin()
Method which is triggered when this plugin is moved from the UNCONFIGURED to INACTIVE states....
rclcpp_lifecycle::LifecyclePublisher< carma_v2x_msgs::msg::MobilityResponse >::SharedPtr mob_resp_pub_
rclcpp::Subscription< std_msgs::msg::String >::SharedPtr georeference_sub_
void mobilityrequest_cb(const carma_v2x_msgs::msg::MobilityRequest::UniquePtr msg)
callback for mobility request
void bsm_cb(const carma_v2x_msgs::msg::BSM::UniquePtr msg)
callback for bsm message
Stuct containing the algorithm configuration values for the YieldPluginConfig.
bool always_accept_mobility_request
double max_stop_speed_in_ms
double collision_check_radius_in_m
bool enable_adjustable_gap
double speed_moving_average_window_size
double acceleration_adjustment_factor
int consecutive_clearance_count_for_obstacles_threshold
double yield_max_deceleration_in_ms2
double intervehicle_collision_distance_in_m
double obstacle_zero_speed_threshold_in_ms
double on_route_vehicle_collision_horizon_in_s
bool enable_cooperative_behavior
double min_obj_avoidance_plan_time_in_s
double minimum_safety_gap_in_meters
int acceptable_passed_timesteps
double safety_collision_time_gap_in_s