Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Format launch files (#228)
Browse files Browse the repository at this point in the history
* Format launch files

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Format launch.py

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix lint

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
  • Loading branch information
kenji-miyake authored and wep21 committed May 24, 2021
1 parent 6339d1a commit 5427bd9
Show file tree
Hide file tree
Showing 17 changed files with 158 additions and 108 deletions.
30 changes: 18 additions & 12 deletions control_launch/launch/control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@
# limitations under the License.

import launch
from launch.actions import DeclareLaunchArgument, GroupAction,\
OpaqueFunction, SetLaunchConfiguration
from launch.conditions import IfCondition, LaunchConfigurationEquals, UnlessCondition
from launch.actions import DeclareLaunchArgument
from launch.actions import GroupAction
from launch.actions import OpaqueFunction
from launch.actions import SetLaunchConfiguration
from launch.conditions import IfCondition
from launch.conditions import LaunchConfigurationEquals
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration

from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes, PushRosNamespace
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import LoadComposableNodes
from launch_ros.actions import PushRosNamespace
from launch_ros.descriptions import ComposableNode
from launch_ros.substitutions import FindPackageShare

import yaml


Expand Down Expand Up @@ -388,10 +392,12 @@ def add_launch_arg(name: str, default_value=None):
condition=IfCondition(LaunchConfiguration('use_multithread'))
)
return launch.LaunchDescription(
launch_arguments +
[set_container_executable,
set_container_mt_executable] +
[
OpaqueFunction(function=launch_setup)
]
launch_arguments +
[
set_container_executable,
set_container_mt_executable,
] +
[
OpaqueFunction(function=launch_setup)
]
)
2 changes: 1 addition & 1 deletion integration_launch/launch/release.launch.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<!-- TODO: add the appropriate vehicle and sensor model below. -->
<!-- TODO: add the appropriate vehicle and sensor model below. -->
<arg name="vehicle_model" default="" />
<arg name="sensor_model" default="" />
<arg name="map_path" default="/opt/autoware/maps/" />
Expand Down
2 changes: 1 addition & 1 deletion localization_launch/launch/util/util.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<arg name="ndt_align_server_name" value="/localization/pose_estimator/ndt_align_srv" />
</include>

<include file="$(find-pkg-share localization_launch)/launch/util/util.launch.py" />
<include file="$(find-pkg-share localization_launch)/launch/util/util.launch.py" />

</launch>
11 changes: 7 additions & 4 deletions map_launch/launch/map.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
# limitations under the License.

import launch
from launch.actions import DeclareLaunchArgument, GroupAction, SetLaunchConfiguration
from launch.conditions import IfCondition, UnlessCondition
from launch.actions import DeclareLaunchArgument
from launch.actions import GroupAction
from launch.actions import SetLaunchConfiguration
from launch.conditions import IfCondition
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration

from launch_ros.actions import ComposableNodeContainer, PushRosNamespace
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import PushRosNamespace
from launch_ros.descriptions import ComposableNode


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
import os

from ament_index_python.packages import get_package_share_directory

import launch
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import LoadComposableNodes
from launch_ros.descriptions import ComposableNode


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# 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.substitutions import LaunchConfiguration
Expand Down Expand Up @@ -63,6 +64,6 @@ def generate_launch_description():
],
)
return launch.LaunchDescription([
DeclareLaunchArgument("use_intra_process", default_value='false'),
DeclareLaunchArgument('use_intra_process', default_value='false'),
container
])
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os

from ament_index_python.packages import get_package_share_directory
import launch
from launch.actions import DeclareLaunchArgument, SetLaunchConfiguration, ExecuteProcess
from launch.conditions import IfCondition, UnlessCondition
from launch.actions import DeclareLaunchArgument
from launch.actions import ExecuteProcess
from launch.actions import SetLaunchConfiguration
from launch.conditions import IfCondition
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration

from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode

import os
import yaml


Expand Down Expand Up @@ -65,11 +67,11 @@ def generate_launch_description():
parameters=[
lane_change_planner_param,
{
"enable_abort_lane_change": False,
"enable_collision_check_at_prepare_phase": False,
"use_predicted_path_outside_lanelet": False,
"use_all_predicted_path": False,
"enable_blocked_by_obstacle": False,
'enable_abort_lane_change': False,
'enable_collision_check_at_prepare_phase': False,
'use_predicted_path_outside_lanelet': False,
'use_all_predicted_path': False,
'enable_blocked_by_obstacle': False,
}
],
extra_arguments=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os

from ament_index_python.packages import get_package_share_directory
import launch
from launch.actions import DeclareLaunchArgument, SetLaunchConfiguration
from launch.conditions import IfCondition, UnlessCondition
from launch.actions import DeclareLaunchArgument
from launch.actions import SetLaunchConfiguration
from launch.conditions import IfCondition
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration

from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import LoadComposableNodes
from launch_ros.descriptions import ComposableNode

import os
import yaml


Expand Down
15 changes: 10 additions & 5 deletions planning_launch/launch/scenario_planning/parking.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@
# 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, GroupAction, SetLaunchConfiguration
from launch.conditions import IfCondition, UnlessCondition
from launch.actions import DeclareLaunchArgument
from launch.actions import GroupAction
from launch.actions import SetLaunchConfiguration
from launch.conditions import IfCondition
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import ComposableNodeContainer, PushRosNamespace
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import PushRosNamespace
from launch_ros.descriptions import ComposableNode


Expand Down Expand Up @@ -123,8 +128,8 @@ def generate_launch_description():
)

return launch.LaunchDescription([
DeclareLaunchArgument("use_intra_process", default_value='false'),
DeclareLaunchArgument("use_multithread", default_value='false'),
DeclareLaunchArgument('use_intra_process', default_value='false'),
DeclareLaunchArgument('use_multithread', default_value='false'),
set_container_executable,
set_container_mt_executable,
GroupAction([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import yaml

import launch
from launch.actions import DeclareLaunchArgument, OpaqueFunction, SetLaunchConfiguration
from launch.conditions import IfCondition, UnlessCondition
from launch.actions import DeclareLaunchArgument
from launch.actions import OpaqueFunction
from launch.actions import SetLaunchConfiguration
from launch.conditions import IfCondition
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import LoadComposableNodes
from launch_ros.descriptions import ComposableNode
from launch.substitutions import EnvironmentVariable
import yaml


def get_vehicle_info(context):
path = LaunchConfiguration('vehicle_param_file').perform(context)
Expand All @@ -38,6 +41,7 @@ def get_vehicle_info(context):
p['max_height_offset'] = p['vehicle_height']
return p


def get_vehicle_mirror_info(context):
path = LaunchConfiguration('vehicle_mirror_param_file').perform(context)
with open(path, 'r') as f:
Expand Down Expand Up @@ -120,9 +124,9 @@ def launch_setup(context, *args, **kwargs):
('output', 'no_ground/pointcloud')
],
parameters=[{
"general_max_slope": 10.0,
"local_max_slope": 10.0,
"min_height_threshold": 0.2,
'general_max_slope': 10.0,
'local_max_slope': 10.0,
'min_height_threshold': 0.2,
}],
extra_arguments=[{
'use_intra_process_comms': LaunchConfiguration('use_intra_process')
Expand Down Expand Up @@ -157,6 +161,7 @@ def launch_setup(context, *args, **kwargs):

return [container, concat_loader, passthrough_loader]


def generate_launch_description():

launch_arguments = []
Expand Down
24 changes: 14 additions & 10 deletions sensing_launch/launch/aip_s1/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import yaml

import launch
from launch.actions import DeclareLaunchArgument, OpaqueFunction, SetLaunchConfiguration
from launch.conditions import IfCondition, UnlessCondition
from launch.actions import DeclareLaunchArgument
from launch.actions import OpaqueFunction
from launch.actions import SetLaunchConfiguration
from launch.conditions import IfCondition
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import LoadComposableNodes
from launch_ros.descriptions import ComposableNode
from launch.substitutions import EnvironmentVariable
import yaml


def get_vehicle_info(context):
path = LaunchConfiguration('vehicle_param_file').perform(context)
Expand All @@ -37,6 +39,7 @@ def get_vehicle_info(context):
p['max_height_offset'] = p['vehicle_height']
return p


def get_vehicle_mirror_info(context):
path = LaunchConfiguration('vehicle_mirror_param_file').perform(context)
with open(path, 'r') as f:
Expand Down Expand Up @@ -119,9 +122,9 @@ def launch_setup(context, *args, **kwargs):
('output', 'no_ground/pointcloud')
],
parameters=[{
"general_max_slope": 10.0,
"local_max_slope": 10.0,
"min_height_threshold": 0.2,
'general_max_slope': 10.0,
'local_max_slope': 10.0,
'min_height_threshold': 0.2,
}],
extra_arguments=[{
'use_intra_process_comms': LaunchConfiguration('use_intra_process')
Expand Down Expand Up @@ -156,6 +159,7 @@ def launch_setup(context, *args, **kwargs):

return [container, concat_loader, passthrough_loader]


def generate_launch_description():

launch_arguments = []
Expand Down
12 changes: 8 additions & 4 deletions sensing_launch/launch/aip_x1/pointcloud_preprocessor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
# limitations under the License.

import launch
from launch.actions import DeclareLaunchArgument, OpaqueFunction, SetLaunchConfiguration
from launch.conditions import IfCondition, UnlessCondition
from launch.substitutions import EnvironmentVariable, LaunchConfiguration
from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes
from launch.actions import DeclareLaunchArgument
from launch.actions import OpaqueFunction
from launch.actions import SetLaunchConfiguration
from launch.conditions import IfCondition
from launch.conditions import UnlessCondition
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import ComposableNodeContainer
from launch_ros.actions import LoadComposableNodes
from launch_ros.descriptions import ComposableNode
import yaml

Expand Down
Loading

0 comments on commit 5427bd9

Please sign in to comment.