Skip to content

Commit 0ade922

Browse files
audited and removed unnecessarily complex launch configurations (#2295)
1 parent aaf2561 commit 0ade922

7 files changed

Lines changed: 10 additions & 104 deletions

File tree

nav2_bringup/bringup/launch/bringup_launch.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ def generate_launch_description():
3737
map_yaml_file = LaunchConfiguration('map')
3838
use_sim_time = LaunchConfiguration('use_sim_time')
3939
params_file = LaunchConfiguration('params_file')
40-
default_nav_through_poses_bt_xml = LaunchConfiguration('default_nav_through_poses_bt_xml')
41-
default_nav_to_pose_bt_xml = LaunchConfiguration('default_nav_to_pose_bt_xml')
4240
autostart = LaunchConfiguration('autostart')
4341

4442
stdout_linebuf_envvar = SetEnvironmentVariable(
@@ -73,20 +71,6 @@ def generate_launch_description():
7371
default_value=os.path.join(bringup_dir, 'params', 'nav2_params.yaml'),
7472
description='Full path to the ROS2 parameters file to use for all launched nodes')
7573

76-
default_nav_through_poses_bt_xml_cmd = DeclareLaunchArgument(
77-
'default_nav_through_poses_bt_xml',
78-
default_value=os.path.join(
79-
get_package_share_directory('nav2_bt_navigator'),
80-
'behavior_trees', 'navigate_through_poses_w_replanning_and_recovery.xml'),
81-
description='Full path to the behavior tree xml file to use')
82-
83-
default_nav_to_pose_bt_xml_cmd = DeclareLaunchArgument(
84-
'default_nav_to_pose_bt_xml',
85-
default_value=os.path.join(
86-
get_package_share_directory('nav2_bt_navigator'),
87-
'behavior_trees', 'navigate_to_pose_w_replanning_and_recovery.xml'),
88-
description='Full path to the behavior tree xml file to use')
89-
9074
declare_autostart_cmd = DeclareLaunchArgument(
9175
'autostart', default_value='true',
9276
description='Automatically startup the nav2 stack')
@@ -122,8 +106,6 @@ def generate_launch_description():
122106
'use_sim_time': use_sim_time,
123107
'autostart': autostart,
124108
'params_file': params_file,
125-
'default_nav_through_poses_bt_xml': default_nav_through_poses_bt_xml,
126-
'default_nav_to_pose_bt_xml': default_nav_to_pose_bt_xml,
127109
'use_lifecycle_mgr': 'false',
128110
'map_subscribe_transient_local': 'true'}.items()),
129111
])
@@ -142,8 +124,6 @@ def generate_launch_description():
142124
ld.add_action(declare_use_sim_time_cmd)
143125
ld.add_action(declare_params_file_cmd)
144126
ld.add_action(declare_autostart_cmd)
145-
ld.add_action(default_nav_through_poses_bt_xml_cmd)
146-
ld.add_action(default_nav_to_pose_bt_xml_cmd)
147127

148128
# Add the actions to launch all of the navigation nodes
149129
ld.add_action(bringup_cmd_group)

nav2_bringup/bringup/launch/multi_tb3_simulation_launch.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ def generate_launch_description():
4949
# On this example all robots are launched with the same settings
5050
map_yaml_file = LaunchConfiguration('map')
5151

52-
default_nav_through_poses_bt_xml = LaunchConfiguration('default_nav_through_poses_bt_xml')
53-
default_nav_to_pose_bt_xml = LaunchConfiguration('default_nav_to_pose_bt_xml')
5452
autostart = LaunchConfiguration('autostart')
5553
rviz_config_file = LaunchConfiguration('rviz_config')
5654
use_robot_state_pub = LaunchConfiguration('use_robot_state_pub')
@@ -83,20 +81,6 @@ def generate_launch_description():
8381
default_value=os.path.join(bringup_dir, 'params', 'nav2_multirobot_params_2.yaml'),
8482
description='Full path to the ROS2 parameters file to use for robot2 launched nodes')
8583

86-
default_nav_through_poses_bt_xml_cmd = DeclareLaunchArgument(
87-
'default_nav_through_poses_bt_xml',
88-
default_value=os.path.join(
89-
get_package_share_directory('nav2_bt_navigator'),
90-
'behavior_trees', 'navigate_through_poses_w_replanning_and_recovery.xml'),
91-
description='Full path to the behavior tree xml file to use')
92-
93-
default_nav_to_pose_bt_xml_cmd = DeclareLaunchArgument(
94-
'default_nav_to_pose_bt_xml',
95-
default_value=os.path.join(
96-
get_package_share_directory('nav2_bt_navigator'),
97-
'behavior_trees', 'navigate_to_pose_w_replanning_and_recovery.xml'),
98-
description='Full path to the behavior tree xml file to use')
99-
10084
declare_autostart_cmd = DeclareLaunchArgument(
10185
'autostart', default_value='false',
10286
description='Automatically startup the stacks')
@@ -160,10 +144,6 @@ def generate_launch_description():
160144
'map': map_yaml_file,
161145
'use_sim_time': 'True',
162146
'params_file': params_file,
163-
'default_nav_through_poses_bt_xml':
164-
default_nav_through_poses_bt_xml,
165-
'default_nav_to_pose_bt_xml':
166-
default_nav_to_pose_bt_xml,
167147
'autostart': autostart,
168148
'use_rviz': 'False',
169149
'use_simulator': 'False',
@@ -179,14 +159,6 @@ def generate_launch_description():
179159
LogInfo(
180160
condition=IfCondition(log_settings),
181161
msg=[robot['name'], ' params yaml: ', params_file]),
182-
LogInfo(
183-
condition=IfCondition(log_settings),
184-
msg=[robot['name'], ' Nav to Pose behavior tree xml: ',
185-
default_nav_to_pose_bt_xml]),
186-
LogInfo(
187-
condition=IfCondition(log_settings),
188-
msg=[robot['name'], ' Nav Through Poses behavior tree xml: ',
189-
default_nav_through_poses_bt_xml]),
190162
LogInfo(
191163
condition=IfCondition(log_settings),
192164
msg=[robot['name'], ' rviz config file: ', rviz_config_file]),
@@ -209,8 +181,6 @@ def generate_launch_description():
209181
ld.add_action(declare_map_yaml_cmd)
210182
ld.add_action(declare_robot1_params_file_cmd)
211183
ld.add_action(declare_robot2_params_file_cmd)
212-
ld.add_action(default_nav_through_poses_bt_xml_cmd)
213-
ld.add_action(default_nav_to_pose_bt_xml_cmd)
214184
ld.add_action(declare_use_rviz_cmd)
215185
ld.add_action(declare_autostart_cmd)
216186
ld.add_action(declare_rviz_config_file_cmd)

nav2_bringup/bringup/launch/navigation_launch.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ def generate_launch_description():
3131
use_sim_time = LaunchConfiguration('use_sim_time')
3232
autostart = LaunchConfiguration('autostart')
3333
params_file = LaunchConfiguration('params_file')
34-
default_nav_through_poses_bt_xml = LaunchConfiguration('default_nav_through_poses_bt_xml')
35-
default_nav_to_pose_bt_xml = LaunchConfiguration('default_nav_to_pose_bt_xml')
36-
map_subscribe_transient_local = LaunchConfiguration('map_subscribe_transient_local')
3734

3835
lifecycle_nodes = ['controller_server',
3936
'planner_server',
@@ -53,10 +50,7 @@ def generate_launch_description():
5350
# Create our own temporary YAML files that include substitutions
5451
param_substitutions = {
5552
'use_sim_time': use_sim_time,
56-
'default_nav_through_poses_bt_xml': default_nav_through_poses_bt_xml,
57-
'default_nav_to_pose_bt_xml': default_nav_to_pose_bt_xml,
58-
'autostart': autostart,
59-
'map_subscribe_transient_local': map_subscribe_transient_local}
53+
'autostart': autostart}
6054

6155
configured_params = RewrittenYaml(
6256
source_file=params_file,
@@ -85,24 +79,6 @@ def generate_launch_description():
8579
default_value=os.path.join(bringup_dir, 'params', 'nav2_params.yaml'),
8680
description='Full path to the ROS2 parameters file to use'),
8781

88-
DeclareLaunchArgument(
89-
'default_nav_through_poses_bt_xml',
90-
default_value=os.path.join(
91-
get_package_share_directory('nav2_bt_navigator'),
92-
'behavior_trees', 'navigate_through_poses_w_replanning_and_recovery.xml'),
93-
description='Full path to the behavior tree xml file to use'),
94-
95-
DeclareLaunchArgument(
96-
'default_nav_to_pose_bt_xml',
97-
default_value=os.path.join(
98-
get_package_share_directory('nav2_bt_navigator'),
99-
'behavior_trees', 'navigate_to_pose_w_replanning_and_recovery.xml'),
100-
description='Full path to the behavior tree xml file to use'),
101-
102-
DeclareLaunchArgument(
103-
'map_subscribe_transient_local', default_value='false',
104-
description='Whether to set the map subscriber QoS to transient local'),
105-
10682
Node(
10783
package='nav2_controller',
10884
executable='controller_server',

nav2_bringup/bringup/launch/tb3_simulation_launch.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ def generate_launch_description():
3838
map_yaml_file = LaunchConfiguration('map')
3939
use_sim_time = LaunchConfiguration('use_sim_time')
4040
params_file = LaunchConfiguration('params_file')
41-
default_nav_through_poses_bt_xml = LaunchConfiguration('default_nav_through_poses_bt_xml')
42-
default_nav_to_pose_bt_xml = LaunchConfiguration('default_nav_to_pose_bt_xml')
4341
autostart = LaunchConfiguration('autostart')
4442

4543
# Launch configuration variables specific to simulation
@@ -91,20 +89,6 @@ def generate_launch_description():
9189
default_value=os.path.join(bringup_dir, 'params', 'nav2_params.yaml'),
9290
description='Full path to the ROS2 parameters file to use for all launched nodes')
9391

94-
default_nav_through_poses_bt_xml_cmd = DeclareLaunchArgument(
95-
'default_nav_through_poses_bt_xml',
96-
default_value=os.path.join(
97-
get_package_share_directory('nav2_bt_navigator'),
98-
'behavior_trees', 'navigate_through_poses_w_replanning_and_recovery.xml'),
99-
description='Full path to the behavior tree xml file to use')
100-
101-
default_nav_to_pose_bt_xml_cmd = DeclareLaunchArgument(
102-
'default_nav_to_pose_bt_xml',
103-
default_value=os.path.join(
104-
get_package_share_directory('nav2_bt_navigator'),
105-
'behavior_trees', 'navigate_to_pose_w_replanning_and_recovery.xml'),
106-
description='Full path to the behavior tree xml file to use')
107-
10892
declare_autostart_cmd = DeclareLaunchArgument(
10993
'autostart', default_value='true',
11094
description='Automatically startup the nav2 stack')
@@ -186,8 +170,6 @@ def generate_launch_description():
186170
'map': map_yaml_file,
187171
'use_sim_time': use_sim_time,
188172
'params_file': params_file,
189-
'default_nav_through_poses_bt_xml': default_nav_through_poses_bt_xml,
190-
'default_nav_to_pose_bt_xml': default_nav_to_pose_bt_xml,
191173
'autostart': autostart}.items())
192174

193175
# Create the launch description and populate
@@ -200,8 +182,6 @@ def generate_launch_description():
200182
ld.add_action(declare_map_yaml_cmd)
201183
ld.add_action(declare_use_sim_time_cmd)
202184
ld.add_action(declare_params_file_cmd)
203-
ld.add_action(default_nav_through_poses_bt_xml_cmd)
204-
ld.add_action(default_nav_to_pose_bt_xml_cmd)
205185
ld.add_action(declare_autostart_cmd)
206186

207187
ld.add_action(declare_rviz_config_file_cmd)

nav2_bringup/bringup/params/nav2_multirobot_params_1.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ bt_navigator:
5353
global_frame: map
5454
robot_base_frame: base_link
5555
odom_topic: /odom
56-
# 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are set in the launch
57-
# files to allow for a commandline change default used is the
58-
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml &
56+
# 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are use defaults:
57+
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
5958
# nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
59+
# They can be set here or via a RewrittenYaml remap from a parent launch file to Nav2.
6060
plugin_lib_names:
6161
- nav2_compute_path_to_pose_action_bt_node
6262
- nav2_compute_path_through_poses_action_bt_node

nav2_bringup/bringup/params/nav2_multirobot_params_2.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ bt_navigator:
5353
global_frame: map
5454
robot_base_frame: base_link
5555
odom_topic: /odom
56-
# 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are set in the launch
57-
# files to allow for a commandline change default used is the
58-
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml &
56+
# 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are use defaults:
57+
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
5958
# nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
59+
# They can be set here or via a RewrittenYaml remap from a parent launch file to Nav2.
6060
plugin_lib_names:
6161
- nav2_compute_path_to_pose_action_bt_node
6262
- nav2_compute_path_through_poses_action_bt_node

nav2_bringup/bringup/params/nav2_params.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ bt_navigator:
5656
enable_groot_monitoring: True
5757
groot_zmq_publisher_port: 1666
5858
groot_zmq_server_port: 1667
59-
# 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are set in the launch
60-
# files to allow for a commandline change default used is the
61-
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml &
59+
# 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are use defaults:
60+
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
6261
# nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
62+
# They can be set here or via a RewrittenYaml remap from a parent launch file to Nav2.
6363
plugin_lib_names:
6464
- nav2_compute_path_to_pose_action_bt_node
6565
- nav2_compute_path_through_poses_action_bt_node

0 commit comments

Comments
 (0)