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::anonymous_namespace{sci_strategic_plugin.cpp} Namespace Reference

Functions

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 calls due to it missing in stop and wait plugin. More...
 

Function Documentation

◆ getManeuverEndSpeed()

double sci_strategic_plugin::anonymous_namespace{sci_strategic_plugin.cpp}::getManeuverEndSpeed ( const carma_planning_msgs::msg::Maneuver &  mvr)

Anonymous function to extract maneuver end speed which can not be optained with GET_MANEUVER_PROPERY calls due to it missing in stop and wait plugin.

Parameters
mvrinput maneuver
Returns
end speed

Definition at line 47 of file sci_strategic_plugin.cpp.

48 {
49 switch(mvr.type)
50 {
51 case carma_planning_msgs::msg::Maneuver::LANE_FOLLOWING:
52 return mvr.lane_following_maneuver.end_speed;
53 case carma_planning_msgs::msg::Maneuver::LANE_CHANGE:
54 return mvr.lane_change_maneuver.end_speed;
55 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_STRAIGHT:
56 return mvr.intersection_transit_straight_maneuver.end_speed;
57 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_LEFT_TURN:
58 return mvr.intersection_transit_left_turn_maneuver.end_speed;
59 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_RIGHT_TURN:
60 return mvr.intersection_transit_right_turn_maneuver.end_speed;
61 case carma_planning_msgs::msg::Maneuver::STOP_AND_WAIT:
62 return 0;
63 default:
64 RCLCPP_ERROR_STREAM(rclcpp::get_logger("sci_strategic_plugin"), "Requested end speed from unsupported maneuver type");
65 return 0;
66 }
67 }

Referenced by sci_strategic_plugin::SCIStrategicPlugin::extractInitialState().

Here is the caller graph for this function: