Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
sci_strategic_plugin::SCIStrategicPlugin Class Reference

#include <sci_strategic_plugin.hpp>

Inheritance diagram for sci_strategic_plugin::SCIStrategicPlugin:
Inheritance graph
Collaboration diagram for sci_strategic_plugin::SCIStrategicPlugin:
Collaboration graph

Classes

struct  VehicleState
 Struct representing a vehicle state for the purposes of planning. More...
 

Public Member Functions

 SCIStrategicPlugin (const rclcpp::NodeOptions &)
 Default constructor for RouteFollowingPlugin class. More...
 
void publishMobilityOperation ()
 Method to publish mobility operation msgs at a fixed rate of 10hz if approaching intersection. More...
 
void plan_maneuvers_callback (std::shared_ptr< rmw_request_id_t > srv_header, carma_planning_msgs::srv::PlanManeuvers::Request::SharedPtr req, carma_planning_msgs::srv::PlanManeuvers::Response::SharedPtr resp)
 Service callback for arbitrator maneuver planning. More...
 
rcl_interfaces::msg::SetParametersResult parameter_update_callback (const std::vector< rclcpp::Parameter > &parameters)
 Callback for dynamic parameter updates. More...
 
void mobilityOperationCb (carma_v2x_msgs::msg::MobilityOperation::UniquePtr msg)
 callback function for mobility operation More...
 
void currentPoseCb (geometry_msgs::msg::PoseStamped::UniquePtr msg)
 callback function for current pose More...
 
carma_planning_msgs::msg::Maneuver composeLaneFollowingManeuverMessage (int case_num, double start_dist, double end_dist, double start_speed, double target_speed, rclcpp::Time start_time, double time_to_stop, std::vector< lanelet::Id > lane_ids)
 Compose a lane keeping maneuver message based on input params. More...
 
carma_planning_msgs::msg::Maneuver composeStopAndWaitManeuverMessage (double current_dist, double end_dist, double start_speed, const lanelet::Id &starting_lane_id, const lanelet::Id &ending_lane_id, double stopping_accel, rclcpp::Time start_time, rclcpp::Time end_time) const
 
carma_planning_msgs::msg::Maneuver composeIntersectionTransitMessage (double start_dist, double end_dist, double start_speed, double target_speed, rclcpp::Time start_time, rclcpp::Time end_time, TurnDirection turn_direction, const lanelet::Id &starting_lane_id, const lanelet::Id &ending_lane_id) const
 
VehicleState extractInitialState (const carma_planning_msgs::srv::PlanManeuvers::Request &req) const
 Helper method to extract the initial vehicle state from the planning request method based on if the prior_plan was set or not. More...
 
std::vector< lanelet::ConstLanelet > getLaneletsBetweenWithException (double start_downtrack, double end_downtrack, bool shortest_path_only=false, bool bounds_inclusive=true) const
 Helper method which calls carma_wm::WorldModel::getLaneletsBetween(start_downtrack, end_downtrack, shortest_path_only, bounds_inclusive) and throws and exception if the returned list of lanelets is empty. See the referenced method for additional details on parameters. More...
 
double findSpeedLimit (const lanelet::ConstLanelet &llt) const
 Given a Lanelet, find it's associated Speed Limit. More...
 
int determine_speed_profile_case (double stop_dist, double current_speed, double schedule_stop_time, double speed_limit)
 Determine the speed profile case fpr approaching an intersection. More...
 
double calc_speed_before_decel (double stop_time, double stop_dist, double current_speed) const
 calculate the speed, right before the car starts to decelerate for stopping More...
 
void parseStrategyParams (const std::string &strategy_params)
 parse strategy parameters More...
 
double calcEstimatedStopTime (double stop_dist, double current_speed) const
 calculate the time vehicle will stop with optimal decelarion More...
 
void caseOneSpeedProfile (double speed_before_decel, double current_speed, double stop_time, std::vector< double > *float_metadata_list) const
 Determine the desired speed profile parameters for Case 1. More...
 
void caseTwoSpeedProfile (double stop_dist, double speed_before_decel, double current_speed, double stop_time, double speed_limit, std::vector< double > *float_metadata_list) const
 Determine the desired speed profile parameters for Case 2. More...
 
double caseThreeSpeedProfile (double stop_dist, double current_speed, double stop_time) const
 Determine the desired speed profile parameters for Case 3. More...
 
carma_v2x_msgs::msg::MobilityOperation generateMobilityOperation ()
 Generates Mobility Operation messages. More...
 
void BSMCb (carma_v2x_msgs::msg::BSM::UniquePtr msg)
 BSM callback function. More...
 
void guidance_state_cb (const carma_planning_msgs::msg::GuidanceState::UniquePtr msg)
 Callback for the Guidance State. More...
 
TurnDirection getTurnDirectionAtIntersection (std::vector< lanelet::ConstLanelet > lanelets_list)
 Determine the turn direction at intersection. More...
 
carma_ros2_utils::CallbackReturn on_configure_plugin ()
 Method which is triggered when this plugin is moved from the UNCONFIGURED to INACTIVE states. This method should be used to load parameters and is required to be implemented. More...
 
carma_ros2_utils::CallbackReturn on_activate_plugin ()
 Method which is triggered when this plugin is moved from the INACTIVE to ACTIVE states. This method should be used to prepare for future callbacks for plugin's capabilites. More...
 
bool get_availability ()
 Get the availability status of this plugin based on the current operating environment. Method must be overriden by extending classes. More...
 
std::string get_version_id ()
 Returns the version id of this plugin. More...
 
- Public Member Functions inherited from carma_guidance_plugins::StrategicPlugin
 StrategicPlugin (const rclcpp::NodeOptions &)
 StrategicPlugin constructor. More...
 
virtual ~StrategicPlugin ()=default
 Virtual destructor for safe deletion. More...
 
virtual void plan_maneuvers_callback (std::shared_ptr< rmw_request_id_t > srv_header, carma_planning_msgs::srv::PlanManeuvers::Request::SharedPtr req, carma_planning_msgs::srv::PlanManeuvers::Response::SharedPtr resp)=0
 Extending class provided callback which should return a planned trajectory based on the provided trajectory planning request. More...
 
std::string get_capability () override
 Get the capability string representing this plugins capabilities Method must be overriden by extending classes. Expectation is that abstract plugin type parent classes will provide a default implementation. More...
 
uint8_t get_type () override final
 Returns the type of this plugin according to the carma_planning_msgs::Plugin type enum. Extending classes for the specific type should override this method. More...
 
carma_ros2_utils::CallbackReturn handle_on_configure (const rclcpp_lifecycle::State &) override final
 
carma_ros2_utils::CallbackReturn handle_on_activate (const rclcpp_lifecycle::State &) override final
 
carma_ros2_utils::CallbackReturn handle_on_deactivate (const rclcpp_lifecycle::State &) override final
 
carma_ros2_utils::CallbackReturn handle_on_cleanup (const rclcpp_lifecycle::State &) override final
 
carma_ros2_utils::CallbackReturn handle_on_shutdown (const rclcpp_lifecycle::State &) override final
 
carma_ros2_utils::CallbackReturn handle_on_error (const rclcpp_lifecycle::State &, const std::string &exception_string) override final
 
- Public Member Functions inherited from carma_guidance_plugins::PluginBaseNode
 PluginBaseNode (const rclcpp::NodeOptions &)
 PluginBaseNode constructor. More...
 
virtual ~PluginBaseNode ()=default
 Virtual destructor for safe deletion. More...
 
virtual std::shared_ptr< carma_wm::WMListenerget_world_model_listener () final
 Method to return the default world model listener provided as a convience by this base class If this method or get_world_model() are not called then the world model remains uninitialized and will not create unnecessary subscriptions. More...
 
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 get_world_model_listener() are not called then the world model remains uninitialized and will not create unnecessary subscriptions. More...
 
virtual bool get_activation_status () final
 Returns the activation status of this plugin. The plugins API callbacks will only be triggered when this method returns true. More...
 
virtual uint8_t get_type ()
 Returns the type of this plugin according to the carma_planning_msgs::Plugin type enum. Extending classes for the specific type should override this method. More...
 
std::string get_plugin_name_and_ns () const
 Return the name of this plugin with namespace. NOTE: If only the name of the plugin is required, use get_plugin_name() More...
 
std::string get_plugin_name () const
 Return the name of this plugin. More...
 
virtual bool get_availability ()=0
 Get the availability status of this plugin based on the current operating environment. Method must be overriden by extending classes. More...
 
virtual std::string get_capability ()=0
 Get the capability string representing this plugins capabilities Method must be overriden by extending classes. Expectation is that abstract plugin type parent classes will provide a default implementation. More...
 
virtual std::string get_version_id ()=0
 Returns the version id of this plugin. More...
 
virtual carma_ros2_utils::CallbackReturn on_configure_plugin ()=0
 Method which is triggered when this plugin is moved from the UNCONFIGURED to INACTIVE states. This method should be used to load parameters and is required to be implemented. More...
 
virtual carma_ros2_utils::CallbackReturn on_activate_plugin ()
 Method which is triggered when this plugin is moved from the INACTIVE to ACTIVE states. This method should be used to prepare for future callbacks for plugin's capabilites. More...
 
virtual carma_ros2_utils::CallbackReturn on_deactivate_plugin ()
 Method which is triggered when this plugin is moved from the ACTIVE to INACTIVE states. This method should be used to disable any functionality which should cease execution when plugin is inactive. More...
 
virtual carma_ros2_utils::CallbackReturn on_cleanup_plugin ()
 Method which is triggered when this plugin is moved from the INACTIVE to UNCONFIGURED states. This method should be used to fully reset the plugin such that a future call to on_configure_plugin would leave the plugin in a fresh state as though just launched. More...
 
virtual carma_ros2_utils::CallbackReturn on_shutdown_plugin ()
 Method which is triggered when this plugin is moved from any state to FINALIZED This method should be used to generate any shutdown logs or final cleanup. More...
 
virtual carma_ros2_utils::CallbackReturn on_error_plugin (const std::string &exception_string)
 Method which is triggered when an unhandled exception occurs in this plugin This method should be used to cleanup such that the plugin could be moved to UNCONFIGURED state if possible. More...
 
carma_ros2_utils::CallbackReturn handle_on_configure (const rclcpp_lifecycle::State &) override
 
carma_ros2_utils::CallbackReturn handle_on_activate (const rclcpp_lifecycle::State &) override
 
carma_ros2_utils::CallbackReturn handle_on_deactivate (const rclcpp_lifecycle::State &) override
 
carma_ros2_utils::CallbackReturn handle_on_cleanup (const rclcpp_lifecycle::State &) override
 
carma_ros2_utils::CallbackReturn handle_on_shutdown (const rclcpp_lifecycle::State &) override
 
carma_ros2_utils::CallbackReturn handle_on_error (const rclcpp_lifecycle::State &, const std::string &exception_string) override
 
 FRIEND_TEST (carma_guidance_plugins_test, connections_test)
 

Public Attributes

unsigned long long street_msg_timestamp_ = 0
 
unsigned long long scheduled_stop_time_ = 0
 
unsigned long long scheduled_enter_time_ = 0
 
unsigned long long scheduled_depart_time_ = 0
 
uint32_t scheduled_departure_position_ = std::numeric_limits<uint32_t>::max()
 
bool is_allowed_int_ = false
 
TurnDirection intersection_turn_direction_ = TurnDirection::Straight
 
bool vehicle_engaged_ = false
 
double speed_limit_ = 100.0
 
double current_downtrack_ = 0.0
 
bool approaching_stop_controlled_interction_ = false
 
std::string bsm_id_ = "default_bsm_id"
 
uint8_t bsm_msg_count_ = 0
 
uint16_t bsm_sec_mark_ = 0
 

Private Member Functions

carma_wm::WorldModelConstPtr get_wm ()
 
void set_wm (carma_wm::WorldModelConstPtr new_wm)
 
 FRIEND_TEST (SCIStrategicPluginTest, findSpeedLimit)
 
 FRIEND_TEST (SCIStrategicPluginTest, moboperationcbtest)
 
 FRIEND_TEST (SCIStrategicPluginTest, parseStrategyParamstest)
 
 FRIEND_TEST (SCIStrategicPluginTest, calcEstimatedStopTimetest)
 
 FRIEND_TEST (SCIStrategicPluginTest, calc_speed_before_deceltest)
 
 FRIEND_TEST (SCIStrategicPluginTest, determine_speed_profile_casetest)
 
 FRIEND_TEST (SCIStrategicPluginTest, caseOneSpeedProfiletest)
 
 FRIEND_TEST (SCIStrategicPluginTest, caseTwoSpeedProfiletest)
 
 FRIEND_TEST (SCIStrategicPluginTest, caseThreeSpeedProfiletest)
 
 FRIEND_TEST (SCIStrategicPluginTest, testIntersectionturndirection)
 
 FRIEND_TEST (SCIStrategicPluginTest, DISABLED_maneuvercbtest)
 
 FRIEND_TEST (SCIStrategicPluginTest, maneuvercbtest)
 

Private Attributes

carma_ros2_utils::SubPtr< carma_v2x_msgs::msg::MobilityOperation > mob_operation_sub_
 
carma_ros2_utils::SubPtr< geometry_msgs::msg::PoseStamped > current_pose_sub_
 
carma_ros2_utils::SubPtr< carma_v2x_msgs::msg::BSM > bsm_sub_
 
carma_ros2_utils::PubPtr< carma_v2x_msgs::msg::MobilityOperation > mobility_operation_pub_
 
carma_ros2_utils::SubPtr< carma_planning_msgs::msg::GuidanceState > guidance_state_sub_
 
bool guidance_engaged_ = false
 
rclcpp::TimerBase::SharedPtr mob_op_pub_timer_
 
carma_wm::WorldModelConstPtr wm_
 World Model pointer. More...
 
SCIStrategicPluginConfig config_
 Config containing configurable algorithm parameters. More...
 
boost::optional< double > intersection_speed_
 Cache variables for storing the current intersection state between state machine transitions. More...
 
boost::optional< double > intersection_end_downtrack_
 
std::string stop_controlled_intersection_strategy_ = "Carma/stop_controlled_intersection"
 
std::string previous_strategy_params_ = ""
 

Detailed Description

Definition at line 48 of file sci_strategic_plugin.hpp.

Constructor & Destructor Documentation

◆ SCIStrategicPlugin()

sci_strategic_plugin::SCIStrategicPlugin::SCIStrategicPlugin ( const rclcpp::NodeOptions &  options)
explicit

Default constructor for RouteFollowingPlugin class.

Definition at line 70 of file sci_strategic_plugin.cpp.

71 : carma_guidance_plugins::StrategicPlugin(options), config_(SCIStrategicPluginConfig())
72{
73 // Declare parameters
74 config_.vehicle_decel_limit_multiplier = declare_parameter<double>("vehicle_decel_limit_multiplier", config_.vehicle_decel_limit_multiplier);
75 config_.vehicle_accel_limit_multiplier = declare_parameter<double>("vehicle_accel_limit_multiplier", config_.vehicle_accel_limit_multiplier);
76 config_.stop_line_buffer = declare_parameter<double>("stop_line_buffer", config_.stop_line_buffer);
77 config_.delta_t = declare_parameter<double>("delta_t", config_.delta_t);
78 config_.min_gap = declare_parameter<double>("min_gap", config_.min_gap);
79 config_.reaction_time = declare_parameter<double>("reaction_time", config_.reaction_time);
80 config_.intersection_exit_zone_length = declare_parameter<double>("intersection_exit_zone_length", config_.intersection_exit_zone_length);
81 config_.strategic_plugin_name = declare_parameter<std::string>("strategic_plugin_name", config_.strategic_plugin_name);
82 config_.lane_following_plugin_name = declare_parameter<std::string>("lane_following_plugin_name", config_.lane_following_plugin_name);
83 config_.intersection_transit_plugin_name = declare_parameter<std::string>("intersection_transit_plugin_name", config_.intersection_transit_plugin_name);
84 config_.vehicle_id = declare_parameter<std::string>("vehicle_id", config_.vehicle_id);
85 config_.veh_length = declare_parameter<double>("vehicle_length", config_.veh_length);
86 config_.vehicle_decel_limit = declare_parameter<double>("vehicle_deceleration_limit", config_.vehicle_decel_limit);
87 config_.vehicle_accel_limit = declare_parameter<double>("vehicle_acceleration_limit", config_.vehicle_accel_limit);
88
89};
StrategicPlugin base class which can be extended by user provided plugins which wish to implement the...
SCIStrategicPluginConfig config_
Config containing configurable algorithm parameters.
std::string strategic_plugin_name
The name to use for this plugin during comminications with the arbitrator.
std::string lane_following_plugin_name
The name of the tactical plugin to use for Lane Following trajectory planning.
double vehicle_accel_limit_multiplier
A multiplier to apply to the maximum allowable vehicle acceleration limit so we plan under our capabi...
double vehicle_decel_limit_multiplier
A multiplier to apply to the maximum allowable vehicle deceleration limit so we plan under our capabi...
double vehicle_decel_limit
The maximum allowable vehicle deceleration limit in m/s.
std::string vehicle_id
License plate of the vehicle.
std::string intersection_transit_plugin_name
The name of the plugin to use for intersection transit trajectory planning.
double stop_line_buffer
A buffer infront of the stopping location which will still be considered a valid stop.
double vehicle_accel_limit
The maximum allowable vehicle acceleration limit in m/s.

References config_, sci_strategic_plugin::SCIStrategicPluginConfig::delta_t, sci_strategic_plugin::SCIStrategicPluginConfig::intersection_exit_zone_length, sci_strategic_plugin::SCIStrategicPluginConfig::intersection_transit_plugin_name, sci_strategic_plugin::SCIStrategicPluginConfig::lane_following_plugin_name, sci_strategic_plugin::SCIStrategicPluginConfig::min_gap, sci_strategic_plugin::SCIStrategicPluginConfig::reaction_time, sci_strategic_plugin::SCIStrategicPluginConfig::stop_line_buffer, sci_strategic_plugin::SCIStrategicPluginConfig::strategic_plugin_name, sci_strategic_plugin::SCIStrategicPluginConfig::veh_length, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit_multiplier, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit_multiplier, and sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_id.

Member Function Documentation

◆ BSMCb()

void sci_strategic_plugin::SCIStrategicPlugin::BSMCb ( carma_v2x_msgs::msg::BSM::UniquePtr  msg)

BSM callback function.

Definition at line 218 of file sci_strategic_plugin.cpp.

219{
220 std::vector<uint8_t> bsm_id_vec = msg->core_data.id;
221 bsm_id_ = BSMHelper::BSMHelper::bsmIDtoString(bsm_id_vec);
222 bsm_msg_count_ = msg->core_data.msg_count;
223 bsm_sec_mark_ = msg->core_data.sec_mark;
224}

References bsm_id_, bsm_msg_count_, and bsm_sec_mark_.

Referenced by on_configure_plugin().

Here is the caller graph for this function:

◆ calc_speed_before_decel()

double sci_strategic_plugin::SCIStrategicPlugin::calc_speed_before_decel ( double  stop_time,
double  stop_dist,
double  current_speed 
) const

calculate the speed, right before the car starts to decelerate for stopping

Parameters
stop_timetime the vehicle must stop
stop_distdistance to stop line
current_speedcurrent speed of vehicle
Returns
speed value

Definition at line 315 of file sci_strategic_plugin.cpp.

316{
317 double speed_before_decel = 0;
318
320 double desired_deceleration = -1 * config_.vehicle_decel_limit * config_.vehicle_decel_limit_multiplier;
321
322 double sqr_term = sqrt(pow(1 - (desired_acceleration/desired_deceleration), 2) * pow(stop_dist/stop_time, 2)
323 + (1 - (desired_acceleration/desired_deceleration))*(current_speed*current_speed - 2*current_speed*stop_dist/stop_time));
324
325 speed_before_decel = (stop_dist/stop_time) + sqr_term/(1 - (desired_acceleration/desired_deceleration));
326
327 return speed_before_decel;
328}

References config_, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit_multiplier, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit, and sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit_multiplier.

Referenced by composeLaneFollowingManeuverMessage(), and determine_speed_profile_case().

Here is the caller graph for this function:

◆ calcEstimatedStopTime()

double sci_strategic_plugin::SCIStrategicPlugin::calcEstimatedStopTime ( double  stop_dist,
double  current_speed 
) const

calculate the time vehicle will stop with optimal decelarion

Parameters
stop_distdistance to stop line
current_speedcurrent speed of vehicle
Returns
the time vehicle will stop with optimal decelarion

Definition at line 307 of file sci_strategic_plugin.cpp.

308{
309
310 double t_stop = 0;
311 t_stop = 2*stop_dist/current_speed;
312 return t_stop;
313}

Referenced by determine_speed_profile_case().

Here is the caller graph for this function:

◆ caseOneSpeedProfile()

void sci_strategic_plugin::SCIStrategicPlugin::caseOneSpeedProfile ( double  speed_before_decel,
double  current_speed,
double  stop_time,
std::vector< double > *  float_metadata_list 
) const

Determine the desired speed profile parameters for Case 1.

Parameters
speed_before_decelvehicle speed before it starts to decelerate
current_speedcurrent speed of vehicle
stop_timetime duration to stop in s
float_metadata_listmetadata vector for storing speed profile parameters

Definition at line 652 of file sci_strategic_plugin.cpp.

654{
656 double desired_deceleration = -1 * config_.vehicle_decel_limit * config_.vehicle_decel_limit_multiplier;
657
658 // Equations obtained from TSMO UC 1 Algorithm draft doc
659 double a_acc = ((1 - desired_acceleration/desired_deceleration)*speed_before_decel - current_speed)/stop_time;
660 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case one a_acc: " << a_acc);
661 a_acc = std::min(a_acc, desired_acceleration);
662 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Used Case one a_acc: " << a_acc);
663
664 double a_dec = ((desired_deceleration - desired_acceleration)*speed_before_decel - desired_deceleration * current_speed)/(desired_acceleration * stop_time);
665 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case one a_dec: " << a_dec);
666 a_dec = std::max(a_dec, desired_deceleration);
667 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Used Case one a_dec: " << a_dec);
668
669 double t_acc = (speed_before_decel - current_speed)/a_acc;
670 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case one t_acc: " << t_acc);
671 double t_dec = -speed_before_decel/a_dec; // a_dec is negative so a - is used to make the t_dec positive.
672 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case one t_dec: " << t_dec);
673 float_metadata_list->push_back(a_acc);
674 float_metadata_list->push_back(a_dec);
675 float_metadata_list->push_back(t_acc);
676 float_metadata_list->push_back(t_dec);
677 float_metadata_list->push_back(speed_before_decel);
678}

References config_, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit_multiplier, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit, and sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit_multiplier.

Referenced by composeLaneFollowingManeuverMessage().

Here is the caller graph for this function:

◆ caseThreeSpeedProfile()

double sci_strategic_plugin::SCIStrategicPlugin::caseThreeSpeedProfile ( double  stop_dist,
double  current_speed,
double  stop_time 
) const

Determine the desired speed profile parameters for Case 3.

Parameters
stop_distdistance to stop line
current_speedcurrent speed of vehicle
stop_timetime duration to stop in s
Returns
deceleration value for case three

Definition at line 724 of file sci_strategic_plugin.cpp.

725{
726 double a_dec = (2*stop_dist - current_speed*(stop_time + config_.delta_t))/(stop_time * config_.delta_t);
727 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case three a_dec: " << a_dec);
728 return a_dec;
729}

References config_, and sci_strategic_plugin::SCIStrategicPluginConfig::delta_t.

Referenced by plan_maneuvers_callback().

Here is the caller graph for this function:

◆ caseTwoSpeedProfile()

void sci_strategic_plugin::SCIStrategicPlugin::caseTwoSpeedProfile ( double  stop_dist,
double  speed_before_decel,
double  current_speed,
double  stop_time,
double  speed_limit,
std::vector< double > *  float_metadata_list 
) const

Determine the desired speed profile parameters for Case 2.

Parameters
stop_distdistance to stop line
speed_before_decelvehicle speed before it starts to decelerate
current_speedcurrent speed of vehicle
stop_timetime duration to stop in s
float_metadata_listmetadata vector for storing speed profile parameters

Definition at line 680 of file sci_strategic_plugin.cpp.

683{
685 double desired_deceleration = -1 * config_.vehicle_decel_limit * config_.vehicle_decel_limit_multiplier;
686
687 if (speed_before_decel > speed_limit)
688 {
689 speed_before_decel = speed_limit;
690 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case two speed_before_decel: " << speed_before_decel);
691 }
692
693 double t_c_nom = 2*stop_dist * ((1 - desired_acceleration/desired_deceleration)*speed_limit - current_speed) -
694 stop_time * ((1 - desired_acceleration/desired_deceleration)*pow(speed_limit,2) - pow(current_speed, 2));
695 double t_c_den = pow(speed_limit - current_speed, 2) - (desired_acceleration/desired_deceleration) * pow(speed_limit, 2);
696 double t_cruise = t_c_nom / t_c_den;
697 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case two t_cruise: " << t_cruise);
698
699 // Equations obtained from TSMO UC 1 Algorithm draft doc
700 double a_acc = ((1 - desired_acceleration/desired_deceleration)*speed_limit - current_speed)/(stop_time - t_cruise);
701 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case two a_acc: " << a_acc);
702 a_acc = std::min(desired_acceleration, std::abs(a_acc));
703 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Used Case two a_acc: " << a_acc);
704
705 double a_dec = ((desired_deceleration - desired_acceleration)*speed_limit - desired_deceleration * current_speed)/(desired_acceleration*(stop_time - t_cruise));
706 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case two a_dec: " << a_dec);
707 a_dec = -1*std::min(desired_deceleration, std::abs(a_dec));
708 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Used Case two a_dec: " << a_dec);
709
710 double t_acc = (speed_limit - current_speed)/a_acc;
711 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case two t_acc: " << t_acc);
712 double t_dec = -speed_limit/a_dec; // a_dec is negative so a - is used to make the t_dec positive.
713 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Case two t_dec: " << t_dec);
714
715 float_metadata_list->push_back(a_acc);
716 float_metadata_list->push_back(a_dec);
717 float_metadata_list->push_back(t_acc);
718 float_metadata_list->push_back(t_dec);
719 float_metadata_list->push_back(t_cruise);
720 float_metadata_list->push_back(speed_before_decel);
721
722}

References config_, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit_multiplier, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit, and sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit_multiplier.

Referenced by composeLaneFollowingManeuverMessage().

Here is the caller graph for this function:

◆ composeIntersectionTransitMessage()

carma_planning_msgs::msg::Maneuver sci_strategic_plugin::SCIStrategicPlugin::composeIntersectionTransitMessage ( double  start_dist,
double  end_dist,
double  start_speed,
double  target_speed,
rclcpp::Time  start_time,
rclcpp::Time  end_time,
TurnDirection  turn_direction,
const lanelet::Id &  starting_lane_id,
const lanelet::Id &  ending_lane_id 
) const

Definition at line 858 of file sci_strategic_plugin.cpp.

864{
865 carma_planning_msgs::msg::Maneuver maneuver_msg;
866 if (turn_direction == TurnDirection::Left)
867 {
868 maneuver_msg.type = carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_LEFT_TURN;
869 maneuver_msg.intersection_transit_left_turn_maneuver.parameters.planning_strategic_plugin =
871 maneuver_msg.intersection_transit_left_turn_maneuver.parameters.planning_tactical_plugin =
873 maneuver_msg.intersection_transit_left_turn_maneuver.parameters.presence_vector =
874 carma_planning_msgs::msg::ManeuverParameters::HAS_TACTICAL_PLUGIN;
875 maneuver_msg.intersection_transit_left_turn_maneuver.parameters.negotiation_type =
876 carma_planning_msgs::msg::ManeuverParameters::NO_NEGOTIATION;
877 maneuver_msg.intersection_transit_left_turn_maneuver.start_dist = start_dist;
878 maneuver_msg.intersection_transit_left_turn_maneuver.end_dist = end_dist;
879 maneuver_msg.intersection_transit_left_turn_maneuver.start_speed = start_speed;
880 maneuver_msg.intersection_transit_left_turn_maneuver.end_speed = target_speed;
881 maneuver_msg.intersection_transit_left_turn_maneuver.start_time = start_time;
882 maneuver_msg.intersection_transit_left_turn_maneuver.end_time = end_time;
883 maneuver_msg.intersection_transit_left_turn_maneuver.starting_lane_id = std::to_string(starting_lane_id);
884 maneuver_msg.intersection_transit_left_turn_maneuver.ending_lane_id = std::to_string(ending_lane_id);
885
886 }
887 else if (turn_direction == TurnDirection::Right)
888 {
889 maneuver_msg.type = carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_RIGHT_TURN;
890 maneuver_msg.intersection_transit_right_turn_maneuver.parameters.planning_strategic_plugin =
892 maneuver_msg.intersection_transit_right_turn_maneuver.parameters.planning_tactical_plugin =
894 maneuver_msg.intersection_transit_right_turn_maneuver.parameters.presence_vector =
895 carma_planning_msgs::msg::ManeuverParameters::HAS_TACTICAL_PLUGIN;
896 maneuver_msg.intersection_transit_right_turn_maneuver.parameters.negotiation_type =
897 carma_planning_msgs::msg::ManeuverParameters::NO_NEGOTIATION;
898 maneuver_msg.intersection_transit_right_turn_maneuver.start_dist = start_dist;
899 maneuver_msg.intersection_transit_right_turn_maneuver.end_dist = end_dist;
900 maneuver_msg.intersection_transit_right_turn_maneuver.start_speed = start_speed;
901 maneuver_msg.intersection_transit_right_turn_maneuver.end_speed = target_speed;
902 maneuver_msg.intersection_transit_right_turn_maneuver.start_time = start_time;
903 maneuver_msg.intersection_transit_right_turn_maneuver.end_time = end_time;
904 maneuver_msg.intersection_transit_right_turn_maneuver.starting_lane_id = std::to_string(starting_lane_id);
905 maneuver_msg.intersection_transit_right_turn_maneuver.ending_lane_id = std::to_string(ending_lane_id);
906
907 }
908 else
909 {
910 maneuver_msg.type = carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_STRAIGHT;
911 maneuver_msg.intersection_transit_straight_maneuver.parameters.planning_strategic_plugin =
913 maneuver_msg.intersection_transit_straight_maneuver.parameters.planning_tactical_plugin =
915 maneuver_msg.intersection_transit_straight_maneuver.parameters.presence_vector =
916 carma_planning_msgs::msg::ManeuverParameters::HAS_TACTICAL_PLUGIN;
917 maneuver_msg.intersection_transit_straight_maneuver.parameters.negotiation_type =
918 carma_planning_msgs::msg::ManeuverParameters::NO_NEGOTIATION;
919 maneuver_msg.intersection_transit_straight_maneuver.start_dist = start_dist;
920 maneuver_msg.intersection_transit_straight_maneuver.end_dist = end_dist;
921 maneuver_msg.intersection_transit_straight_maneuver.start_speed = start_speed;
922 maneuver_msg.intersection_transit_straight_maneuver.end_speed = target_speed;
923 maneuver_msg.intersection_transit_straight_maneuver.start_time = start_time;
924 maneuver_msg.intersection_transit_straight_maneuver.end_time = end_time;
925 maneuver_msg.intersection_transit_straight_maneuver.starting_lane_id = std::to_string(starting_lane_id);
926 maneuver_msg.intersection_transit_straight_maneuver.ending_lane_id = std::to_string(ending_lane_id);
927
928 }
929
930
931
932 // Start time and end time for maneuver are assigned in updateTimeProgress
933
934 RCLCPP_INFO_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Creating IntersectionTransitManeuver start dist: " << start_dist << " end dist: " << end_dist
935 << " From lanelet: " << starting_lane_id
936 << " to lanelet: " << ending_lane_id);
937
938 return maneuver_msg;
939}
auto to_string(const UtmZone &zone) -> std::string
Definition: utm_zone.cpp:21

References config_, sci_strategic_plugin::SCIStrategicPluginConfig::intersection_transit_plugin_name, sci_strategic_plugin::Left, sci_strategic_plugin::Right, sci_strategic_plugin::SCIStrategicPluginConfig::strategic_plugin_name, and carma_cooperative_perception::to_string().

Referenced by plan_maneuvers_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ composeLaneFollowingManeuverMessage()

carma_planning_msgs::msg::Maneuver sci_strategic_plugin::SCIStrategicPlugin::composeLaneFollowingManeuverMessage ( int  case_num,
double  start_dist,
double  end_dist,
double  start_speed,
double  target_speed,
rclcpp::Time  start_time,
double  time_to_stop,
std::vector< lanelet::Id >  lane_ids 
)

Compose a lane keeping maneuver message based on input params.

Parameters
start_distStart downtrack distance of the current maneuver
end_distEnd downtrack distance of the current maneuver
start_speedStart speed of the current maneuver
target_speedTarget speed pf the current maneuver, usually it is the lanelet speed limit
start_timeThe starting time of the maneuver
end_timeThe ending time of the maneuver
lane_idsList of lanelet IDs that the current maneuver traverses. Message expects these to be contiguous and end to end
Returns
A lane keeping maneuver message which is ready to be published

Definition at line 731 of file sci_strategic_plugin.cpp.

735{
736 carma_planning_msgs::msg::Maneuver maneuver_msg;
737 carma_planning_msgs::msg::Maneuver empty_msg;
738 maneuver_msg.type = carma_planning_msgs::msg::Maneuver::LANE_FOLLOWING;
739 maneuver_msg.lane_following_maneuver.parameters.planning_strategic_plugin = config_.strategic_plugin_name;
740 maneuver_msg.lane_following_maneuver.parameters.presence_vector =
741 carma_planning_msgs::msg::ManeuverParameters::HAS_TACTICAL_PLUGIN | carma_planning_msgs::msg::ManeuverParameters::HAS_INT_META_DATA |
742 carma_planning_msgs::msg::ManeuverParameters::HAS_FLOAT_META_DATA | carma_planning_msgs::msg::ManeuverParameters::HAS_STRING_META_DATA;
743 maneuver_msg.lane_following_maneuver.parameters.negotiation_type = carma_planning_msgs::msg::ManeuverParameters::NO_NEGOTIATION;
744 maneuver_msg.lane_following_maneuver.parameters.planning_tactical_plugin = config_.lane_following_plugin_name;
745 maneuver_msg.lane_following_maneuver.start_dist = start_dist;
746 maneuver_msg.lane_following_maneuver.end_dist = end_dist;
747 maneuver_msg.lane_following_maneuver.start_speed = start_speed;
748 maneuver_msg.lane_following_maneuver.end_speed = target_speed;
749 maneuver_msg.lane_following_maneuver.start_time = start_time;
750 maneuver_msg.lane_following_maneuver.end_time = start_time + rclcpp::Duration(time_to_stop*1e9);
751 maneuver_msg.lane_following_maneuver.lane_ids =
752 lanelet::utils::transform(lane_ids, [](auto id) { return std::to_string(id); });
753
754 RCLCPP_INFO_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Creating lane follow start dist: " << start_dist << " end dist: " << end_dist);
755
756 std::vector<double> float_metadata_list;
757
758 double speed_before_decel = calc_speed_before_decel(time_to_stop, end_dist-start_dist, start_speed);
759
760 switch(case_num)
761 {
762 case 1:
763 caseOneSpeedProfile(speed_before_decel, start_speed, time_to_stop, &float_metadata_list);
764 break;
765 case 2:
766 caseTwoSpeedProfile(end_dist-start_dist, speed_before_decel, start_speed, time_to_stop, speed_limit_, &float_metadata_list);
767 break;
768 default:
769 return empty_msg;
770 }
771
772
773 maneuver_msg.lane_following_maneuver.parameters.int_valued_meta_data.push_back(case_num);
774 maneuver_msg.lane_following_maneuver.parameters.string_valued_meta_data.push_back(stop_controlled_intersection_strategy_);
775 maneuver_msg.lane_following_maneuver.parameters.float_valued_meta_data = float_metadata_list;
776
777 return maneuver_msg;
778}
double calc_speed_before_decel(double stop_time, double stop_dist, double current_speed) const
calculate the speed, right before the car starts to decelerate for stopping
void caseOneSpeedProfile(double speed_before_decel, double current_speed, double stop_time, std::vector< double > *float_metadata_list) const
Determine the desired speed profile parameters for Case 1.
void caseTwoSpeedProfile(double stop_dist, double speed_before_decel, double current_speed, double stop_time, double speed_limit, std::vector< double > *float_metadata_list) const
Determine the desired speed profile parameters for Case 2.

References calc_speed_before_decel(), caseOneSpeedProfile(), caseTwoSpeedProfile(), config_, sci_strategic_plugin::SCIStrategicPluginConfig::lane_following_plugin_name, speed_limit_, stop_controlled_intersection_strategy_, sci_strategic_plugin::SCIStrategicPluginConfig::strategic_plugin_name, and carma_cooperative_perception::to_string().

Referenced by plan_maneuvers_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ composeStopAndWaitManeuverMessage()

carma_planning_msgs::msg::Maneuver sci_strategic_plugin::SCIStrategicPlugin::composeStopAndWaitManeuverMessage ( double  current_dist,
double  end_dist,
double  start_speed,
const lanelet::Id &  starting_lane_id,
const lanelet::Id &  ending_lane_id,
double  stopping_accel,
rclcpp::Time  start_time,
rclcpp::Time  end_time 
) const

Definition at line 829 of file sci_strategic_plugin.cpp.

834{
835 carma_planning_msgs::msg::Maneuver maneuver_msg;
836 maneuver_msg.type = carma_planning_msgs::msg::Maneuver::STOP_AND_WAIT;
837 maneuver_msg.stop_and_wait_maneuver.parameters.planning_strategic_plugin = config_.strategic_plugin_name;
838 maneuver_msg.stop_and_wait_maneuver.parameters.presence_vector =
839 carma_planning_msgs::msg::ManeuverParameters::HAS_TACTICAL_PLUGIN | carma_planning_msgs::msg::ManeuverParameters::HAS_FLOAT_META_DATA;
840 maneuver_msg.stop_and_wait_maneuver.parameters.negotiation_type = carma_planning_msgs::msg::ManeuverParameters::NO_NEGOTIATION;
841 maneuver_msg.stop_and_wait_maneuver.parameters.planning_tactical_plugin = config_.stop_and_wait_plugin_name;
842 maneuver_msg.stop_and_wait_maneuver.start_speed = start_speed;
843 maneuver_msg.stop_and_wait_maneuver.start_dist = current_dist;
844 maneuver_msg.stop_and_wait_maneuver.end_dist = end_dist;
845 maneuver_msg.stop_and_wait_maneuver.start_time = start_time;
846 maneuver_msg.stop_and_wait_maneuver.end_time = end_time;
847 maneuver_msg.stop_and_wait_maneuver.starting_lane_id = std::to_string(starting_lane_id);
848 maneuver_msg.stop_and_wait_maneuver.ending_lane_id = std::to_string(ending_lane_id);
849 // Set the meta data for the stop location buffer
850 maneuver_msg.stop_and_wait_maneuver.parameters.float_valued_meta_data.push_back(config_.stop_line_buffer);
851 maneuver_msg.stop_and_wait_maneuver.parameters.float_valued_meta_data.push_back(stopping_accel);
852
853 RCLCPP_INFO_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Creating stop and wait start dist: " << current_dist << " end dist: " << end_dist);
854
855 return maneuver_msg;
856}
std::string stop_and_wait_plugin_name
The name of the plugin to use for stop and wait trajectory planning.

References config_, sci_strategic_plugin::SCIStrategicPluginConfig::stop_and_wait_plugin_name, sci_strategic_plugin::SCIStrategicPluginConfig::stop_line_buffer, sci_strategic_plugin::SCIStrategicPluginConfig::strategic_plugin_name, and carma_cooperative_perception::to_string().

Referenced by plan_maneuvers_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ currentPoseCb()

void sci_strategic_plugin::SCIStrategicPlugin::currentPoseCb ( geometry_msgs::msg::PoseStamped::UniquePtr  msg)

callback function for current pose

Parameters
msginput pose stamed msg

Definition at line 231 of file sci_strategic_plugin.cpp.

232{
233 geometry_msgs::msg::PoseStamped pose_msg = geometry_msgs::msg::PoseStamped(*msg.get());
235 {
236 lanelet::BasicPoint2d current_loc(pose_msg.pose.position.x, pose_msg.pose.position.y);
237 current_downtrack_ = wm_->routeTrackPos(current_loc).downtrack;
238 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Downtrack from current pose: " << current_downtrack_);
239 }
240
241
242}
carma_wm::WorldModelConstPtr wm_
World Model pointer.

References current_downtrack_, vehicle_engaged_, and wm_.

Referenced by on_configure_plugin().

Here is the caller graph for this function:

◆ determine_speed_profile_case()

int sci_strategic_plugin::SCIStrategicPlugin::determine_speed_profile_case ( double  stop_dist,
double  current_speed,
double  schedule_stop_time,
double  speed_limit 
)

Determine the speed profile case fpr approaching an intersection.

Parameters
stop_distdistance to stop line
current_speedcurrent speed of vehicle
schedule_stop_timescheduled stop time
speed_limitspeed limit
Returns
integer case number

Definition at line 280 of file sci_strategic_plugin.cpp.

281{
282 int case_num = 0;
283 double estimated_stop_time = calcEstimatedStopTime(stop_dist, current_speed);
284
285 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "estimated_stop_time: " << estimated_stop_time);
286 if (estimated_stop_time < schedule_stop_time)
287 {
288 case_num = 3;
289 }
290 else
291 {
292 double speed_before_stop = calc_speed_before_decel(estimated_stop_time, stop_dist, current_speed);
293 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "speed_before_stop: " << speed_before_stop);
294 if (speed_before_stop < speed_limit)
295 {
296 case_num = 1;
297 }
298 else
299 {
300 case_num = 2;
301 }
302 }
303
304 return case_num;
305}
double calcEstimatedStopTime(double stop_dist, double current_speed) const
calculate the time vehicle will stop with optimal decelarion

References calc_speed_before_decel(), and calcEstimatedStopTime().

Referenced by plan_maneuvers_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ extractInitialState()

SCIStrategicPlugin::VehicleState sci_strategic_plugin::SCIStrategicPlugin::extractInitialState ( const carma_planning_msgs::srv::PlanManeuvers::Request &  req) const

Helper method to extract the initial vehicle state from the planning request method based on if the prior_plan was set or not.

Parameters
reqThe maneuver planning request to extract the vehicle state from
Returns
The extracted VehicleState

Definition at line 170 of file sci_strategic_plugin.cpp.

171{
172 VehicleState state;
173 if (!req.prior_plan.maneuvers.empty())
174 {
175 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Provided with initial plan...");
176 state.stamp = GET_MANEUVER_PROPERTY(req.prior_plan.maneuvers.back(), end_time);
177 state.speed = getManeuverEndSpeed(req.prior_plan.maneuvers.back());
178 state.downtrack = GET_MANEUVER_PROPERTY(req.prior_plan.maneuvers.back(), end_dist);
179 state.lane_id = getLaneletsBetweenWithException(state.downtrack, state.downtrack, true).front().id();
180 }
181 else
182 {
183 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "No initial plan provided...");
184
185 state.stamp = req.header.stamp;
186 state.downtrack = req.veh_downtrack;
187 state.speed = req.veh_logitudinal_velocity;
188 state.lane_id = stoi(req.veh_lane_id);
189 }
190
191 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "state.stamp: " << std::to_string(state.stamp.seconds()));
192 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "state.downtrack : " << state.downtrack );
193 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "state.speed: " << state.speed);
194 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "state.lane_id: " << state.lane_id);
195
196 return state;
197}
std::vector< lanelet::ConstLanelet > getLaneletsBetweenWithException(double start_downtrack, double end_downtrack, bool shortest_path_only=false, bool bounds_inclusive=true) const
Helper method which calls carma_wm::WorldModel::getLaneletsBetween(start_downtrack,...
double getManeuverEndSpeed(const carma_planning_msgs::msg::Maneuver &mvr)
Anonymous function to extract maneuver end speed which can not be optained with GET_MANEUVER_PROPERY ...
#define GET_MANEUVER_PROPERTY(mvr, property)

References sci_strategic_plugin::SCIStrategicPlugin::VehicleState::downtrack, GET_MANEUVER_PROPERTY, getLaneletsBetweenWithException(), sci_strategic_plugin::anonymous_namespace{sci_strategic_plugin.cpp}::getManeuverEndSpeed(), sci_strategic_plugin::SCIStrategicPlugin::VehicleState::lane_id, sci_strategic_plugin::SCIStrategicPlugin::VehicleState::speed, sci_strategic_plugin::SCIStrategicPlugin::VehicleState::stamp, and carma_cooperative_perception::to_string().

Referenced by plan_maneuvers_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findSpeedLimit()

double sci_strategic_plugin::SCIStrategicPlugin::findSpeedLimit ( const lanelet::ConstLanelet &  llt) const

Given a Lanelet, find it's associated Speed Limit.

Parameters
lltConstant Lanelet object
Exceptions
std::invalid_argumentif the speed limit could not be retrieved
Returns
value of speed limit in mps

Definition at line 781 of file sci_strategic_plugin.cpp.

782{
783 lanelet::Optional<carma_wm::TrafficRulesConstPtr> traffic_rules = wm_->getTrafficRules();
784 if (traffic_rules)
785 {
786 return (*traffic_rules)->speedLimit(llt).speedLimit.value();
787 }
788 else
789 {
790 throw std::invalid_argument("Valid traffic rules object could not be built");
791 }
792}

References wm_.

Referenced by plan_maneuvers_callback().

Here is the caller graph for this function:

◆ FRIEND_TEST() [1/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
calc_speed_before_deceltest   
)
private

◆ FRIEND_TEST() [2/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
calcEstimatedStopTimetest   
)
private

◆ FRIEND_TEST() [3/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
caseOneSpeedProfiletest   
)
private

◆ FRIEND_TEST() [4/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
caseThreeSpeedProfiletest   
)
private

◆ FRIEND_TEST() [5/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
caseTwoSpeedProfiletest   
)
private

◆ FRIEND_TEST() [6/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
determine_speed_profile_casetest   
)
private

◆ FRIEND_TEST() [7/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
DISABLED_maneuvercbtest   
)
private

◆ FRIEND_TEST() [8/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
findSpeedLimit   
)
private

◆ FRIEND_TEST() [9/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
maneuvercbtest   
)
private

◆ FRIEND_TEST() [10/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
moboperationcbtest   
)
private

◆ FRIEND_TEST() [11/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
parseStrategyParamstest   
)
private

◆ FRIEND_TEST() [12/12]

sci_strategic_plugin::SCIStrategicPlugin::FRIEND_TEST ( SCIStrategicPluginTest  ,
testIntersectionturndirection   
)
private

◆ generateMobilityOperation()

carma_v2x_msgs::msg::MobilityOperation sci_strategic_plugin::SCIStrategicPlugin::generateMobilityOperation ( )

Generates Mobility Operation messages.

Returns
mobility operation msg for status and intent

Definition at line 794 of file sci_strategic_plugin.cpp.

795{
796 carma_v2x_msgs::msg::MobilityOperation mo_;
797 mo_.m_header.timestamp = now().nanoseconds()/1000000;
798 mo_.m_header.sender_id = config_.vehicle_id;
799 mo_.m_header.sender_bsm_id = bsm_id_;
801
802 double vehicle_acceleration_limit_ = config_.vehicle_accel_limit * config_.vehicle_accel_limit_multiplier;
803 double vehicle_deceleration_limit_ = -1 * config_.vehicle_decel_limit * config_.vehicle_decel_limit_multiplier;
804
805 std::string intersection_turn_direction = "straight";
806 if (intersection_turn_direction_ == TurnDirection::Right) intersection_turn_direction = "right";
807 if (intersection_turn_direction_ == TurnDirection::Left) intersection_turn_direction = "left";
808
809
810 mo_.strategy_params = "access: " + std::to_string(is_allowed_int_) + ", max_accel: " + std::to_string(vehicle_acceleration_limit_) +
811 ", max_decel: " + std::to_string(vehicle_deceleration_limit_) + ", react_time: " + std::to_string(config_.reaction_time) +
812 ", min_gap: " + std::to_string(config_.min_gap) + ", depart_pos: " + std::to_string(scheduled_departure_position_) +
813 ", turn_direction: " + intersection_turn_direction + ", msg_count: " + std::to_string(bsm_msg_count_) + ", sec_mark: " + std::to_string(bsm_sec_mark_);
814
815
816 return mo_;
817}

References bsm_id_, bsm_msg_count_, bsm_sec_mark_, config_, intersection_turn_direction_, is_allowed_int_, sci_strategic_plugin::Left, sci_strategic_plugin::SCIStrategicPluginConfig::min_gap, sci_strategic_plugin::SCIStrategicPluginConfig::reaction_time, sci_strategic_plugin::Right, scheduled_departure_position_, stop_controlled_intersection_strategy_, carma_cooperative_perception::to_string(), sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit_multiplier, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit_multiplier, and sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_id.

Referenced by publishMobilityOperation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_availability()

bool sci_strategic_plugin::SCIStrategicPlugin::get_availability ( )
virtual

Get the availability status of this plugin based on the current operating environment. Method must be overriden by extending classes.

Returns
This method should return true if the plugin's current understanding of the world means it would be capable of planning or executing its capability.

Implements carma_guidance_plugins::PluginBaseNode.

Definition at line 941 of file sci_strategic_plugin.cpp.

942{
943 return true;
944}

◆ get_version_id()

std::string sci_strategic_plugin::SCIStrategicPlugin::get_version_id ( )
virtual

Returns the version id of this plugin.

Returns
The version id represented as a string

Implements carma_guidance_plugins::PluginBaseNode.

Definition at line 946 of file sci_strategic_plugin.cpp.

947{
948 return "v1.0";
949}

◆ get_wm()

carma_wm::WorldModelConstPtr sci_strategic_plugin::SCIStrategicPlugin::get_wm ( )
inlineprivate

Definition at line 347 of file sci_strategic_plugin.hpp.

347{ return wm_; }

References wm_.

◆ getLaneletsBetweenWithException()

std::vector< lanelet::ConstLanelet > sci_strategic_plugin::SCIStrategicPlugin::getLaneletsBetweenWithException ( double  start_downtrack,
double  end_downtrack,
bool  shortest_path_only = false,
bool  bounds_inclusive = true 
) const

Helper method which calls carma_wm::WorldModel::getLaneletsBetween(start_downtrack, end_downtrack, shortest_path_only, bounds_inclusive) and throws and exception if the returned list of lanelets is empty. See the referenced method for additional details on parameters.

Definition at line 331 of file sci_strategic_plugin.cpp.

335{
336 std::vector<lanelet::ConstLanelet> crossed_lanelets =
337 wm_->getLaneletsBetween(start_downtrack, end_downtrack, shortest_path_only, bounds_inclusive);
338
339 if (crossed_lanelets.empty())
340 {
341 throw std::invalid_argument("getLaneletsBetweenWithException called but inputs do not cross any lanelets going "
342 "from: " +
343 std::to_string(start_downtrack) + " to: " + std::to_string(end_downtrack));
344 }
345
346 return crossed_lanelets;
347}

References carma_cooperative_perception::to_string(), and wm_.

Referenced by extractInitialState(), and plan_maneuvers_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTurnDirectionAtIntersection()

TurnDirection sci_strategic_plugin::SCIStrategicPlugin::getTurnDirectionAtIntersection ( std::vector< lanelet::ConstLanelet >  lanelets_list)

Determine the turn direction at intersection.

Parameters
lanelets_listList of lanelets crossed around the intersection area
Returns
turn direction in format of straight, left, right

Definition at line 622 of file sci_strategic_plugin.cpp.

623{
624 TurnDirection turn_direction = TurnDirection::Straight;
625 for (auto l:lanelets_list)
626 {
627 if(l.hasAttribute("turn_direction")) {
628 std::string direction_attribute = l.attribute("turn_direction").value();
629 if (direction_attribute == "right")
630 {
631 turn_direction = TurnDirection::Right;
632 break;
633 }
634 else if (direction_attribute == "left")
635 {
636 turn_direction = TurnDirection::Left;
637 break;
638 }
639 else turn_direction = TurnDirection::Straight;
640 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "intersection crossed lanelet direction is: " << turn_direction);
641 }
642 else
643 {
644 // if there is no attribute, assumption is straight
645 turn_direction = TurnDirection::Straight;
646 }
647
648 }
649 return turn_direction;
650}

References sci_strategic_plugin::Left, sci_strategic_plugin::Right, and sci_strategic_plugin::Straight.

Referenced by plan_maneuvers_callback().

Here is the caller graph for this function:

◆ guidance_state_cb()

void sci_strategic_plugin::SCIStrategicPlugin::guidance_state_cb ( const carma_planning_msgs::msg::GuidanceState::UniquePtr  msg)

Callback for the Guidance State.

Parameters
msgLatest GuidanceState message

Definition at line 226 of file sci_strategic_plugin.cpp.

References lightbar_manager::ENGAGED, and guidance_engaged_.

Referenced by on_configure_plugin().

Here is the caller graph for this function:

◆ mobilityOperationCb()

void sci_strategic_plugin::SCIStrategicPlugin::mobilityOperationCb ( carma_v2x_msgs::msg::MobilityOperation::UniquePtr  msg)

callback function for mobility operation

Parameters
msginput mobility operation msg

Definition at line 199 of file sci_strategic_plugin.cpp.

200{
201 if (msg->strategy == stop_controlled_intersection_strategy_)
202 {
203 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Received Schedule message with id: " << msg->m_header.plan_id);
205 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Approaching Stop Controlled Intersection: " << approaching_stop_controlled_interction_);
206
207 if (msg->m_header.recipient_id == config_.vehicle_id)
208 {
209 street_msg_timestamp_ = msg->m_header.timestamp;
210 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "street_msg_timestamp_: " << street_msg_timestamp_);
211 parseStrategyParams(msg->strategy_params);
212 }
213 previous_strategy_params_ = msg->strategy_params;
214 }
215
216}
void parseStrategyParams(const std::string &strategy_params)
parse strategy parameters

References approaching_stop_controlled_interction_, config_, parseStrategyParams(), previous_strategy_params_, stop_controlled_intersection_strategy_, street_msg_timestamp_, and sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_id.

Referenced by on_configure_plugin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_activate_plugin()

carma_ros2_utils::CallbackReturn sci_strategic_plugin::SCIStrategicPlugin::on_activate_plugin ( )
virtual

Method which is triggered when this plugin is moved from the INACTIVE to ACTIVE states. This method should be used to prepare for future callbacks for plugin's capabilites.

Returns
SUCCESS, FAILURE, or ERROR. Transition to ACTIVE will only complete on SUCCESS.

Reimplemented from carma_guidance_plugins::PluginBaseNode.

Definition at line 161 of file sci_strategic_plugin.cpp.

162{
163 mob_op_pub_timer_ = create_timer(get_clock(),
164 std::chrono::duration<double>(0.1),
166
167 return CallbackReturn::SUCCESS;
168}
rclcpp::TimerBase::SharedPtr mob_op_pub_timer_
void publishMobilityOperation()
Method to publish mobility operation msgs at a fixed rate of 10hz if approaching intersection.

References mob_op_pub_timer_, and publishMobilityOperation().

Here is the call graph for this function:

◆ on_configure_plugin()

carma_ros2_utils::CallbackReturn sci_strategic_plugin::SCIStrategicPlugin::on_configure_plugin ( )
virtual

Method which is triggered when this plugin is moved from the UNCONFIGURED to INACTIVE states. This method should be used to load parameters and is required to be implemented.

Returns
SUCCESS, FAILURE, or ERROR. Transition to INACTIVE will only complete on SUCCESS.

Implements carma_guidance_plugins::PluginBaseNode.

Definition at line 91 of file sci_strategic_plugin.cpp.

92{
93 // reset config
94 config_ = SCIStrategicPluginConfig();
95 // Declare parameters
96 get_parameter<double>("vehicle_decel_limit_multiplier", config_.vehicle_decel_limit_multiplier);
97 get_parameter<double>("vehicle_accel_limit_multiplier", config_.vehicle_accel_limit_multiplier);
98 get_parameter<double>("stop_line_buffer", config_.stop_line_buffer);
99 get_parameter<double>("delta_t", config_.delta_t);
100 get_parameter<double>("min_gap", config_.min_gap);
101 get_parameter<double>("reaction_time", config_.reaction_time);
102 get_parameter<double>("intersection_exit_zone_length", config_.intersection_exit_zone_length);
103 get_parameter<std::string>("strategic_plugin_name", config_.strategic_plugin_name);
104 get_parameter<std::string>("lane_following_plugin_name", config_.lane_following_plugin_name);
105 get_parameter<std::string>("intersection_transit_plugin_name", config_.intersection_transit_plugin_name);
106 get_parameter<std::string>("vehicle_id", config_.vehicle_id);
107 get_parameter<double>("vehicle_length", config_.veh_length);
108 get_parameter<double>("vehicle_deceleration_limit", config_.vehicle_decel_limit);
109 get_parameter<double>("vehicle_acceleration_limit", config_.vehicle_accel_limit);
110
111 // Register runtime parameter update callback
112 add_on_set_parameters_callback(std::bind(&SCIStrategicPlugin::parameter_update_callback, this, std_ph::_1));
113
114 RCLCPP_INFO_STREAM(rclcpp::get_logger("sci_strategic_plugin"),"Done loading parameters: " << config_);
115
116 // Mobility Operation Subscriber
117 mob_operation_sub_ = create_subscription<carma_v2x_msgs::msg::MobilityOperation>("incoming_mobility_operation", 1,
118 std::bind(&SCIStrategicPlugin::mobilityOperationCb,this,std_ph::_1));
119
120 // Current Pose Subscriber
121 current_pose_sub_ = create_subscription<geometry_msgs::msg::PoseStamped>("current_pose", 1,
122 std::bind(&SCIStrategicPlugin::currentPoseCb,this,std_ph::_1));
123
124 // BSM subscriber
125 bsm_sub_ = create_subscription<carma_v2x_msgs::msg::BSM>("bsm_outbound", 1,
126 std::bind(&SCIStrategicPlugin::BSMCb,this,std_ph::_1));
127
128 // Guidance State subscriber
129 guidance_state_sub_ = create_subscription<carma_planning_msgs::msg::GuidanceState>("guidance_state", 5,
130 std::bind(&SCIStrategicPlugin::guidance_state_cb, this, std::placeholders::_1));
131
132 // set world model point form wm listener
134
135 // Setup publishers
136 mobility_operation_pub_ = create_publisher<carma_v2x_msgs::msg::MobilityOperation>("outgoing_mobility_operation", 1);
137
138 // Return success if everthing initialized successfully
139 return CallbackReturn::SUCCESS;
140}
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...
void guidance_state_cb(const carma_planning_msgs::msg::GuidanceState::UniquePtr msg)
Callback for the Guidance State.
carma_ros2_utils::SubPtr< geometry_msgs::msg::PoseStamped > current_pose_sub_
void BSMCb(carma_v2x_msgs::msg::BSM::UniquePtr msg)
BSM callback function.
rcl_interfaces::msg::SetParametersResult parameter_update_callback(const std::vector< rclcpp::Parameter > &parameters)
Callback for dynamic parameter updates.
carma_ros2_utils::SubPtr< carma_planning_msgs::msg::GuidanceState > guidance_state_sub_
carma_ros2_utils::PubPtr< carma_v2x_msgs::msg::MobilityOperation > mobility_operation_pub_
void currentPoseCb(geometry_msgs::msg::PoseStamped::UniquePtr msg)
callback function for current pose
carma_ros2_utils::SubPtr< carma_v2x_msgs::msg::MobilityOperation > mob_operation_sub_
void mobilityOperationCb(carma_v2x_msgs::msg::MobilityOperation::UniquePtr msg)
callback function for mobility operation
carma_ros2_utils::SubPtr< carma_v2x_msgs::msg::BSM > bsm_sub_

References bsm_sub_, BSMCb(), config_, current_pose_sub_, currentPoseCb(), sci_strategic_plugin::SCIStrategicPluginConfig::delta_t, carma_guidance_plugins::PluginBaseNode::get_world_model(), guidance_state_cb(), guidance_state_sub_, sci_strategic_plugin::SCIStrategicPluginConfig::intersection_exit_zone_length, sci_strategic_plugin::SCIStrategicPluginConfig::intersection_transit_plugin_name, sci_strategic_plugin::SCIStrategicPluginConfig::lane_following_plugin_name, sci_strategic_plugin::SCIStrategicPluginConfig::min_gap, mob_operation_sub_, mobility_operation_pub_, mobilityOperationCb(), parameter_update_callback(), sci_strategic_plugin::SCIStrategicPluginConfig::reaction_time, sci_strategic_plugin::SCIStrategicPluginConfig::stop_line_buffer, sci_strategic_plugin::SCIStrategicPluginConfig::strategic_plugin_name, sci_strategic_plugin::SCIStrategicPluginConfig::veh_length, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit_multiplier, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit_multiplier, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_id, and wm_.

Here is the call graph for this function:

◆ parameter_update_callback()

rcl_interfaces::msg::SetParametersResult sci_strategic_plugin::SCIStrategicPlugin::parameter_update_callback ( const std::vector< rclcpp::Parameter > &  parameters)

Callback for dynamic parameter updates.

Definition at line 142 of file sci_strategic_plugin.cpp.

143{
144 auto error_double = update_params<double>({
145 {"vehicle_decel_limit_multiplier", config_.vehicle_decel_limit_multiplier},
146 {"vehicle_accel_limit_multiplier", config_.vehicle_accel_limit_multiplier},
147 {"stop_line_buffer", config_.stop_line_buffer},
148 {"delta_t", config_.delta_t},
149 {"min_gap", config_.min_gap},
150 {"reaction_time", config_.reaction_time},
151 {"intersection_exit_zone_length", config_.intersection_exit_zone_length}
152 }, parameters); // vehicle_acceleration_limit not updated as it's global param
153
154 rcl_interfaces::msg::SetParametersResult result;
155
156 result.successful = !error_double;
157
158 return result;
159}

References config_, sci_strategic_plugin::SCIStrategicPluginConfig::delta_t, sci_strategic_plugin::SCIStrategicPluginConfig::intersection_exit_zone_length, sci_strategic_plugin::SCIStrategicPluginConfig::min_gap, sci_strategic_plugin::SCIStrategicPluginConfig::reaction_time, sci_strategic_plugin::SCIStrategicPluginConfig::stop_line_buffer, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_accel_limit_multiplier, and sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit_multiplier.

Referenced by on_configure_plugin().

Here is the caller graph for this function:

◆ parseStrategyParams()

void sci_strategic_plugin::SCIStrategicPlugin::parseStrategyParams ( const std::string &  strategy_params)

parse strategy parameters

Parameters
strategy_paramsinput string of strategy params from mob op msg

Definition at line 244 of file sci_strategic_plugin.cpp.

245{
246 // sample strategy_params: "st:1634067044,et:1634067059, dt:1634067062.3256602,dp:2,,access: 0"
247 std::string params = strategy_params;
248 std::vector<std::string> inputsParams;
249 boost::algorithm::split(inputsParams, params, boost::is_any_of(","));
250
251 std::vector<std::string> st_parsed;
252 boost::algorithm::split(st_parsed, inputsParams[0], boost::is_any_of(":"));
253 scheduled_stop_time_ = std::stoull(st_parsed[1]);
254 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "scheduled_stop_time_: " << scheduled_stop_time_);
255
256 std::vector<std::string> et_parsed;
257 boost::algorithm::split(et_parsed, inputsParams[1], boost::is_any_of(":"));
258 scheduled_enter_time_ = std::stoull(et_parsed[1]);
259 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "scheduled_enter_time_: " << scheduled_enter_time_);
260
261 std::vector<std::string> dt_parsed;
262 boost::algorithm::split(dt_parsed, inputsParams[2], boost::is_any_of(":"));
263 scheduled_depart_time_ = std::stoull(dt_parsed[1]);
264 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "scheduled_depart_time_: " << scheduled_depart_time_);
265
266
267 std::vector<std::string> dp_parsed;
268 boost::algorithm::split(dp_parsed, inputsParams[3], boost::is_any_of(":"));
269 scheduled_departure_position_ = std::stoi(dp_parsed[1]);
270 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "scheduled_departure_position_: " << scheduled_departure_position_);
271
272 std::vector<std::string> access_parsed;
273 boost::algorithm::split(access_parsed, inputsParams[4], boost::is_any_of(":"));
274 int access = std::stoi(access_parsed[1]);
275 is_allowed_int_ = (access == 1);
276 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "is_allowed_int_: " << is_allowed_int_);
277
278}

References is_allowed_int_, scheduled_depart_time_, scheduled_departure_position_, scheduled_enter_time_, scheduled_stop_time_, and process_traj_logs::split.

Referenced by mobilityOperationCb().

Here is the caller graph for this function:

◆ plan_maneuvers_callback()

void sci_strategic_plugin::SCIStrategicPlugin::plan_maneuvers_callback ( std::shared_ptr< rmw_request_id_t >  srv_header,
carma_planning_msgs::srv::PlanManeuvers::Request::SharedPtr  req,
carma_planning_msgs::srv::PlanManeuvers::Response::SharedPtr  resp 
)
virtual

Service callback for arbitrator maneuver planning.

Parameters
reqPlan maneuver request
respPlan maneuver response with a list of maneuver plan
Returns
If service call successed

Implements carma_guidance_plugins::StrategicPlugin.

Definition at line 351 of file sci_strategic_plugin.cpp.

355{
356 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "In Maneuver callback...");
357 vehicle_engaged_ = true;
358
359 if (!wm_->getRoute())
360 {
361 RCLCPP_ERROR_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Could not plan maneuvers as route was not available");
362 return;
363 }
364
366 {
367 resp->new_plan.maneuvers = {};
368 RCLCPP_WARN_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Not approaching stop-controlled intersection so no maneuvers");
369 return;
370 }
371
372 bool is_empty_schedule_msg = (scheduled_depart_time_ == 0 && scheduled_stop_time_ == 0 && scheduled_enter_time_ == 0);
373 if (is_empty_schedule_msg)
374 {
375 resp->new_plan.maneuvers = {};
376 RCLCPP_WARN_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Receiving empty schedule message");
377 return;
378 }
379
380 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Planning for intersection...");
381
382 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Finding car information");
383 // Extract vehicle data from request
384 VehicleState current_state = extractInitialState(*req);
385
386 // Get current traffic light information
387 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "\n\nFinding intersection information");
388
389 auto stop_intersection_list = wm_->getIntersectionsAlongRoute({ req->veh_x, req->veh_y });
390 bool no_intersections = stop_intersection_list.empty();
391 if (no_intersections)
392 {
393 resp->new_plan.maneuvers = {};
394 RCLCPP_WARN_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "There are no stop controlled intersections in the map");
395 return;
396 }
397
398 auto nearest_stop_intersection = stop_intersection_list.front();
399
400 bool no_stop_lines = nearest_stop_intersection->stopLines().empty();
401 if (no_stop_lines)
402 {
403 resp->new_plan.maneuvers = {};
404 RCLCPP_WARN_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "There are no stop lines on the closest stop-controlled intersections in the map");
405 return;
406 }
407
408
409 // extract the intersection stop line information
410 std::vector<double> stop_lines;
411 for (auto l : nearest_stop_intersection->stopLines())
412 {
413 //TODO: temp use veh_length here until planning stack is updated with front bumper pos
414 double stop_bar_dtd = wm_->routeTrackPos(l.front().basicPoint2d()).downtrack - config_.veh_length;
415 stop_lines.push_back(stop_bar_dtd);
416 }
417 std::sort(stop_lines.begin(), stop_lines.end());
418
419 double stop_intersection_down_track = stop_lines.front();
420
421 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "stop_intersection_down_track " << stop_intersection_down_track);
422
423
424 double distance_to_stopline = stop_intersection_down_track - current_downtrack_ - config_.stop_line_buffer;
425 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "distance_to_stopline " << distance_to_stopline);
426
427 if (distance_to_stopline < -config_.intersection_exit_zone_length)
428 {
429 resp->new_plan.maneuvers = {};
430 RCLCPP_WARN_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Already passed intersection, sending empty maneuvers");
431 return;
432 }
433
434
435 double intersection_end_downtrack = stop_lines.back();
436 // Identify the lanelets of the intersection
437 std::vector<lanelet::ConstLanelet> intersection_lanelets =
438 getLaneletsBetweenWithException(stop_intersection_down_track, intersection_end_downtrack, true, true);
439
440 // find the turn direction at intersection:
441
443
444 uint32_t base_time = street_msg_timestamp_;
445
446 bool time_to_approach_int = int((scheduled_stop_time_) - (street_msg_timestamp_))>0;
447 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "time_to_approach_int " << time_to_approach_int);
448
449 carma_planning_msgs::msg::Maneuver maneuver_planned;
450
451
452 if (time_to_approach_int)
453 {
455 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "tmp " << tmp);
456 double time_to_schedule_stop = (tmp)/1000.0;
457 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "time_to_schedule_stop " << time_to_schedule_stop);
458 // Identify the lanelets which will be crossed by approach maneuvers lane follow maneuver
459 std::vector<lanelet::ConstLanelet> crossed_lanelets =
460 getLaneletsBetweenWithException(current_downtrack_, stop_intersection_down_track, true, true);
461
462 // approaching stop line
463 speed_limit_ = findSpeedLimit(crossed_lanelets.front());
464
465 // lane following to intersection
466
467 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "time_to_schedule_stop " << time_to_schedule_stop);
468
470
471
472 double safe_distance = pow(current_state.speed, 2)/(2*desired_deceleration);
473 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "safe_distance: " << safe_distance);
474
475 if (distance_to_stopline - safe_distance > config_.stop_line_buffer)
476 {
477 int case_num = determine_speed_profile_case(distance_to_stopline , current_state.speed, time_to_schedule_stop, speed_limit_);
478 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "case_num: " << case_num);
479
480 if (case_num < 3)
481 {
482 maneuver_planned = composeLaneFollowingManeuverMessage(
483 case_num, current_state.downtrack, stop_intersection_down_track, current_state.speed, 0.0,
484 current_state.stamp, time_to_schedule_stop,
485 lanelet::utils::transform(crossed_lanelets, [](const auto& ll) { return ll.id(); }));
486 resp->new_plan.maneuvers.push_back(maneuver_planned);
487 }
488 else
489 {
490 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Decelerating to stop at the intersection");
491
492 // at the stop line or decelerating to stop line
493 // stop and wait maneuver
494
495 std::vector<lanelet::ConstLanelet> crossed_lanelets =
496 getLaneletsBetweenWithException(current_downtrack_, stop_intersection_down_track, true, true);
497
498
499 double stopping_accel = caseThreeSpeedProfile(distance_to_stopline, current_state.speed, time_to_schedule_stop);
500 stopping_accel = std::max(-stopping_accel, desired_deceleration);
501 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "used deceleration for case three: " << stopping_accel);
502
503 maneuver_planned = composeStopAndWaitManeuverMessage(
504 current_state.downtrack, stop_intersection_down_track, current_state.speed, crossed_lanelets[0].id(),
505 crossed_lanelets[0].id(), stopping_accel, current_state.stamp,
506 current_state.stamp + rclcpp::Duration(time_to_schedule_stop*1e9));
507
508 resp->new_plan.maneuvers.push_back(maneuver_planned);
509
510 }
511 }
512 else
513 {
514 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Too close to the intersection, constant deceleration to stop");
515
516 maneuver_planned = composeStopAndWaitManeuverMessage(
517 current_state.downtrack, stop_intersection_down_track, current_state.speed, crossed_lanelets[0].id(),
518 crossed_lanelets[0].id(), desired_deceleration, current_state.stamp,
519 current_state.stamp + rclcpp::Duration(time_to_schedule_stop*1e9));
520 }
521 }
522
523 bool time_to_reach_stopline = int((street_msg_timestamp_) - (scheduled_stop_time_)) >= 0;
524 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "time_to_reach_stopline: " << time_to_reach_stopline);
525 bool not_time_to_intersection_traverse = int((street_msg_timestamp_) - (scheduled_enter_time_)) < 0;
526 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "not_time_to_intersection_traverse: " << not_time_to_intersection_traverse);
527 bool time_to_stop_at_stopline = (time_to_reach_stopline && not_time_to_intersection_traverse);
528 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "time_to_stop_at_stopline: " << time_to_stop_at_stopline);
529
530 if (time_to_stop_at_stopline)
531 {
532 base_time = std::max(scheduled_stop_time_, street_msg_timestamp_);
533 double stop_duration = int(scheduled_enter_time_ - base_time)/1000;
534 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "stop_duration: " << stop_duration);
535 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Planning stop and wait maneuver");
537 auto stop_line_lanelet = nearest_stop_intersection->lanelets().front();
538
539 maneuver_planned = composeStopAndWaitManeuverMessage(
540 current_state.downtrack, stop_intersection_down_track, current_state.speed, stop_line_lanelet.id(),
541 stop_line_lanelet.id(), stopping_accel, current_state.stamp,
542 current_state.stamp + rclcpp::Duration(stop_duration*1e9));
543 }
544
545 if (!is_allowed_int_)
546 {
547 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Vehicle at stop line, waiting for access to intersection");
548 // vehicle is at the intersection but it is not allowed access, so it must wait
549 // arbitrary parameters
551 double stop_duration = 999;//std::numeric_limits<double>::max();
552
553 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "current_downtrack_: " << current_downtrack_);
554 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "current state dtd: " << current_state.downtrack);
555 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "stop_intersection_down_track dtd: " << stop_intersection_down_track);
556
557 maneuver_planned = composeStopAndWaitManeuverMessage(
558 current_state.downtrack, stop_intersection_down_track, current_state.speed, current_state.lane_id,
559 current_state.lane_id, stop_acc, current_state.stamp,
560 current_state.stamp + rclcpp::Duration(stop_duration*1e9));
561
562 }
563
564 bool time_for_crossing = int((street_msg_timestamp_) - (scheduled_enter_time_)) >= 0;
565 // time to cross intersection
566
567 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "time for crossing? " << time_for_crossing);
568
569 if (time_for_crossing && is_allowed_int_)
570 {
571 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "street_msg_timestamp_ - scheduled_enter_time_ = " << street_msg_timestamp_ - scheduled_enter_time_);
572
573
574 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Vehicle is crossing the intersection");
575 // Passing the stop line
576
577 // Compose intersection transit maneuver
578 base_time = std::max(scheduled_enter_time_, street_msg_timestamp_);
579 double intersection_transit_time = (scheduled_depart_time_ - base_time)/1000;
580 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "intersection_transit_time: " << intersection_transit_time);
581
582 intersection_transit_time = config_.min_maneuver_planning_period;//std::max(intersection_transit_time, config_.min_maneuver_planning_period);
583 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "used intersection_transit_time: " << intersection_transit_time);
584 // Identify the lanelets which will be crossed by approach maneuvers lane follow maneuver
585 std::vector<lanelet::ConstLanelet> crossed_lanelets =
586 getLaneletsBetweenWithException(current_downtrack_, intersection_end_downtrack, true, true);
587
588
589 // find the turn direction at intersection:
590
592
593 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "turn direction at the intersection is: " << intersection_turn_direction_);
594
595 double intersection_speed_limit = findSpeedLimit(nearest_stop_intersection->lanelets().front());
596
597 // when passing intersection, set the flag to false
598 double end_of_intersection = std::max(config_.intersection_exit_zone_length, intersection_end_downtrack - stop_intersection_down_track);
599 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Actual length of intersection: " << intersection_end_downtrack - stop_intersection_down_track);
600 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Used length of intersection: " << end_of_intersection);
601
602 maneuver_planned = composeIntersectionTransitMessage(
603 current_state.downtrack, current_state.downtrack + end_of_intersection, current_state.speed, intersection_speed_limit,
604 current_state.stamp, rclcpp::Time(req->header.stamp) + rclcpp::Duration(intersection_transit_time*1e9), intersection_turn_direction_, crossed_lanelets.front().id(), crossed_lanelets.back().id());
605
606
607 if (distance_to_stopline < -end_of_intersection)
608 {
609 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Vehicle is out of intersection, stop planning...");
610 // once the vehicle crosses the intersection, reset the flag to stop planning and publishing status/intent
612 // once the intersection is crossed, reset turn direction
614 }
615
616 }
617 resp->new_plan.maneuvers.push_back(maneuver_planned);
618
619 return;
620}
int determine_speed_profile_case(double stop_dist, double current_speed, double schedule_stop_time, double speed_limit)
Determine the speed profile case fpr approaching an intersection.
VehicleState extractInitialState(const carma_planning_msgs::srv::PlanManeuvers::Request &req) const
Helper method to extract the initial vehicle state from the planning request method based on if the p...
TurnDirection getTurnDirectionAtIntersection(std::vector< lanelet::ConstLanelet > lanelets_list)
Determine the turn direction at intersection.
double caseThreeSpeedProfile(double stop_dist, double current_speed, double stop_time) const
Determine the desired speed profile parameters for Case 3.
carma_planning_msgs::msg::Maneuver composeIntersectionTransitMessage(double start_dist, double end_dist, double start_speed, double target_speed, rclcpp::Time start_time, rclcpp::Time end_time, TurnDirection turn_direction, const lanelet::Id &starting_lane_id, const lanelet::Id &ending_lane_id) const
double findSpeedLimit(const lanelet::ConstLanelet &llt) const
Given a Lanelet, find it's associated Speed Limit.
carma_planning_msgs::msg::Maneuver composeStopAndWaitManeuverMessage(double current_dist, double end_dist, double start_speed, const lanelet::Id &starting_lane_id, const lanelet::Id &ending_lane_id, double stopping_accel, rclcpp::Time start_time, rclcpp::Time end_time) const
carma_planning_msgs::msg::Maneuver composeLaneFollowingManeuverMessage(int case_num, double start_dist, double end_dist, double start_speed, double target_speed, rclcpp::Time start_time, double time_to_stop, std::vector< lanelet::Id > lane_ids)
Compose a lane keeping maneuver message based on input params.
double min_maneuver_planning_period
The minimum period in seconds which a maneuver plan must cover if the plugin wishes to control the wh...

References approaching_stop_controlled_interction_, caseThreeSpeedProfile(), composeIntersectionTransitMessage(), composeLaneFollowingManeuverMessage(), composeStopAndWaitManeuverMessage(), config_, current_downtrack_, determine_speed_profile_case(), sci_strategic_plugin::SCIStrategicPlugin::VehicleState::downtrack, extractInitialState(), findSpeedLimit(), getLaneletsBetweenWithException(), getTurnDirectionAtIntersection(), sci_strategic_plugin::SCIStrategicPluginConfig::intersection_exit_zone_length, intersection_turn_direction_, is_allowed_int_, sci_strategic_plugin::SCIStrategicPlugin::VehicleState::lane_id, sci_strategic_plugin::SCIStrategicPluginConfig::min_maneuver_planning_period, scheduled_depart_time_, scheduled_enter_time_, scheduled_stop_time_, sci_strategic_plugin::SCIStrategicPlugin::VehicleState::speed, speed_limit_, sci_strategic_plugin::SCIStrategicPlugin::VehicleState::stamp, sci_strategic_plugin::SCIStrategicPluginConfig::stop_line_buffer, sci_strategic_plugin::Straight, street_msg_timestamp_, sci_strategic_plugin::SCIStrategicPluginConfig::veh_length, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit, sci_strategic_plugin::SCIStrategicPluginConfig::vehicle_decel_limit_multiplier, vehicle_engaged_, and wm_.

Here is the call graph for this function:

◆ publishMobilityOperation()

void sci_strategic_plugin::SCIStrategicPlugin::publishMobilityOperation ( )

Method to publish mobility operation msgs at a fixed rate of 10hz if approaching intersection.

Definition at line 819 of file sci_strategic_plugin.cpp.

820{
822 {
823 carma_v2x_msgs::msg::MobilityOperation status_msg = generateMobilityOperation();
824 mobility_operation_pub_->publish(status_msg);
825 }
826}
carma_v2x_msgs::msg::MobilityOperation generateMobilityOperation()
Generates Mobility Operation messages.

References approaching_stop_controlled_interction_, generateMobilityOperation(), guidance_engaged_, and mobility_operation_pub_.

Referenced by on_activate_plugin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_wm()

void sci_strategic_plugin::SCIStrategicPlugin::set_wm ( carma_wm::WorldModelConstPtr  new_wm)
inlineprivate

Definition at line 348 of file sci_strategic_plugin.hpp.

348{ wm_ = new_wm; }

References wm_.

Member Data Documentation

◆ approaching_stop_controlled_interction_

bool sci_strategic_plugin::SCIStrategicPlugin::approaching_stop_controlled_interction_ = false

◆ bsm_id_

std::string sci_strategic_plugin::SCIStrategicPlugin::bsm_id_ = "default_bsm_id"

Definition at line 315 of file sci_strategic_plugin.hpp.

Referenced by BSMCb(), and generateMobilityOperation().

◆ bsm_msg_count_

uint8_t sci_strategic_plugin::SCIStrategicPlugin::bsm_msg_count_ = 0

Definition at line 316 of file sci_strategic_plugin.hpp.

Referenced by BSMCb(), and generateMobilityOperation().

◆ bsm_sec_mark_

uint16_t sci_strategic_plugin::SCIStrategicPlugin::bsm_sec_mark_ = 0

Definition at line 317 of file sci_strategic_plugin.hpp.

Referenced by BSMCb(), and generateMobilityOperation().

◆ bsm_sub_

carma_ros2_utils::SubPtr<carma_v2x_msgs::msg::BSM> sci_strategic_plugin::SCIStrategicPlugin::bsm_sub_
private

Definition at line 323 of file sci_strategic_plugin.hpp.

Referenced by on_configure_plugin().

◆ config_

◆ current_downtrack_

double sci_strategic_plugin::SCIStrategicPlugin::current_downtrack_ = 0.0

Definition at line 311 of file sci_strategic_plugin.hpp.

Referenced by currentPoseCb(), and plan_maneuvers_callback().

◆ current_pose_sub_

carma_ros2_utils::SubPtr<geometry_msgs::msg::PoseStamped> sci_strategic_plugin::SCIStrategicPlugin::current_pose_sub_
private

Definition at line 322 of file sci_strategic_plugin.hpp.

Referenced by on_configure_plugin().

◆ guidance_engaged_

bool sci_strategic_plugin::SCIStrategicPlugin::guidance_engaged_ = false
private

Definition at line 327 of file sci_strategic_plugin.hpp.

Referenced by guidance_state_cb(), and publishMobilityOperation().

◆ guidance_state_sub_

carma_ros2_utils::SubPtr<carma_planning_msgs::msg::GuidanceState> sci_strategic_plugin::SCIStrategicPlugin::guidance_state_sub_
private

Definition at line 325 of file sci_strategic_plugin.hpp.

Referenced by on_configure_plugin().

◆ intersection_end_downtrack_

boost::optional<double> sci_strategic_plugin::SCIStrategicPlugin::intersection_end_downtrack_
private

Definition at line 340 of file sci_strategic_plugin.hpp.

◆ intersection_speed_

boost::optional<double> sci_strategic_plugin::SCIStrategicPlugin::intersection_speed_
private

Cache variables for storing the current intersection state between state machine transitions.

Definition at line 339 of file sci_strategic_plugin.hpp.

◆ intersection_turn_direction_

TurnDirection sci_strategic_plugin::SCIStrategicPlugin::intersection_turn_direction_ = TurnDirection::Straight

Definition at line 304 of file sci_strategic_plugin.hpp.

Referenced by generateMobilityOperation(), and plan_maneuvers_callback().

◆ is_allowed_int_

bool sci_strategic_plugin::SCIStrategicPlugin::is_allowed_int_ = false

◆ mob_op_pub_timer_

rclcpp::TimerBase::SharedPtr sci_strategic_plugin::SCIStrategicPlugin::mob_op_pub_timer_
private

Definition at line 330 of file sci_strategic_plugin.hpp.

Referenced by on_activate_plugin().

◆ mob_operation_sub_

carma_ros2_utils::SubPtr<carma_v2x_msgs::msg::MobilityOperation> sci_strategic_plugin::SCIStrategicPlugin::mob_operation_sub_
private

Definition at line 321 of file sci_strategic_plugin.hpp.

Referenced by on_configure_plugin().

◆ mobility_operation_pub_

carma_ros2_utils::PubPtr<carma_v2x_msgs::msg::MobilityOperation> sci_strategic_plugin::SCIStrategicPlugin::mobility_operation_pub_
private

Definition at line 324 of file sci_strategic_plugin.hpp.

Referenced by on_configure_plugin(), and publishMobilityOperation().

◆ previous_strategy_params_

std::string sci_strategic_plugin::SCIStrategicPlugin::previous_strategy_params_ = ""
private

Definition at line 344 of file sci_strategic_plugin.hpp.

Referenced by mobilityOperationCb().

◆ scheduled_depart_time_

unsigned long long sci_strategic_plugin::SCIStrategicPlugin::scheduled_depart_time_ = 0

Definition at line 298 of file sci_strategic_plugin.hpp.

Referenced by parseStrategyParams(), and plan_maneuvers_callback().

◆ scheduled_departure_position_

uint32_t sci_strategic_plugin::SCIStrategicPlugin::scheduled_departure_position_ = std::numeric_limits<uint32_t>::max()

Definition at line 300 of file sci_strategic_plugin.hpp.

Referenced by generateMobilityOperation(), and parseStrategyParams().

◆ scheduled_enter_time_

unsigned long long sci_strategic_plugin::SCIStrategicPlugin::scheduled_enter_time_ = 0

Definition at line 296 of file sci_strategic_plugin.hpp.

Referenced by parseStrategyParams(), and plan_maneuvers_callback().

◆ scheduled_stop_time_

unsigned long long sci_strategic_plugin::SCIStrategicPlugin::scheduled_stop_time_ = 0

Definition at line 294 of file sci_strategic_plugin.hpp.

Referenced by parseStrategyParams(), and plan_maneuvers_callback().

◆ speed_limit_

double sci_strategic_plugin::SCIStrategicPlugin::speed_limit_ = 100.0

◆ stop_controlled_intersection_strategy_

std::string sci_strategic_plugin::SCIStrategicPlugin::stop_controlled_intersection_strategy_ = "Carma/stop_controlled_intersection"
private

◆ street_msg_timestamp_

unsigned long long sci_strategic_plugin::SCIStrategicPlugin::street_msg_timestamp_ = 0

Definition at line 292 of file sci_strategic_plugin.hpp.

Referenced by mobilityOperationCb(), and plan_maneuvers_callback().

◆ vehicle_engaged_

bool sci_strategic_plugin::SCIStrategicPlugin::vehicle_engaged_ = false

Definition at line 305 of file sci_strategic_plugin.hpp.

Referenced by currentPoseCb(), and plan_maneuvers_callback().

◆ wm_

carma_wm::WorldModelConstPtr sci_strategic_plugin::SCIStrategicPlugin::wm_
private

The documentation for this class was generated from the following files: