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.
arbitrator_utils Namespace Reference

Functions

rclcpp::Time get_plan_start_time (const carma_planning_msgs::msg::ManeuverPlan &)
 Get the start time of the first maneuver in the plan. More...
 
double get_plan_start_distance (const carma_planning_msgs::msg::ManeuverPlan &)
 Get the start distance of the first maneuver in the plan. More...
 
rclcpp::Time get_plan_end_time (const carma_planning_msgs::msg::ManeuverPlan &)
 Get the end time of the first maneuver in the plan. More...
 
double get_plan_end_distance (const carma_planning_msgs::msg::ManeuverPlan &)
 Get the end distance of the first maneuver in the plan. More...
 
rclcpp::Time get_maneuver_start_time (const carma_planning_msgs::msg::Maneuver &)
 Get the start time of the specified maneuver. More...
 
double get_maneuver_start_distance (const carma_planning_msgs::msg::Maneuver &)
 Get the start distance the specified maneuver. More...
 
rclcpp::Time get_maneuver_end_time (const carma_planning_msgs::msg::Maneuver &)
 Get the end time of the specified maneuver. More...
 
double get_maneuver_end_distance (const carma_planning_msgs::msg::Maneuver &)
 Get the end distance of the specified maneuver. More...
 

Function Documentation

◆ get_maneuver_end_distance()

double arbitrator_utils::get_maneuver_end_distance ( const carma_planning_msgs::msg::Maneuver &  mvr)

Get the end distance of the specified maneuver.

Parameters
mvrThe maneuver to examine
Returns
The double-valued linear downtrack distance in meters to the end of the maneuver
Exceptions
Aninvalid argument exception if the maneuver is poorly constructed

Definition at line 79 of file arbitrator_utils.cpp.

80 {
81 return GET_MANEUVER_PROPERTY(mvr, end_dist);
82 }
#define GET_MANEUVER_PROPERTY(mvr, property)
Macro definition to enable easier access to fields shared across the maneuver types.

References GET_MANEUVER_PROPERTY.

Referenced by arbitrator::FixedPriorityCostFunction::compute_total_cost(), and get_plan_end_distance().

Here is the caller graph for this function:

◆ get_maneuver_end_time()

rclcpp::Time arbitrator_utils::get_maneuver_end_time ( const carma_planning_msgs::msg::Maneuver &  mvr)

Get the end time of the specified maneuver.

Parameters
mvrThe maneuver to examine
Returns
The rclcpp::Time at which it ends
Exceptions
Aninvalid argument exception if the maneuver is poorly constructed

Definition at line 69 of file arbitrator_utils.cpp.

70 {
71 return GET_MANEUVER_PROPERTY(mvr, end_time);
72 }

References GET_MANEUVER_PROPERTY.

Referenced by get_plan_end_time().

Here is the caller graph for this function:

◆ get_maneuver_start_distance()

double arbitrator_utils::get_maneuver_start_distance ( const carma_planning_msgs::msg::Maneuver &  mvr)

Get the start distance the specified maneuver.

Parameters
mvrThe maneuver to examine
Returns
The double-valued linear downtrack distance in meters to the start of the maneuver
Exceptions
Aninvalid argument exception if the maneuver is poorly constructed

Definition at line 84 of file arbitrator_utils.cpp.

85 {
86 return GET_MANEUVER_PROPERTY(mvr, start_dist);
87 }

References GET_MANEUVER_PROPERTY.

Referenced by arbitrator::FixedPriorityCostFunction::compute_total_cost(), and get_plan_start_distance().

Here is the caller graph for this function:

◆ get_maneuver_start_time()

rclcpp::Time arbitrator_utils::get_maneuver_start_time ( const carma_planning_msgs::msg::Maneuver &  mvr)

Get the start time of the specified maneuver.

Parameters
mvrThe maneuver to examine
Returns
The rclcpp::Time at which it starts
Exceptions
Aninvalid argument exception if the maneuver is poorly constructed

Definition at line 74 of file arbitrator_utils.cpp.

75 {
76 return GET_MANEUVER_PROPERTY(mvr, start_time);
77 }

References GET_MANEUVER_PROPERTY.

Referenced by get_plan_start_time().

Here is the caller graph for this function:

◆ get_plan_end_distance()

double arbitrator_utils::get_plan_end_distance ( const carma_planning_msgs::msg::ManeuverPlan &  plan)

Get the end distance of the first maneuver in the plan.

Parameters
planThe plan to examine
Returns
The double-valued linear downtrack distance in meters to the end of the plan
Exceptions
Aninvalid argument exception if the plan is empty

Definition at line 36 of file arbitrator_utils.cpp.

37 {
38 if (plan.maneuvers.empty())
39 {
40 throw std::invalid_argument("arbitrator::get_plan_end_dist called on empty maneuver plan");
41 }
42
43 carma_planning_msgs::msg::Maneuver m = plan.maneuvers.back();
45 }
double get_maneuver_end_distance(const carma_planning_msgs::msg::Maneuver &)
Get the end distance of the specified maneuver.

References get_maneuver_end_distance().

Referenced by arbitrator::CostSystemCostFunction::compute_cost_per_unit_distance(), and arbitrator::FixedPriorityCostFunction::compute_cost_per_unit_distance().

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

◆ get_plan_end_time()

rclcpp::Time arbitrator_utils::get_plan_end_time ( const carma_planning_msgs::msg::ManeuverPlan &  plan)

Get the end time of the first maneuver in the plan.

Parameters
planThe plan to examine
Returns
The rclcpp::Time at which it ends
Exceptions
Aninvalid argument exception if the plan is empty

Definition at line 24 of file arbitrator_utils.cpp.

25 {
26 if (plan.maneuvers.empty())
27 {
28 throw std::invalid_argument("arbitrator::get_plan_end_time called on empty maneuver plan");
29 }
30
31 carma_planning_msgs::msg::Maneuver m = plan.maneuvers.back();
32
33 return get_maneuver_end_time(m);
34 }
rclcpp::Time get_maneuver_end_time(const carma_planning_msgs::msg::Maneuver &)
Get the end time of the specified maneuver.

References get_maneuver_end_time().

Referenced by arbitrator::TreePlanner::generate_plan(), and arbitrator::Arbitrator::planning_state().

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

◆ get_plan_start_distance()

double arbitrator_utils::get_plan_start_distance ( const carma_planning_msgs::msg::ManeuverPlan &  plan)

Get the start distance of the first maneuver in the plan.

Parameters
planThe plan to examine
Returns
The double-valued linear downtrack distance in meters to the start of the plan
Exceptions
Aninvalid argument exception if the plan is empty

Definition at line 58 of file arbitrator_utils.cpp.

59 {
60 if (plan.maneuvers.empty())
61 {
62 throw std::invalid_argument("arbitrator::get_plan_start_dist called on empty maneuver plan");
63 }
64
65 carma_planning_msgs::msg::Maneuver m = plan.maneuvers.front();
67 }
double get_maneuver_start_distance(const carma_planning_msgs::msg::Maneuver &)
Get the start distance the specified maneuver.

References get_maneuver_start_distance().

Referenced by arbitrator::CostSystemCostFunction::compute_cost_per_unit_distance(), and arbitrator::FixedPriorityCostFunction::compute_cost_per_unit_distance().

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

◆ get_plan_start_time()

rclcpp::Time arbitrator_utils::get_plan_start_time ( const carma_planning_msgs::msg::ManeuverPlan &  plan)

Get the start time of the first maneuver in the plan.

Parameters
planThe plan to examine
Returns
The rclcpp::Time at which it starts
Exceptions
Aninvalid argument exception if the plan is empty

Definition at line 47 of file arbitrator_utils.cpp.

48 {
49 if (plan.maneuvers.empty())
50 {
51 throw std::invalid_argument("arbitrator::get_plan_start_time called on empty maneuver plan");
52 }
53
54 carma_planning_msgs::msg::Maneuver m = plan.maneuvers.front();
56 }
rclcpp::Time get_maneuver_start_time(const carma_planning_msgs::msg::Maneuver &)
Get the start time of the specified maneuver.

References get_maneuver_start_time().

Referenced by arbitrator::TreePlanner::generate_plan(), and arbitrator::Arbitrator::planning_state().

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