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

Functions

double getManeuverEndSpeed (const carma_planning_msgs::msg::Maneuver &mvr)
 Anonymous function to extract maneuver end speed which cannot be obtained with GET_MANEUVER_PROPERY calls due to it missing in stop and wait plugin. More...
 

Function Documentation

◆ getManeuverEndSpeed()

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

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

Definition at line 27 of file approaching_emergency_vehicle_plugin_node.cpp.

27 {
28 switch(mvr.type) {
29 case carma_planning_msgs::msg::Maneuver::LANE_FOLLOWING:
30 return mvr.lane_following_maneuver.end_speed;
31 case carma_planning_msgs::msg::Maneuver::LANE_CHANGE:
32 return mvr.lane_change_maneuver.end_speed;
33 case carma_planning_msgs::msg::Maneuver::STOP_AND_WAIT:
34 return 0;
35 default:
36 return 0;
37 }
38 }

Referenced by approaching_emergency_vehicle_plugin::ApproachingEmergencyVehiclePlugin::generateApproachingErvStatusMessage(), approaching_emergency_vehicle_plugin::ApproachingEmergencyVehiclePlugin::generateMoveOverManeuverPlan(), approaching_emergency_vehicle_plugin::ApproachingEmergencyVehiclePlugin::generateReducedSpeedLaneFollowingeManeuverPlan(), and approaching_emergency_vehicle_plugin::ApproachingEmergencyVehiclePlugin::getManeuverDuration().

Here is the caller graph for this function: