18#include <carma_planning_msgs/msg/maneuver.hpp>
26 if (plan.maneuvers.empty())
28 throw std::invalid_argument(
"arbitrator::get_plan_end_time called on empty maneuver plan");
31 carma_planning_msgs::msg::Maneuver m = plan.maneuvers.back();
38 if (plan.maneuvers.empty())
40 throw std::invalid_argument(
"arbitrator::get_plan_end_dist called on empty maneuver plan");
43 carma_planning_msgs::msg::Maneuver m = plan.maneuvers.back();
49 if (plan.maneuvers.empty())
51 throw std::invalid_argument(
"arbitrator::get_plan_start_time called on empty maneuver plan");
54 carma_planning_msgs::msg::Maneuver m = plan.maneuvers.front();
60 if (plan.maneuvers.empty())
62 throw std::invalid_argument(
"arbitrator::get_plan_start_dist called on empty maneuver plan");
65 carma_planning_msgs::msg::Maneuver m = plan.maneuvers.front();
#define GET_MANEUVER_PROPERTY(mvr, property)
Macro definition to enable easier access to fields shared across the maneuver types.
rclcpp::Time get_plan_start_time(const carma_planning_msgs::msg::ManeuverPlan &)
Get the start time of the first maneuver in the plan.
rclcpp::Time get_maneuver_end_time(const carma_planning_msgs::msg::Maneuver &)
Get the end time of the specified maneuver.
double get_maneuver_start_distance(const carma_planning_msgs::msg::Maneuver &)
Get the start distance the specified maneuver.
double get_maneuver_end_distance(const carma_planning_msgs::msg::Maneuver &)
Get the end distance of the specified maneuver.
rclcpp::Time get_plan_end_time(const carma_planning_msgs::msg::ManeuverPlan &)
Get the end time of the first maneuver in the plan.
double get_plan_end_distance(const carma_planning_msgs::msg::ManeuverPlan &)
Get the end distance of the first maneuver in the plan.
rclcpp::Time get_maneuver_start_time(const carma_planning_msgs::msg::Maneuver &)
Get the start time of the specified maneuver.
double get_plan_start_distance(const carma_planning_msgs::msg::ManeuverPlan &)
Get the start distance of the first maneuver in the plan.