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_states.hpp
Go to the documentation of this file.
1#pragma once
2/*
3 * Copyright (C) 2022 LEIDOS.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18#include <ostream>
19
21{
22
25{
26 NO_APPROACHING_ERV, // State representing that an ERV is not passing the ego vehicle within the duration defined by
27 // the "approaching_threshold" configurable parameter.
28 MOVING_OVER_FOR_APPROACHING_ERV, // State representing that the ego vehicle must change lanes in response to an approaching ERV.
29
30 SLOWING_DOWN_FOR_ERV // State representing that the ERV is actively passing the ego vehicle, so the ego vehicle should remain in its
31 // current lane and slow down if necessary.
32};
33
37std::ostream& operator<<(std::ostream& os, ApproachingEmergencyVehicleState state);
38
39
42{
43 ERV_UPDATE_TIMEOUT, // Event representing that no BSMs have been received from the currently-tracked ERV within the duration
44 // defined by the "timeout_duration" configurable parameters.
45
46 NO_APPROACHING_ERV, // Event representing that an ERV is not passing the ego vehicle within the duration defined by
47 // the "approaching_threshold" configurable parameter.
48
49 APPROACHING_ERV_IN_PATH, // Event representing that an ERV is approaching the ego vehicle and the ego vehicle is either
50 // in the same lane as the ERV or the ego vehicle is not in the rightmost lane.
51 APPROACHING_ERV_NOT_IN_PATH, // Event representing that an ERV is approaching the ego vehicle and the ego vehicle is either in the
52 // rightmost lane, or is in a lane adjacent to the rightmost lane if the ERV is in the rightmost lane.
53
54 ERV_PASSING_IN_PATH, // Event representing that the ERV is actively passing the ego vehicle, and the ego vehicle is either
55 // in the same lane as the ERV or the ego vehicle is not in the rightmost lane.
56
57 ERV_PASSED // Event representing that the ERV has fully passed the ego vehicle.
58};
59
63std::ostream& operator<<(std::ostream& os, ApproachingEmergencyVehicleEvent event);
64
65} // namespace approaching_emergency_vehicle_plugin
std::ostream & operator<<(std::ostream &os, ApproachingEmergencyVehicleState state)
Stream operator for ApproachingEmergencyVehicleState enum.
ApproachingEmergencyVehicleEvent
Enum describing the possible signals to change the current ApproachingEmergencyVehicleState.
ApproachingEmergencyVehicleState
Enum describing the possible states of the ApproachingEmergencyVehiclePlugin (Strategic Plugin)