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

Functions

def open_tunnels ()
 
def generate_launch_description ()
 

Function Documentation

◆ generate_launch_description()

def carma_cloud_client_launch.generate_launch_description ( )

Definition at line 57 of file carma_cloud_client_launch.py.

58
60 # Declare the log_level launch argument
61 log_level = LaunchConfiguration('log_level')
62 declare_log_level_arg = DeclareLaunchArgument(
63 name ='log_level', default_value='WARN')
64
65 # Get parameter file path
66 param_file_path = os.path.join(
67 get_package_share_directory('carma_cloud_client'), 'config/parameters.yaml')
68
69
70 # Launch node(s) in a carma container to allow logging to be configured
71 container = ComposableNodeContainer(
72 package='carma_ros2_utils',
73 name='carma_cloud_client_container',
74 namespace=GetCurrentNamespace(),
75 executable='carma_component_container_mt',
76 composable_node_descriptions=[
77
78 # Launch the core node(s)
79 ComposableNode(
80 package='carma_cloud_client',
81 plugin='carma_cloud_client::CarmaCloudClient',
82 name='carma_cloud_client',
83 extra_arguments=[
84 {'use_intra_process_comms': True},
85 {'--log-level' : log_level }
86 ],
87 parameters=[ param_file_path ]
88 ),
89 ]
90 )
91
92 return LaunchDescription([
93 declare_log_level_arg,
94 container
95 ])

References open_tunnels().

Here is the call graph for this function:

◆ open_tunnels()

def carma_cloud_client_launch.open_tunnels ( )

Definition at line 33 of file carma_cloud_client_launch.py.

33def open_tunnels():
34
35 REMOTE_USER="ubuntu"
36 REMOTE_ADDR="www.carma-cloud.com"
37 KEY_FILE="carma-cloud-test-1.pem"
38 HOST_PORT="33333" # This port is forwarded to remote host (carma-cloud)
39 REMOTE_PORT="33333" # This port is forwarded to local host
40
41 param_launch_path = os.path.join(
42 get_package_share_directory('carma_cloud_client'), 'launch/scripts')
43
44
45 cmd = param_launch_path + '/open_tunnels.sh'
46
47 subprocess.check_call(['chmod','u+x', cmd])
48
49 key_path = "/opt/carma/vehicle/calibration/cloud_permission"
50
51 key = key_path + '/' + KEY_FILE
52
53 subprocess.check_call(['sudo','chmod','400', key])
54 subprocess.check_call(['sudo', cmd, '-u', REMOTE_USER, '-a', REMOTE_ADDR, '-k', key, '-p', REMOTE_PORT, '-r', HOST_PORT])
55
56

Referenced by generate_launch_description().

Here is the caller graph for this function: