21 namespace std_ph = std::placeholders;
82 RCLCPP_INFO_STREAM(get_logger(),
"YieldPlugin Params: " <<
config_);
89 mob_resp_pub_ = create_publisher<carma_v2x_msgs::msg::MobilityResponse>(
"outgoing_mobility_response", 1);
90 lc_status_pub_ = create_publisher<carma_planning_msgs::msg::LaneChangeStatus>(
"cooperative_lane_change_status", 10);
95 georeference_sub_ = create_subscription<std_msgs::msg::String>(
"georeference", 10,
96 [
this](
const std_msgs::msg::String::SharedPtr msg) {
97 worker_->set_georeference_string(msg->data);
101 external_objects_sub_ = create_subscription<carma_perception_msgs::msg::ExternalObjectList>(
"external_object_predictions", 20,
102 [
this](
const carma_perception_msgs::msg::ExternalObjectList::SharedPtr msg) {
103 worker_->set_external_objects(msg->objects);
106 return CallbackReturn::SUCCESS;
110 std::shared_ptr<rmw_request_id_t> srv_header,
111 carma_planning_msgs::srv::PlanTrajectory::Request::SharedPtr req,
112 carma_planning_msgs::srv::PlanTrajectory::Response::SharedPtr resp)
114 worker_->plan_trajectory_callback(req, resp);
129#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
int consecutive_clearance_count_for_passed_obstacles_threshold
double acceleration_adjustment_factor
double yield_max_deceleration_in_ms2
double time_horizon_until_collision_to_commit_to_stop_in_s
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