diff --git a/README.md b/README.md index 2e4b5af38..dc6f60786 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,5 @@ ros2 launch autoware_launch planning_simulator.launch.xml map_path:=/path/to/map - [autoware_launch](./autoware_launch) - [control_launch](./control_launch) - [integration_launch](./integration_launch) -- [localization_launch](./localization_launch) - [planning_launch](./planning_launch) - [system_launch](./system_launch) diff --git a/localization_launch/config/crop_box_filter_measurement_range.param.yaml b/autoware_launch/config/localization/crop_box_filter_measurement_range.param.yaml similarity index 100% rename from localization_launch/config/crop_box_filter_measurement_range.param.yaml rename to autoware_launch/config/localization/crop_box_filter_measurement_range.param.yaml diff --git a/localization_launch/config/localization_error_monitor.param.yaml b/autoware_launch/config/localization/localization_error_monitor.param.yaml similarity index 100% rename from localization_launch/config/localization_error_monitor.param.yaml rename to autoware_launch/config/localization/localization_error_monitor.param.yaml diff --git a/localization_launch/config/ndt_scan_matcher.param.yaml b/autoware_launch/config/localization/ndt_scan_matcher.param.yaml similarity index 100% rename from localization_launch/config/ndt_scan_matcher.param.yaml rename to autoware_launch/config/localization/ndt_scan_matcher.param.yaml diff --git a/localization_launch/config/random_downsample_filter.param.yaml b/autoware_launch/config/localization/random_downsample_filter.param.yaml similarity index 100% rename from localization_launch/config/random_downsample_filter.param.yaml rename to autoware_launch/config/localization/random_downsample_filter.param.yaml diff --git a/localization_launch/config/voxel_grid_filter.param.yaml b/autoware_launch/config/localization/voxel_grid_filter.param.yaml similarity index 100% rename from localization_launch/config/voxel_grid_filter.param.yaml rename to autoware_launch/config/localization/voxel_grid_filter.param.yaml diff --git a/autoware_launch/launch/autoware.launch.xml b/autoware_launch/launch/autoware.launch.xml index c6d17ba03..f3d79b996 100644 --- a/autoware_launch/launch/autoware.launch.xml +++ b/autoware_launch/launch/autoware.launch.xml @@ -95,7 +95,7 @@ - + diff --git a/autoware_launch/launch/components/tier4_localization_component.launch.xml b/autoware_launch/launch/components/tier4_localization_component.launch.xml new file mode 100644 index 000000000..7ef5fa06f --- /dev/null +++ b/autoware_launch/launch/components/tier4_localization_component.launch.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/autoware_launch/package.xml b/autoware_launch/package.xml index a9d0f1bbd..76260f859 100644 --- a/autoware_launch/package.xml +++ b/autoware_launch/package.xml @@ -13,13 +13,13 @@ autoware_api_launch control_launch global_parameter_loader - localization_launch planning_launch python3-bson python3-tornado rviz2 simulator_launch system_launch + tier4_localization_launch tier4_map_launch tier4_perception_launch tier4_sensing_launch diff --git a/localization_launch/CMakeLists.txt b/localization_launch/CMakeLists.txt deleted file mode 100644 index 9815ea4b7..000000000 --- a/localization_launch/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(localization_launch) - -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) -endif() -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic -Wno-unused-parameter) -endif() - -find_package(ament_cmake_auto REQUIRED) -ament_auto_find_build_dependencies() - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - -ament_auto_package(INSTALL_TO_SHARE - launch - config -) diff --git a/localization_launch/README.md b/localization_launch/README.md deleted file mode 100644 index 959768012..000000000 --- a/localization_launch/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# localization_launch - -## Structure - -![localization_launch](./localization_launch.drawio.svg) - -## Package Dependencies - -Please see `` in `package.xml`. - -## Usage - -You can include as follows in `*.launch.xml` to use `localization.launch.xml`. - -```xml - - -``` - -## Notes - -There are some `param.yaml` files in `config` directory. - -```bash -ndt_scan_matcher.param.yaml -``` diff --git a/localization_launch/launch/localization.launch.xml b/localization_launch/launch/localization.launch.xml deleted file mode 100644 index 91fbe6ac9..000000000 --- a/localization_launch/launch/localization.launch.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/localization_launch/launch/localization_error_monitor/localization_error_monitor.launch.xml b/localization_launch/launch/localization_error_monitor/localization_error_monitor.launch.xml deleted file mode 100644 index c895da491..000000000 --- a/localization_launch/launch/localization_error_monitor/localization_error_monitor.launch.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/localization_launch/launch/pose_estimator/pose_estimator.launch.xml b/localization_launch/launch/pose_estimator/pose_estimator.launch.xml deleted file mode 100644 index 3273db453..000000000 --- a/localization_launch/launch/pose_estimator/pose_estimator.launch.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/localization_launch/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml b/localization_launch/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml deleted file mode 100644 index 3c109769e..000000000 --- a/localization_launch/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/localization_launch/launch/twist_estimator/twist_estimator.launch.xml b/localization_launch/launch/twist_estimator/twist_estimator.launch.xml deleted file mode 100644 index 155521a0e..000000000 --- a/localization_launch/launch/twist_estimator/twist_estimator.launch.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/localization_launch/launch/util/util.launch.py b/localization_launch/launch/util/util.launch.py deleted file mode 100644 index 1721ec7d7..000000000 --- a/localization_launch/launch/util/util.launch.py +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 2020 Tier IV, Inc. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import launch -from launch.actions import DeclareLaunchArgument -from launch.actions import OpaqueFunction -from launch.conditions import LaunchConfigurationNotEquals -from launch.substitutions import LaunchConfiguration -from launch_ros.actions import LoadComposableNodes -from launch_ros.descriptions import ComposableNode -from launch_ros.substitutions import FindPackageShare -import yaml - - -def launch_setup(context, *args, **kwargs): - # https://github.com/ros2/launch_ros/issues/156 - def load_composable_node_param(param_path): - with open(LaunchConfiguration(param_path).perform(context), "r") as f: - return yaml.safe_load(f)["/**"]["ros__parameters"] - - crop_box_component = ComposableNode( - package="pointcloud_preprocessor", - plugin="pointcloud_preprocessor::CropBoxFilterComponent", - name="crop_box_filter_measurement_range", - remappings=[ - ("input", LaunchConfiguration("input/pointcloud")), - ("output", "measurement_range/pointcloud"), - ], - parameters=[ - load_composable_node_param("crop_box_filter_measurement_range_param_path"), - ], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - voxel_grid_downsample_component = ComposableNode( - package="pointcloud_preprocessor", - plugin="pointcloud_preprocessor::VoxelGridDownsampleFilterComponent", - name="voxel_grid_downsample_filter", - remappings=[ - ("input", "measurement_range/pointcloud"), - ("output", "voxel_grid_downsample/pointcloud"), - ], - parameters=[load_composable_node_param("voxel_grid_downsample_filter_param_path")], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - random_downsample_component = ComposableNode( - package="pointcloud_preprocessor", - plugin="pointcloud_preprocessor::RandomDownsampleFilterComponent", - name="random_downsample_filter", - remappings=[ - ("input", "voxel_grid_downsample/pointcloud"), - ("output", LaunchConfiguration("output/pointcloud")), - ], - parameters=[load_composable_node_param("random_downsample_filter_param_path")], - extra_arguments=[{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}], - ) - - composable_nodes = [ - crop_box_component, - voxel_grid_downsample_component, - random_downsample_component, - ] - - load_composable_nodes = LoadComposableNodes( - condition=LaunchConfigurationNotEquals("container", ""), - composable_node_descriptions=composable_nodes, - target_container=LaunchConfiguration("container"), - ) - - return [load_composable_nodes] - - -def generate_launch_description(): - launch_arguments = [] - - def add_launch_arg(name: str, default_value=None, description=None): - arg = DeclareLaunchArgument(name, default_value=default_value, description=description) - launch_arguments.append(arg) - - add_launch_arg( - "crop_box_filter_measurement_range_param_path", - [ - FindPackageShare("localization_launch"), - "/config/crop_box_filter_measurement_range.param.yaml", - ], - "path to the parameter file of crop_box_filter_measurement_range", - ) - add_launch_arg( - "voxel_grid_downsample_filter_param_path", - [FindPackageShare("localization_launch"), "/config/voxel_grid_filter.param.yaml"], - "path to the parameter file of voxel_grid_downsample_filter", - ) - add_launch_arg( - "random_downsample_filter_param_path", - [FindPackageShare("localization_launch"), "/config/random_downsample_filter.param.yaml"], - "path to the parameter file of random_downsample_filter", - ) - add_launch_arg("use_intra_process", "true", "use ROS2 component container communication") - - add_launch_arg( - "output/pointcloud", - "downsample/pointcloud", - "final output topic name", - ) - - return launch.LaunchDescription(launch_arguments + [OpaqueFunction(function=launch_setup)]) diff --git a/localization_launch/launch/util/util.launch.xml b/localization_launch/launch/util/util.launch.xml deleted file mode 100644 index 783eee8ad..000000000 --- a/localization_launch/launch/util/util.launch.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/localization_launch/localization_launch.drawio.svg b/localization_launch/localization_launch.drawio.svg deleted file mode 100644 index 1bde30243..000000000 --- a/localization_launch/localization_launch.drawio.svg +++ /dev/null @@ -1,530 +0,0 @@ - - - - - - - - - - - /sensing/lidar/top/pointcloud_preprocessor/velodyne_node_container - - - - - package: rclcpp_components - - - - - - - - /sensing/lidar/top/pointcloud_preprocessor/velodyne_node_container... - - - - - - - - - - - localization.launch.xml - - - - - package: localization - - - _launch - - - - - - - - localization.launch.xml... - - - - - - - - - - - - - - - util.launch.xml - - - - package: localization_launch - - - - - - - util.launch.xml... - - - - - - - - - - - - - - - pose_estimator.launch.xml - - - - - package: localization_launch - - - - - - - - pose_estimator.launch.xml... - - - - - - - - - - - launch name - - - - - package: package name - - - - - - - - launch name... - - - - - - - - - - - ex: - - - - - - ex: - - - - - - - - - - - node name - - - - - package: package name - - - - - - - - node name... - - - - - - - - - - - other name - - - - - package: package name - - - - - - - - other name... - - - - - - - - - - - - - twist_estimator.launch.xml - - - - - package: localization_launch - - - - - - - - twist_estimator.launch.xml... - - - - - - - - - - - - - pose_twist_fusion_filter.launch.xml - - - - - package: localization_launch - - - - - - - - pose_twist_fusion_filter.launch.xml... - - - - - - - - - - - - - localization_error_monitor.launch.xml - - - - - package: localization_error_monitor - - - - - - - - localization_error_monitor.launch.xml... - - - - - - - - - - - - - relay - - - - - package: topic_tools - - - - - - - - - - input: /localization/pose_twist_fusion_filter/twist - - - - - output: /localization/twist - - - - - - - - relay... - - - - - - - - - - - - - ndt_scan_matcher.launch.xml - - - - - package: ndt_scan_matcher - - - - - - - - ndt_scan_matcher.launch.xml... - - - - - - - - - - - - - gyro_odometer.launch.xml - - - - - package: gyro_odometer - - - - - - - - gyro_odometer.launch.xml... - - - - - - - - - - - - - ekf_localizer.launch.xml - - - - - package: ekf_localizer - - - - - - - - ekf_localizer.launch.xml... - - - - - - - - - - - - - pose_initializer.launch.xml - - - - - package: pose_initializer - - - - - - - - pose_initializer.launch.xml... - - - - - - - - - - - util.launch.py - - - - - package: localization_launch - - - - - - - - util.launch.py... - - - - - - - - - - - - - crop_box_measurement_range - - - - - package: pointcloud_preprocessor - - - - - - - - crop_box_measurement_range... - - - - - - - - - - - voxel_grid_downsample_filter - - - - - package: pointcloud_preprocessor - - - - - - - - voxel_grid_downsample_filter... - - - - - - - - - - - random_downsample_filter - - - - - package: pointcloud_preprocessor - - - - - - - - random_downsample_filter... - - - - - - - - - - - Viewer does not support full SVG 1.1 - - - - diff --git a/localization_launch/package.xml b/localization_launch/package.xml deleted file mode 100644 index c61aaeed7..000000000 --- a/localization_launch/package.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - localization_launch - 0.1.0 - The localization_launch package - - Yamato Ando - - Apache License 2.0 - - ament_cmake_auto - - automatic_pose_initializer - ekf_localizer - gyro_odometer - ndt_scan_matcher - pointcloud_preprocessor - pose_initializer - topic_tools - - ament_lint_auto - autoware_lint_common - - - ament_cmake - -