Skip to content

Commit

Permalink
Merge pull request autowarefoundation#727 from tier4/feat/split-launc…
Browse files Browse the repository at this point in the history
…her-v310

feat: split autoware launch for main and sub ecu
  • Loading branch information
Naophis authored Aug 15, 2024
2 parents 2878102 + fd3eee0 commit 696cc60
Show file tree
Hide file tree
Showing 2 changed files with 306 additions and 0 deletions.
153 changes: 153 additions & 0 deletions autoware_launch/launch/autoware.main.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?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" default="sample_vehicle" description="vehicle model name"/>
<arg name="sensor_model" default="sample_sensor_kit" description="sensor model name"/>
<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_api" default="true" description="launch api"/>
<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"/>
<arg name="diagnostic_graph_aggregator_graph_path" default="$(find-pkg-share autoware_launch)/config/system/diagnostic_graph_aggregator/autoware-main.yaml" description="diagnostic graph config"/>
<!-- 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 -->
<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>

<!-- 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)"/>
<arg name="raw_vehicle_cmd_converter_param_path" value="$(find-pkg-share autoware_launch)/config/vehicle/raw_vehicle_cmd_converter/raw_vehicle_cmd_converter.param.yaml"/>
</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 if="$(var launch_api)">
<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> -->
</launch>
153 changes: 153 additions & 0 deletions autoware_launch/launch/autoware.sub.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?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" default="sample_vehicle" description="vehicle model name"/>
<arg name="sensor_model" default="sample_sensor_kit" description="sensor model name"/>
<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_api" default="true" description="launch api"/>
<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"/>
<arg name="diagnostic_graph_aggregator_graph_path" default="$(find-pkg-share autoware_launch)/config/system/diagnostic_graph_aggregator/autoware-main.yaml" description="diagnostic graph config"/>
<!-- 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 -->
<!-- <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> -->

<!-- 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)"/>
<arg name="raw_vehicle_cmd_converter_param_path" value="$(find-pkg-share autoware_launch)/config/vehicle/raw_vehicle_cmd_converter/raw_vehicle_cmd_converter.param.yaml"/>
</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 if="$(var launch_api)">
<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>
</launch>

0 comments on commit 696cc60

Please sign in to comment.