Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
civerachb-cpr committed Aug 29, 2024
1 parent 3fa24a1 commit 2d71114
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions turtlebot4_navigation/launch/slam.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
from launch.conditions import IfCondition, UnlessCondition
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution

from launch_ros.actions import Node, PushRosNamespace, SetRemap

from nav2_common.launch import RewrittenYaml
from launch_ros.actions import PushRosNamespace, SetRemap

pkg_turtlebot4_navigation = get_package_share_directory('turtlebot4_navigation')
pkg_slam_toolbox = get_package_share_directory('slam_toolbox')
Expand All @@ -46,12 +43,12 @@
description='Robot namespace'),
DeclareLaunchArgument('autostart', default_value='true',
choices=['true', 'false'],
description='Automatically startup the slamtoolbox. Ignored when use_lifecycle_manager is true.'),
description='Automatically startup the slamtoolbox. Ignored when use_lifecycle_manager is true.'), # noqa: E501
DeclareLaunchArgument('use_lifecycle_manager', default_value='false',
choices=['true', 'false'],
description='Enable bond connection during node activation'),
DeclareLaunchArgument('params',
default_value=PathJoinSubstitution([pkg_turtlebot4_navigation, 'config', 'slam.yaml']),
default_value=PathJoinSubstitution([pkg_turtlebot4_navigation, 'config', 'slam.yaml']), # noqa: E501
description='Path to the SLAM Toolbox configuration file')
]

Expand All @@ -70,7 +67,7 @@ def launch_setup(context, *args, **kwargs):

launch_slam_sync = PathJoinSubstitution(
[pkg_slam_toolbox, 'launch', 'online_sync_launch.py'])

launch_slam_async = PathJoinSubstitution(
[pkg_slam_toolbox, 'launch', 'online_async_launch.py'])

Expand All @@ -85,18 +82,18 @@ def launch_setup(context, *args, **kwargs):

IncludeLaunchDescription(
PythonLaunchDescriptionSource(launch_slam_sync),
launch_arguments = [
launch_arguments=[
('use_sim_time', use_sim_time),
('autostart', autostart),
('use_lifecycle_manager', use_lifecycle_manager),
('slam_params_file', slam_params)
],
condition=IfCondition(sync)
),

IncludeLaunchDescription(
PythonLaunchDescriptionSource(launch_slam_async),
launch_arguments = [
launch_arguments=[
('use_sim_time', use_sim_time),
('autostart', autostart),
('use_lifecycle_manager', use_lifecycle_manager),
Expand All @@ -108,6 +105,7 @@ def launch_setup(context, *args, **kwargs):

return [slam]


def generate_launch_description():
ld = LaunchDescription(ARGUMENTS)
ld.add_action(OpaqueFunction(function=launch_setup))
Expand Down

0 comments on commit 2d71114

Please sign in to comment.