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

Classes

struct  BoundaryDistances
 
class  LCIStrategicPlugin
 
struct  LCIStrategicPluginConfig
 Struct to store the configuration settings for the LCIStrategicPlugin class. More...
 
class  LCIStrategicStateTransitionTable
 Class defining the state transition table behavior for the LCIStrategic Strategic Plugin. More...
 
struct  TrajectoryParams
 

Enumerations

enum class  TransitState { UNAVAILABLE , APPROACHING , WAITING , DEPARTING }
 Enum describing the possible states of the LCIStrategic Strategic Plugin. More...
 
enum class  TransitEvent {
  IN_STOPPING_RANGE , STOPPED , CROSSED_STOP_BAR , RED_TO_GREEN_LIGHT ,
  INTERSECTION_EXIT
}
 Enum describing the possible signals to change the current TransitState. More...
 
enum class  TurnDirection { Straight , Right , Left }
 
enum  TSCase {
  CASE_1 = 1 , CASE_2 = 2 , CASE_3 = 3 , CASE_4 = 4 ,
  CASE_5 = 5 , CASE_6 = 6 , CASE_7 = 7 , CASE_8 = 8 ,
  STOPPING =9 , UNAVAILABLE = 10 , EMERGENCY_STOPPING =11 , DEGRADED_TSCASE =12
}
 Struct representing trajectory smoothing algorithm parameters using distance and acceleration Based on TSMO USE CASE 2. Chapter 2. Trajectory Smoothing. More...
 

Functions

std::ostream & operator<< (std::ostream &os, TransitState s)
 Stream operator for TransitStates enum. More...
 
std::ostream & operator<< (std::ostream &os, TransitEvent s)
 Stream operator for TransitEvent enum. More...
 
def generate_launch_description ()
 

Enumeration Type Documentation

◆ TransitEvent

Enum describing the possible signals to change the current TransitState.

Enumerator
IN_STOPPING_RANGE 
STOPPED 
CROSSED_STOP_BAR 
RED_TO_GREEN_LIGHT 
INTERSECTION_EXIT 

Definition at line 38 of file lci_states.hpp.

39{
40 IN_STOPPING_RANGE, // Transition event representing that the vehicle is in the stopping range of a light
41 STOPPED, // Transition event representing that the vehicle has come to a full stop
42 CROSSED_STOP_BAR, // Transition event representing that the vehicle has crossed the stop bar
43 RED_TO_GREEN_LIGHT, // Transition event representing that the current light of interest has changed from red to green
44 INTERSECTION_EXIT // Transition event representing that the end of the current intersection was crossed
45};

◆ TransitState

Enum describing the possible states of the LCIStrategic Strategic Plugin.

Enumerator
UNAVAILABLE 
APPROACHING 
WAITING 
DEPARTING 

Definition at line 24 of file lci_states.hpp.

25{
26 UNAVAILABLE, // State representing that there are no applicable intersections in range, so the plugin cannot plan
27 APPROACHING, // State representing that the vehicle is approaching an intersection
28 WAITING, // State representing that the vehicle is stopped and waiting at a light
29 DEPARTING // State representing that the vehicle is traversing the intersection
30};

◆ TSCase

Struct representing trajectory smoothing algorithm parameters using distance and acceleration Based on TSMO USE CASE 2. Chapter 2. Trajectory Smoothing.

Enumerator
CASE_1 
CASE_2 
CASE_3 
CASE_4 
CASE_5 
CASE_6 
CASE_7 
CASE_8 
STOPPING 
UNAVAILABLE 
EMERGENCY_STOPPING 
DEGRADED_TSCASE 

Definition at line 61 of file lci_strategic_plugin.hpp.

◆ TurnDirection

Enumerator
Straight 
Right 
Left 

Definition at line 51 of file lci_strategic_plugin.hpp.

Function Documentation

◆ generate_launch_description()

def lci_strategic_plugin.generate_launch_description ( )

Definition at line 31 of file lci_strategic_plugin.launch.py.

32
33 # Declare the log_level launch argument
34 log_level = LaunchConfiguration('log_level')
35 declare_log_level_arg = DeclareLaunchArgument(
36 name ='log_level', default_value='WARN')
37
38 lci_strategic_plugin_file_path = os.path.join(
39 get_package_share_directory('lci_strategic_plugin'), 'config/parameters.yaml')
40
41 # Launch node(s) in a carma container to allow logging to be configured
42 container = ComposableNodeContainer(
43 package='carma_ros2_utils',
44 name='lci_strategic_plugin_container',
45 namespace=GetCurrentNamespace(),
46 executable='carma_component_container_mt',
47 composable_node_descriptions=[
48
49 # Launch the core node(s)
50 ComposableNode(
51 package='lci_strategic_plugin',
52 plugin='lci_strategic_plugin::LCIStrategicPlugin',
53 name='lci_strategic_plugin_node',
54 extra_arguments=[
55 {'use_intra_process_comms': True},
56 {'--log-level' : log_level }
57 ],
58 parameters=[
59 lci_strategic_plugin_file_path
60 ]
61 ),
62 ]
63 )
64
65 return LaunchDescription([
66 declare_log_level_arg,
67 container
68 ])

◆ operator<<() [1/2]

std::ostream & lci_strategic_plugin::operator<< ( std::ostream &  os,
TransitEvent  s 
)

Stream operator for TransitEvent enum.

Definition at line 35 of file lci_states.cpp.

36{
37 os << "TransitEvent::";
38 switch (s)
39 { // clang-format off
40 case TransitEvent::IN_STOPPING_RANGE : os << "IN_STOPPING_RANGE"; break;
41 case TransitEvent::STOPPED: os << "STOPPED"; break;
42 case TransitEvent::CROSSED_STOP_BAR : os << "CROSSED_STOP_BAR"; break;
43 case TransitEvent::RED_TO_GREEN_LIGHT : os << "RED_TO_GREEN_LIGHT"; break;
44 case TransitEvent::INTERSECTION_EXIT : os << "INTERSECTION_EXIT"; break;
45 default: os.setstate(std::ios_base::failbit);
46 } // clang-format on
47 return os;
48}

References CROSSED_STOP_BAR, IN_STOPPING_RANGE, INTERSECTION_EXIT, RED_TO_GREEN_LIGHT, and STOPPED.

◆ operator<<() [2/2]

std::ostream & lci_strategic_plugin::operator<< ( std::ostream &  os,
TransitState  s 
)

Stream operator for TransitStates enum.

Definition at line 21 of file lci_states.cpp.

22{
23 os << "TransitState::";
24 switch (s)
25 { // clang-format off
26 case TransitState::UNAVAILABLE : os << "UNAVAILABLE"; break;
27 case TransitState::APPROACHING: os << "APPROACHING"; break;
28 case TransitState::WAITING : os << "WAITING"; break;
29 case TransitState::DEPARTING : os << "DEPARTING"; break;
30 default: os.setstate(std::ios_base::failbit);
31 } // clang-format on
32 return os;
33}

References APPROACHING, DEPARTING, UNAVAILABLE, and WAITING.