15from ament_index_python
import get_package_share_directory
16from launch
import LaunchDescription
17from launch_ros.actions
import ComposableNodeContainer
18from launch_ros.descriptions
import ComposableNode
19from carma_ros2_utils.launch.get_current_namespace
import GetCurrentNamespace
25This file is can be used to launch the CARMA carma_cloud_client_node.
26 Though in carma-platform it may be launched directly
from the base launch file.
33 REMOTE_ADDR=
"carma-cloud.com"
34 KEY_FILE=
"carma-cloud-1.pem"
38 param_launch_path = os.path.join(
39 get_package_share_directory(
'carma_cloud_client'),
'launch/scripts')
41 cmd = param_launch_path +
'/open_tunnels.sh'
43 subprocess.check_call([
'chmod',
'u+x', cmd])
45 key_path =
"/opt/carma/vehicle/calibration/cloud_permission"
47 key = key_path +
'/' + KEY_FILE
49 subprocess.check_call([
'sudo',
'chmod',
'400', key])
50 subprocess.check_call([
'sudo', cmd,
'-u', REMOTE_USER,
'-a', REMOTE_ADDR,
'-k', key,
'-p', REMOTE_PORT,
'-r', HOST_PORT])
58 param_file_path = os.path.join(
59 get_package_share_directory(
'carma_cloud_client'),
'config/parameters.yaml')
62 container = ComposableNodeContainer(
63 package=
'carma_ros2_utils',
64 name=
'carma_cloud_client_container',
65 namespace=GetCurrentNamespace(),
66 executable=
'carma_component_container_mt',
67 composable_node_descriptions=[
71 package=
'carma_cloud_client',
72 plugin=
'carma_cloud_client::CarmaCloudClient',
73 name=
'carma_cloud_client',
75 {
'use_intra_process_comms':
True},
77 parameters=[ param_file_path ]
82 return LaunchDescription([
def generate_launch_description()