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.
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 112 of file plan_delegator.cpp.

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

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 90 of file plan_delegator.cpp.

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

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 61 of file plan_delegator.cpp.

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

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

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: