|
2 | 2 |
|
3 | 3 | # Copyright (c) 2024 John Chrosniak
|
4 | 4 | #
|
5 |
| -# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# Licensed under the Apache License, Version 2.0 (the 'License'); |
6 | 6 | # you may not use this file except in compliance with the License.
|
7 | 7 | # You may obtain a copy of the License at
|
8 | 8 | #
|
9 | 9 | # http://www.apache.org/licenses/LICENSE-2.0
|
10 | 10 | #
|
11 | 11 | # Unless required by applicable law or agreed to in writing, software
|
12 |
| -# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# distributed under the License is distributed on an 'AS IS' BASIS, |
13 | 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 | 14 | # See the License for the specific language governing permissions and
|
15 | 15 | # limitations under the License.
|
|
26 | 26 | def generate_launch_description():
|
27 | 27 |
|
28 | 28 | # Nodes launching commands
|
29 |
| - map_file = LaunchConfiguration("yaml_filename") |
| 29 | + map_file = LaunchConfiguration('yaml_filename') |
30 | 30 |
|
31 | 31 | declare_map_file_cmd = DeclareLaunchArgument(
|
32 |
| - "yaml_filename", |
33 |
| - default_value="", |
34 |
| - description="Full path to an occupancy grid map yaml file", |
| 32 | + 'yaml_filename', |
| 33 | + default_value='', |
| 34 | + description='Full path to an occupancy grid map yaml file', |
35 | 35 | )
|
36 | 36 |
|
37 | 37 | start_route_tool_cmd = launch_ros.actions.Node(
|
38 |
| - package="rviz2", |
39 |
| - executable="rviz2", |
40 |
| - output="screen", |
| 38 | + package='rviz2', |
| 39 | + executable='rviz2', |
| 40 | + output='screen', |
41 | 41 | arguments=[
|
42 |
| - "-d" |
| 42 | + '-d' |
43 | 43 | + os.path.join(
|
44 |
| - get_package_share_directory("nav2_rviz_plugins"), |
45 |
| - "rviz", |
46 |
| - "route_tool.rviz", |
| 44 | + get_package_share_directory('nav2_rviz_plugins'), |
| 45 | + 'rviz', |
| 46 | + 'route_tool.rviz', |
47 | 47 | )
|
48 | 48 | ],
|
49 | 49 | )
|
50 | 50 |
|
51 | 51 | start_map_server = launch_ros.actions.Node(
|
52 |
| - package="nav2_map_server", |
53 |
| - executable="map_server", |
54 |
| - output="screen", |
55 |
| - parameters=[{"yaml_filename": map_file}], |
| 52 | + package='nav2_map_server', |
| 53 | + executable='map_server', |
| 54 | + output='screen', |
| 55 | + parameters=[{'yaml_filename': map_file}], |
56 | 56 | )
|
57 | 57 |
|
58 | 58 | start_lifecycle_manager_cmd = launch_ros.actions.Node(
|
59 |
| - package="nav2_lifecycle_manager", |
60 |
| - executable="lifecycle_manager", |
61 |
| - name="lifecycle_manager", |
62 |
| - output="screen", |
| 59 | + package='nav2_lifecycle_manager', |
| 60 | + executable='lifecycle_manager', |
| 61 | + name='lifecycle_manager', |
| 62 | + output='screen', |
63 | 63 | parameters=[
|
64 |
| - {"use_sim_time": False}, |
65 |
| - {"autostart": True}, |
66 |
| - {"node_names": ["map_server"]}, |
| 64 | + {'use_sim_time': False}, |
| 65 | + {'autostart': True}, |
| 66 | + {'node_names': ['map_server']}, |
67 | 67 | ],
|
68 | 68 | )
|
69 | 69 |
|
|
0 commit comments