Skip to content

Commit

Permalink
feat: add split launch (autowarefoundation#651)
Browse files Browse the repository at this point in the history
* feat: add split launch

* style(pre-commit): autofix

---------

Co-authored-by: 0x126 <[email protected]>
  • Loading branch information
0x126 and 0x126 authored May 17, 2024
1 parent 42f3bdb commit b1f44bb
Show file tree
Hide file tree
Showing 3 changed files with 347 additions and 0 deletions.
158 changes: 158 additions & 0 deletions autoware_launch/launch/autoware.main.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<!-- Essential parameters -->
<arg name="map_path" description="point cloud and lanelet2 map directory path"/>
<arg name="vehicle_model" description="vehicle model name"/>
<arg name="sensor_model" description="sensor model name"/>
<arg name="use_pointcloud_container" default="true" description="launch pointcloud container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>

<!-- launch module preset -->
<arg name="planning_module_preset" default="x2" description="planning module preset"/>

<!-- Optional parameters -->
<!-- Modules to be launched -->
<arg name="launch_vehicle" default="true" description="launch vehicle"/>
<arg name="launch_system" default="true" description="launch system"/>
<arg name="launch_map" default="true" description="launch map"/>
<arg name="launch_sensing" default="true" description="launch sensing"/>
<arg name="launch_sensing_driver" default="true" description="launch sensing driver"/>
<arg name="launch_localization" default="true" description="launch localization"/>
<arg name="launch_perception" default="true" description="launch perception"/>
<arg name="launch_planning" default="true" description="launch planning"/>
<arg name="launch_control" default="true" description="launch control"/>
<arg name="launch_v2x" default="true" description="launch V2X"/>
<arg name="launch_l4_toolkit" default="true" description="launch L4 Toolkit"/>
<!-- Global parameters -->
<arg name="use_sim_time" default="false" description="use_sim_time"/>
<!-- Vehicle -->
<arg name="vehicle_id" default="$(env VEHICLE_ID default)" description="vehicle specific ID"/>
<arg name="launch_vehicle_interface" default="true" description="launch vehicle interface"/>
<!-- Control -->
<arg name="check_external_emergency_heartbeat" default="false"/>
<!-- Map -->
<arg name="lanelet2_map_file" default="lanelet2_map.osm" description="lanelet2 map file name"/>
<arg name="pointcloud_map_file" default="pointcloud_map.pcd" description="pointcloud map file name"/>
<!-- System -->
<arg name="system_run_mode" default="online" description="run mode in system"/>
<arg name="launch_system_monitor" default="true" description="launch system monitor"/>
<arg name="launch_dummy_diag_publisher" default="false" description="launch dummy diag publisher"/>
<arg name="system_error_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_error_monitor/system_error_monitor.param.yaml"/>
<!-- Tools -->
<arg name="rviz" default="false" description="launch rviz"/>
<arg name="rviz_config" default="$(find-pkg-share autoware_launch)/rviz/autoware.rviz" description="rviz config"/>
<arg name="rviz_respawn" default="true"/>
<!-- Perception -->
<arg name="perception_mode" default="camera_lidar_radar_fusion" description="select perception mode. camera_lidar_radar_fusion, camera_lidar_fusion, lidar_radar_fusion, lidar, radar"/>
<arg name="traffic_light_recognition/enable_fine_detection" default="true" description="enable traffic light fine detection"/>
<arg name="centerpoint_model_path" default="/opt/autoware/mlmodels/centerpoint" description="path of centerpoint model file"/>
<!-- Auto mode setting-->
<arg name="enable_all_modules_auto_mode" default="false" description="enable all module's auto mode"/>
<arg name="is_simulation" default="false" description="Autoware's behavior will change depending on whether this is a simulation or not."/>

<!-- Global parameters -->
<group scoped="false">
<include file="$(find-pkg-share global_parameter_loader)/launch/global_params.launch.py">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="vehicle_model" value="$(var vehicle_model)"/>
</include>
</group>

<!-- Pointcloud container -->
<group if="$(var use_pointcloud_container)">
<include file="$(find-pkg-share autoware_launch)/launch/pointcloud_container.launch.py">
<arg name="use_multithread" value="true"/>
<arg name="container_name" value="$(var pointcloud_container_name)"/>
</include>
</group>

<!-- Vehicle -->
<group if="$(var launch_vehicle)">
<include file="$(find-pkg-share tier4_vehicle_launch)/launch/vehicle.launch.xml">
<arg name="vehicle_model" value="$(var vehicle_model)"/>
<arg name="sensor_model" value="$(var sensor_model)"/>
<arg name="vehicle_id" value="$(var vehicle_id)"/>
<arg name="launch_vehicle_interface" value="$(var launch_vehicle_interface)"/>
<arg name="config_dir" value="$(find-pkg-share individual_params)/config/$(var vehicle_id)/$(var sensor_model)"/>
</include>
</group>

<!-- System -->
<group if="$(var launch_system)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_system_component.main.launch.xml"/>
</group>

<!-- Map -->
<group if="$(var launch_map)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_map_component.launch.xml"/>
</group>

<!-- Sensing -->
<group if="$(var launch_sensing)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_sensing_component.launch.xml"/>
</group>

<!-- Localization -->
<group if="$(var launch_localization)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_localization_component.launch.xml"/>
</group>

<!-- Perception -->
<group if="$(var launch_perception)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_perception_component.launch.xml">
<arg name="data_path" value="$(var data_path)"/>
</include>
</group>

<!-- Planning -->
<!-- <group if="$(var launch_planning)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_planning_component.launch.xml">
<arg name="module_preset" value="$(var planning_module_preset)"/>
<arg name="enable_all_modules_auto_mode" value="$(var enable_all_modules_auto_mode)"/>
<arg name="is_simulation" value="$(var is_simulation)"/>
</include>
</group> -->

<!-- Control -->
<!-- <group if="$(var launch_control)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_control_component.launch.xml"/>
</group> -->

<!-- API -->
<!-- <group>
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_autoware_api_component.launch.xml"/>
</group> -->

<!-- V2X -->
<group if="$(var launch_v2x)">
<include file="$(find-pkg-share jpn_signal_launcher)/launch/jpn_signal.launch.xml">
<arg name="map_path" value="$(var map_path)"/>
<arg name="vehicle_model" value="$(var vehicle_model)"/>
<arg name="vehicle_id" value="1"/>
</include>
</group>

<!-- L4 Toolkit -->
<group if="$(var launch_l4_toolkit)">
<include file="$(find-pkg-share l4_toolkit_launch)/launch/l4_toolkit.launch.xml"/>
</group>

<!-- Tools -->
<!-- <group>
<node
pkg="rviz2"
exec="rviz2"
name="rviz2"
output="screen"
args="-d $(var rviz_config) -s $(find-pkg-share autoware_launch)/rviz/image/autoware.png"
if="$(var rviz)"
respawn="$(var rviz_respawn)"
/>
<group if="$(var launch_system)">
<include file="$(find-pkg-share diagnostic_graph_aggregator)/launch/converter.launch.xml">
<arg name="complement" value="true"/>
</include>
</group>
</group> -->
</launch>
158 changes: 158 additions & 0 deletions autoware_launch/launch/autoware.sub.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<!-- Essential parameters -->
<arg name="map_path" description="point cloud and lanelet2 map directory path"/>
<arg name="vehicle_model" description="vehicle model name"/>
<arg name="sensor_model" description="sensor model name"/>
<arg name="use_pointcloud_container" default="true" description="launch pointcloud container"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
<arg name="data_path" default="$(env HOME)/autoware_data" description="packages data and artifacts directory path"/>

<!-- launch module preset -->
<arg name="planning_module_preset" default="x2" description="planning module preset"/>

<!-- Optional parameters -->
<!-- Modules to be launched -->
<arg name="launch_vehicle" default="true" description="launch vehicle"/>
<arg name="launch_system" default="true" description="launch system"/>
<arg name="launch_map" default="true" description="launch map"/>
<arg name="launch_sensing" default="true" description="launch sensing"/>
<arg name="launch_sensing_driver" default="true" description="launch sensing driver"/>
<arg name="launch_localization" default="true" description="launch localization"/>
<arg name="launch_perception" default="true" description="launch perception"/>
<arg name="launch_planning" default="true" description="launch planning"/>
<arg name="launch_control" default="true" description="launch control"/>
<arg name="launch_v2x" default="true" description="launch V2X"/>
<arg name="launch_l4_toolkit" default="true" description="launch L4 Toolkit"/>
<!-- Global parameters -->
<arg name="use_sim_time" default="false" description="use_sim_time"/>
<!-- Vehicle -->
<arg name="vehicle_id" default="$(env VEHICLE_ID default)" description="vehicle specific ID"/>
<arg name="launch_vehicle_interface" default="true" description="launch vehicle interface"/>
<!-- Control -->
<arg name="check_external_emergency_heartbeat" default="false"/>
<!-- Map -->
<arg name="lanelet2_map_file" default="lanelet2_map.osm" description="lanelet2 map file name"/>
<arg name="pointcloud_map_file" default="pointcloud_map.pcd" description="pointcloud map file name"/>
<!-- System -->
<arg name="system_run_mode" default="online" description="run mode in system"/>
<arg name="launch_system_monitor" default="false" description="launch system monitor"/>
<arg name="launch_dummy_diag_publisher" default="false" description="launch dummy diag publisher"/>
<arg name="system_error_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_error_monitor/system_error_monitor.param.yaml"/>
<!-- Tools -->
<arg name="rviz" default="false" description="launch rviz"/>
<arg name="rviz_config" default="$(find-pkg-share autoware_launch)/rviz/autoware.rviz" description="rviz config"/>
<arg name="rviz_respawn" default="true"/>
<!-- Perception -->
<arg name="perception_mode" default="camera_lidar_radar_fusion" description="select perception mode. camera_lidar_radar_fusion, camera_lidar_fusion, lidar_radar_fusion, lidar, radar"/>
<arg name="traffic_light_recognition/enable_fine_detection" default="true" description="enable traffic light fine detection"/>
<arg name="centerpoint_model_path" default="/opt/autoware/mlmodels/centerpoint" description="path of centerpoint model file"/>
<!-- Auto mode setting-->
<arg name="enable_all_modules_auto_mode" default="false" description="enable all module's auto mode"/>
<arg name="is_simulation" default="false" description="Autoware's behavior will change depending on whether this is a simulation or not."/>

<!-- Global parameters -->
<group scoped="false">
<include file="$(find-pkg-share global_parameter_loader)/launch/global_params.launch.py">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
<arg name="vehicle_model" value="$(var vehicle_model)"/>
</include>
</group>

<!-- Pointcloud container -->
<!-- <group if="$(var use_pointcloud_container)">
<include file="$(find-pkg-share autoware_launch)/launch/pointcloud_container.launch.py">
<arg name="use_multithread" value="true"/>
<arg name="container_name" value="$(var pointcloud_container_name)"/>
</include>
</group> -->

<!-- Vehicle -->
<!-- <group if="$(var launch_vehicle)">
<include file="$(find-pkg-share tier4_vehicle_launch)/launch/vehicle.launch.xml">
<arg name="vehicle_model" value="$(var vehicle_model)"/>
<arg name="sensor_model" value="$(var sensor_model)"/>
<arg name="vehicle_id" value="$(var vehicle_id)"/>
<arg name="launch_vehicle_interface" value="$(var launch_vehicle_interface)"/>
<arg name="config_dir" value="$(find-pkg-share individual_params)/config/$(var vehicle_id)/$(var sensor_model)"/>
</include>
</group> -->

<!-- System -->
<group if="$(var launch_system)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_system_component.launch.xml"/>
</group>

<!-- Map -->
<!-- <group if="$(var launch_map)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_map_component.launch.xml"/>
</group> -->

<!-- Sensing -->
<!-- <group if="$(var launch_sensing)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_sensing_component.launch.xml"/>
</group> -->

<!-- Localization -->
<!-- <group if="$(var launch_localization)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_localization_component.launch.xml"/>
</group> -->

<!-- Perception -->
<!-- <group if="$(var launch_perception)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_perception_component.launch.xml">
<arg name="data_path" value="$(var data_path)"/>
</include>
</group> -->

<!-- Planning -->
<group if="$(var launch_planning)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_planning_component.launch.xml">
<arg name="module_preset" value="$(var planning_module_preset)"/>
<arg name="enable_all_modules_auto_mode" value="$(var enable_all_modules_auto_mode)"/>
<arg name="is_simulation" value="$(var is_simulation)"/>
</include>
</group>

<!-- Control -->
<group if="$(var launch_control)">
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_control_component.launch.xml"/>
</group>

<!-- API -->
<group>
<include file="$(find-pkg-share autoware_launch)/launch/components/tier4_autoware_api_component.launch.xml"/>
</group>

<!-- V2X -->
<!-- <group if="$(var launch_v2x)">
<include file="$(find-pkg-share jpn_signal_launcher)/launch/jpn_signal.launch.xml">
<arg name="map_path" value="$(var map_path)"/>
<arg name="vehicle_model" value="$(var vehicle_model)"/>
<arg name="vehicle_id" value="1"/>
</include>
</group> -->

<!-- L4 Toolkit -->
<!-- <group if="$(var launch_l4_toolkit)">
<include file="$(find-pkg-share l4_toolkit_launch)/launch/l4_toolkit.launch.xml"/>
</group> -->

<!-- Tools -->
<group>
<node
pkg="rviz2"
exec="rviz2"
name="rviz2"
output="screen"
args="-d $(var rviz_config) -s $(find-pkg-share autoware_launch)/rviz/image/autoware.png"
if="$(var rviz)"
respawn="$(var rviz_respawn)"
/>
<group if="$(var launch_system)">
<include file="$(find-pkg-share diagnostic_graph_aggregator)/launch/converter.launch.xml">
<arg name="complement" value="true"/>
</include>
</group>
</group>
</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="launch_system_monitor" default="$(var launch_system_monitor)"/>

<arg name="system_monitor_cpu_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_monitor/cpu_monitor.param.yaml"/>
<arg name="system_monitor_gpu_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_monitor/gpu_monitor.param.yaml"/>
<arg name="system_monitor_hdd_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_monitor/hdd_monitor.param.yaml"/>
<arg name="system_monitor_mem_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_monitor/mem_monitor.param.yaml"/>
<arg name="system_monitor_net_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_monitor/net_monitor.param.yaml"/>
<arg name="system_monitor_ntp_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_monitor/ntp_monitor.param.yaml"/>
<arg name="system_monitor_process_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_monitor/process_monitor.param.yaml"/>
<arg name="system_monitor_voltage_monitor_param_path" default="$(find-pkg-share autoware_launch)/config/system/system_monitor/voltage_monitor.param.yaml"/>

<group>
<push-ros-namespace namespace="/system"/>
<!-- System Monitor -->
<group if="$(var launch_system_monitor)">
<push-ros-namespace namespace="system_monitor"/>
<include file="$(find-pkg-share system_monitor)/launch/system_monitor.launch.xml">
<arg name="cpu_monitor_config_file" value="$(var system_monitor_cpu_monitor_param_path)"/>
<arg name="gpu_monitor_config_file" value="$(var system_monitor_gpu_monitor_param_path)"/>
<arg name="hdd_monitor_config_file" value="$(var system_monitor_hdd_monitor_param_path)"/>
<arg name="mem_monitor_config_file" value="$(var system_monitor_mem_monitor_param_path)"/>
<arg name="net_monitor_config_file" value="$(var system_monitor_net_monitor_param_path)"/>
<arg name="ntp_monitor_config_file" value="$(var system_monitor_ntp_monitor_param_path)"/>
<arg name="process_monitor_config_file" value="$(var system_monitor_process_monitor_param_path)"/>
<arg name="voltage_monitor_config_file" value="$(var system_monitor_voltage_monitor_param_path)"/>
</include>
</group>
</group>
</launch>

0 comments on commit b1f44bb

Please sign in to comment.