17#ifndef __ARBITRATOR_INCLUDE_ARBITRATOR_UTILS_HPP__
18#define __ARBITRATOR_INCLUDE_ARBITRATOR_UTILS_HPP__
20#include <rclcpp/rclcpp.hpp>
21#include <carma_planning_msgs/msg/maneuver_plan.hpp>
33#define GET_MANEUVER_PROPERTY(mvr, property)\
34 (((mvr).type == carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_LEFT_TURN ? (mvr).intersection_transit_left_turn_maneuver.property :\
35 ((mvr).type == carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_RIGHT_TURN ? (mvr).intersection_transit_right_turn_maneuver.property :\
36 ((mvr).type == carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_STRAIGHT ? (mvr).intersection_transit_straight_maneuver.property :\
37 ((mvr).type == carma_planning_msgs::msg::Maneuver::LANE_CHANGE ? (mvr).lane_change_maneuver.property :\
38 ((mvr).type == carma_planning_msgs::msg::Maneuver::LANE_FOLLOWING ? (mvr).lane_following_maneuver.property :\
39 ((mvr).type == carma_planning_msgs::msg::Maneuver::STOP_AND_WAIT ? (mvr).stop_and_wait_maneuver.property :\
40 throw std::invalid_argument("GET_MANEUVER_PROPERTY (property) called on maneuver with invalid type id"))))))))
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.