Carma-platform v4.11.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.
plan_delegator::anonymous_namespace{plan_delegator.cpp} Namespace Reference

Functions

void setManeuverStartingLaneletId (carma_planning_msgs::msg::Maneuver &mvr, lanelet::Id start_id)
 Anonymous function to set the starting_lane_id for all maneuver types except lane following. This maneuver parameter cannot be set with SET_MANEUVER_PROPERTY calls since it is not included in LANE_FOLLOW maneuvers. More...
 
void setManeuverEndingLaneletId (carma_planning_msgs::msg::Maneuver &mvr, lanelet::Id end_id)
 Anonymous function to set the ending_lane_id for all maneuver types except lane following. This maneuver parameter cannot be set with SET_MANEUVER_PROPERTY calls since it is not included in LANE_FOLLOW maneuvers. More...
 
std::string getManeuverStartingLaneletId (carma_planning_msgs::msg::Maneuver mvr)
 Anonymous function to get the starting lanelet id for all maneuver types except lane following. This maneuver parameters cannot be obtained with GET_MANEUVER_PROPERTY calls since they are not included in LANE_FOLLOW maneuvers. More...
 
std::string getManeuverEndingLaneletId (carma_planning_msgs::msg::Maneuver mvr)
 Anonymous function to get the ending lanelet id for all maneuver types except lane following. This maneuver parameters cannot be obtained with GET_MANEUVER_PROPERTY calls since they are not included in LANE_FOLLOW maneuvers. More...
 

Function Documentation

◆ getManeuverEndingLaneletId()

std::string plan_delegator::anonymous_namespace{plan_delegator.cpp}::getManeuverEndingLaneletId ( carma_planning_msgs::msg::Maneuver  mvr)

Anonymous function to get the ending lanelet id for all maneuver types except lane following. This maneuver parameters cannot be obtained with GET_MANEUVER_PROPERTY calls since they are not included in LANE_FOLLOW maneuvers.

Definition at line 113 of file plan_delegator.cpp.

113 {
114 switch(mvr.type) {
115 case carma_planning_msgs::msg::Maneuver::LANE_CHANGE:
116 return mvr.lane_change_maneuver.ending_lane_id;
117 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_STRAIGHT:
118 return mvr.intersection_transit_straight_maneuver.ending_lane_id;
119 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_LEFT_TURN:
120 return mvr.intersection_transit_left_turn_maneuver.ending_lane_id;
121 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_RIGHT_TURN:
122 return mvr.intersection_transit_right_turn_maneuver.ending_lane_id;
123 case carma_planning_msgs::msg::Maneuver::STOP_AND_WAIT:
124 return mvr.stop_and_wait_maneuver.ending_lane_id;
125 default:
126 throw std::invalid_argument("Maneuver type does not have starting and ending lane ids");
127 }
128 }

Referenced by plan_delegator::PlanDelegator::updateManeuverParameters().

Here is the caller graph for this function:

◆ getManeuverStartingLaneletId()

std::string plan_delegator::anonymous_namespace{plan_delegator.cpp}::getManeuverStartingLaneletId ( carma_planning_msgs::msg::Maneuver  mvr)

Anonymous function to get the starting lanelet id for all maneuver types except lane following. This maneuver parameters cannot be obtained with GET_MANEUVER_PROPERTY calls since they are not included in LANE_FOLLOW maneuvers.

Definition at line 91 of file plan_delegator.cpp.

91 {
92 switch(mvr.type) {
93 case carma_planning_msgs::msg::Maneuver::LANE_CHANGE:
94 return mvr.lane_change_maneuver.starting_lane_id;
95 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_STRAIGHT:
96 return mvr.intersection_transit_straight_maneuver.starting_lane_id;
97 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_LEFT_TURN:
98 return mvr.intersection_transit_left_turn_maneuver.starting_lane_id;
99 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_RIGHT_TURN:
100 return mvr.intersection_transit_right_turn_maneuver.starting_lane_id;
101 case carma_planning_msgs::msg::Maneuver::STOP_AND_WAIT:
102 return mvr.stop_and_wait_maneuver.starting_lane_id;
103 default:
104 throw std::invalid_argument("Maneuver type does not have starting and ending lane ids");
105 }
106 }

Referenced by plan_delegator::PlanDelegator::updateManeuverParameters().

Here is the caller graph for this function:

◆ setManeuverEndingLaneletId()

void plan_delegator::anonymous_namespace{plan_delegator.cpp}::setManeuverEndingLaneletId ( carma_planning_msgs::msg::Maneuver &  mvr,
lanelet::Id  end_id 
)

Anonymous function to set the ending_lane_id for all maneuver types except lane following. This maneuver parameter cannot be set with SET_MANEUVER_PROPERTY calls since it is not included in LANE_FOLLOW maneuvers.

Definition at line 62 of file plan_delegator.cpp.

62 {
63 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("plan_delegator"),"Updating maneuver ending_lane_id to " << end_id);
64
65 switch(mvr.type) {
66 case carma_planning_msgs::msg::Maneuver::LANE_CHANGE:
67 mvr.lane_change_maneuver.ending_lane_id = std::to_string(end_id);
68 break;
69 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_STRAIGHT:
70 mvr.intersection_transit_straight_maneuver.ending_lane_id = std::to_string(end_id);
71 break;
72 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_LEFT_TURN:
73 mvr.intersection_transit_left_turn_maneuver.ending_lane_id = std::to_string(end_id);
74 break;
75 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_RIGHT_TURN:
76 mvr.intersection_transit_right_turn_maneuver.ending_lane_id = std::to_string(end_id);
77 break;
78 case carma_planning_msgs::msg::Maneuver::STOP_AND_WAIT:
79 mvr.stop_and_wait_maneuver.ending_lane_id = std::to_string(end_id);
80 break;
81 default:
82 throw std::invalid_argument("Maneuver type does not have starting and ending lane ids");
83 }
84 }
auto to_string(const UtmZone &zone) -> std::string
Definition: utm_zone.cpp:21

References carma_cooperative_perception::to_string().

Referenced by plan_delegator::PlanDelegator::updateManeuverParameters().

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

◆ setManeuverStartingLaneletId()

void plan_delegator::anonymous_namespace{plan_delegator.cpp}::setManeuverStartingLaneletId ( carma_planning_msgs::msg::Maneuver &  mvr,
lanelet::Id  start_id 
)

Anonymous function to set the starting_lane_id for all maneuver types except lane following. This maneuver parameter cannot be set with SET_MANEUVER_PROPERTY calls since it is not included in LANE_FOLLOW maneuvers.

Definition at line 33 of file plan_delegator.cpp.

33 {
34 RCLCPP_DEBUG_STREAM(rclcpp::get_logger("plan_delegator"),"Updating maneuver starting_lane_id to " << start_id);
35
36 switch(mvr.type) {
37 case carma_planning_msgs::msg::Maneuver::LANE_CHANGE:
38 mvr.lane_change_maneuver.starting_lane_id = std::to_string(start_id);
39 break;
40 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_STRAIGHT:
41 mvr.intersection_transit_straight_maneuver.starting_lane_id = std::to_string(start_id);
42 break;
43 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_LEFT_TURN:
44 mvr.intersection_transit_left_turn_maneuver.starting_lane_id = std::to_string(start_id);
45 break;
46 case carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_RIGHT_TURN:
47 mvr.intersection_transit_right_turn_maneuver.starting_lane_id = std::to_string(start_id);
48 break;
49 case carma_planning_msgs::msg::Maneuver::STOP_AND_WAIT:
50 mvr.stop_and_wait_maneuver.starting_lane_id = std::to_string(start_id);
51 break;
52 default:
53 throw std::invalid_argument("Maneuver type does not have starting and ending lane ids");
54 }
55 }

References carma_cooperative_perception::to_string().

Referenced by plan_delegator::PlanDelegator::updateManeuverParameters().

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