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.
approaching_emergency_vehicle_plugin_node.hpp File Reference
#include <rclcpp/rclcpp.hpp>
#include <functional>
#include <std_msgs/msg/string.hpp>
#include <std_srvs/srv/empty.hpp>
#include <carma_planning_msgs/msg/plugin.hpp>
#include <carma_planning_msgs/msg/upcoming_lane_change_status.hpp>
#include <carma_planning_msgs/msg/route_state.hpp>
#include <carma_planning_msgs/msg/guidance_state.hpp>
#include <carma_v2x_msgs/msg/bsm.hpp>
#include <carma_v2x_msgs/msg/emergency_vehicle_response.hpp>
#include <carma_v2x_msgs/msg/emergency_vehicle_ack.hpp>
#include <carma_msgs/msg/ui_instructions.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <carma_wm/WMListener.hpp>
#include <carma_wm/WorldModel.hpp>
#include <lanelet2_core/geometry/Lanelet.h>
#include <lanelet2_extension/projection/local_frame_projector.h>
#include <lanelet2_extension/io/autoware_osm_parser.h>
#include <carma_wm/CARMAWorldModel.hpp>
#include <boost/format.hpp>
#include <std_msgs/msg/bool.hpp>
#include <unordered_map>
#include <carma_guidance_plugins/strategic_plugin.hpp>
#include "approaching_emergency_vehicle_plugin/approaching_emergency_vehicle_plugin_config.hpp"
#include "approaching_emergency_vehicle_plugin/approaching_emergency_vehicle_transition_table.hpp"
#include "approaching_emergency_vehicle_plugin/approaching_emergency_vehicle_states.hpp"
Include dependency graph for approaching_emergency_vehicle_plugin_node.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  approaching_emergency_vehicle_plugin::ErvInformation
 Convenience struct for storing relevant data for an Emergency Response Vehicle (ERV). More...
 
struct  approaching_emergency_vehicle_plugin::UpcomingLaneChangeParameters
 Convenience struct for storing the parameters of an upcoming lane change to ensure that the same parameters are used in separately generated maneuver plans. More...
 
class  approaching_emergency_vehicle_plugin::ApproachingEmergencyVehiclePlugin
 Class that implements the Approaching Emergency Vehicle Plugin (ERV) strategic plugin. This class is primarily responsible for handling ROS topic subscriptions, publications, and service callbacks for processing incoming BSMs from ERV's, generating manuever plans that account for a nearby ERV, and publishing warning message(s) to an approaching ERV when the ego vehicle is in its path. More...
 

Namespaces

namespace  approaching_emergency_vehicle_plugin
 

Macros

#define GET_MANEUVER_PROPERTY(mvr, property)
 Macro definition to enable easier access to fields shared across the maneuver types. More...
 

Variables

constexpr double approaching_emergency_vehicle_plugin::METERS_PER_SEC_TO_MILES_PER_HOUR = 2.23694
 

Macro Definition Documentation

◆ GET_MANEUVER_PROPERTY

#define GET_MANEUVER_PROPERTY (   mvr,
  property 
)
Value:
(((mvr).type == carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_LEFT_TURN ? (mvr).intersection_transit_left_turn_maneuver.property :\
((mvr).type == carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_RIGHT_TURN ? (mvr).intersection_transit_right_turn_maneuver.property :\
((mvr).type == carma_planning_msgs::msg::Maneuver::INTERSECTION_TRANSIT_STRAIGHT ? (mvr).intersection_transit_straight_maneuver.property :\
((mvr).type == carma_planning_msgs::msg::Maneuver::LANE_CHANGE ? (mvr).lane_change_maneuver.property :\
((mvr).type == carma_planning_msgs::msg::Maneuver::LANE_FOLLOWING ? (mvr).lane_following_maneuver.property :\
((mvr).type == carma_planning_msgs::msg::Maneuver::STOP_AND_WAIT ? (mvr).stop_and_wait_maneuver.property :\
throw std::invalid_argument("GET_MANEUVER_PROPERTY (property) called on maneuver with invalid type id " + std::to_string((mvr).type)))))))))
auto to_string(const UtmZone &zone) -> std::string
Definition: utm_zone.cpp:21

Macro definition to enable easier access to fields shared across the maneuver types.

Parameters
mvrThe maneuver object to invoke the accessors on
propertyThe name of the field to access on the specific maneuver types. Must be shared by all extant maneuver types
Returns
Expands to an expression (in the form of chained ternary operators) that evalutes to the desired field

Definition at line 54 of file approaching_emergency_vehicle_plugin_node.hpp.