15from ament_index_python
import get_package_share_directory
16from launch
import LaunchDescription
17from launch.substitutions
import EnvironmentVariable
18from launch.substitutions
import LaunchConfiguration
19from launch.actions
import DeclareLaunchArgument
20from launch.actions
import IncludeLaunchDescription
21from launch.launch_description_sources
import AnyLaunchDescriptionSource
22from launch.substitutions
import EnvironmentVariable
23from launch.actions
import GroupAction
24from launch_ros.actions.set_remap
import SetRemap
32 env_log_levels = EnvironmentVariable('CARMA_ROS_LOGGING_CONFIG', default_value=
'{ "default_level" : "WARN" }')
34 port = LaunchConfiguration(
'port')
35 declare_port = DeclareLaunchArgument(
37 default_value =
"9090",
38 description =
"The default port for rosbridge is 9090"
41 rosbridge_server_group = GroupAction(
43 SetRemap(
"get_available_routes",[EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/get_available_routes"]),
44 SetRemap(
"set_active_route",[EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/set_active_route"]),
45 SetRemap(
"start_active_route",[EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/start_active_route"]),
46 SetRemap(
"get_available_routes", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/get_available_routes"]),
47 SetRemap(
"route_state", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/route_state"]),
48 SetRemap(
"route_event", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/route_event"]),
49 SetRemap(
"route", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/route"]),
50 SetRemap(
"get_system_version", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/get_system_version"]),
51 SetRemap(
"state", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/state"]),
52 SetRemap(
"ui_platoon_vehicle_info", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/ui_platoon_vehicle_info"]),
53 SetRemap(
"plugins/available_plugins", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/plugins/available_plugins"]),
54 SetRemap(
"plugins/get_registered_plugins", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/plugins/get_registered_plugins"]),
55 SetRemap(
"plugins/activate_plugin", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/plugins/activate_plugin"]),
56 SetRemap(
"get_available_routes", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/get_available_routes"]),
57 SetRemap(
"set_guidance_active", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/set_guidance_active"]),
58 SetRemap(
"plugins/controlling_plugins", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/plugins/controlling_plugins"]),
59 SetRemap(
"traffic_signal_info", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/traffic_signal_info"]),
60 SetRemap(
"platooning_info", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/platooning_info"]),
61 SetRemap(
"traffic_signal_info", [EnvironmentVariable(
'CARMA_GUIDE_NS', default_value=
''),
"/traffic_signal_info"]),
62 SetRemap(
"system_alert",
"/system_alert"),
63 SetRemap(
"bsm", [EnvironmentVariable(
'CARMA_MSG_NS', default_value=
''),
"/incoming_bsm"]),
64 SetRemap(
"nav_sat_fix", [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/gnss/nav_sat_fix"]),
65 SetRemap(
"velocity", [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/vehicle/twist"]),
66 SetRemap(
"driver_discovery", [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/driver_discovery"]),
67 SetRemap(
"get_drivers_with_capabilities", [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/get_drivers_with_capabilities"]),
68 SetRemap(
"controller/robotic_status", [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/controller/robot_status"]),
69 SetRemap(
"controller/vehicle_cmd" , [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/controller/vehicle_cmd"]),
70 SetRemap(
"comms/outbound_binary_msg",[EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/comms/outbound_binary_msg"]),
71 SetRemap(
"comms/inbound_binary_msg", [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/comms/inbound_binary_msg"]),
72 SetRemap(
"can/engine_speed", [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/can/engine_speed"]),
73 SetRemap(
"can/speed", [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/can/speed"]),
74 SetRemap(
"can/acc_engaged", [EnvironmentVariable(
'CARMA_INTR_NS', default_value=
''),
"/can/acc_engaged"]),
75 IncludeLaunchDescription(
76 AnyLaunchDescriptionSource(
77 [ get_package_share_directory(
'rosbridge_server'),
'/launch/rosbridge_websocket_launch.xml']
86 return LaunchDescription([
88 rosbridge_server_group
def generate_launch_description()