Skip to content

Commit 3bc0fba

Browse files
committed
Use ParameterFile (allow_substs)
Signed-off-by: ymd-stella <world.applepie@gmail.com>
1 parent 96673e2 commit 3bc0fba

File tree

5 files changed

+36
-26
lines changed

5 files changed

+36
-26
lines changed

nav2_bringup/launch/bringup_launch.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ def generate_launch_description():
5353
remappings = [('/tf', 'tf'),
5454
('/tf_static', 'tf_static')]
5555

56-
configured_params = RewrittenYaml(
57-
source_file=params_file,
58-
root_key=namespace,
59-
param_rewrites={},
60-
convert_types=True)
56+
configured_params = ParameterFile(
57+
RewrittenYaml(
58+
source_file=params_file,
59+
root_key=namespace,
60+
param_rewrites={},
61+
convert_types=True),
62+
allow_substs=True)
6163

6264
stdout_linebuf_envvar = SetEnvironmentVariable(
6365
'RCUTILS_LOGGING_BUFFERED_STREAM', '1')

nav2_bringup/launch/localization_launch.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ def generate_launch_description():
5555
remappings = [('/tf', 'tf'),
5656
('/tf_static', 'tf_static')]
5757

58-
configured_params = RewrittenYaml(
59-
source_file=params_file,
60-
root_key=namespace,
61-
param_rewrites={},
62-
convert_types=True)
58+
configured_params = ParameterFile(
59+
RewrittenYaml(
60+
source_file=params_file,
61+
root_key=namespace,
62+
param_rewrites={},
63+
convert_types=True),
64+
allow_substs=True)
6365

6466
stdout_linebuf_envvar = SetEnvironmentVariable(
6567
'RCUTILS_LOGGING_BUFFERED_STREAM', '1')

nav2_bringup/launch/navigation_launch.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from launch.substitutions import LaunchConfiguration, PythonExpression
2323
from launch_ros.actions import LoadComposableNodes, SetParameter
2424
from launch_ros.actions import Node
25-
from launch_ros.descriptions import ComposableNode
25+
from launch_ros.descriptions import ComposableNode, ParameterFile
2626
from nav2_common.launch import RewrittenYaml
2727

2828

@@ -61,11 +61,13 @@ def generate_launch_description():
6161
param_substitutions = {
6262
'autostart': autostart}
6363

64-
configured_params = RewrittenYaml(
65-
source_file=params_file,
66-
root_key=namespace,
67-
param_rewrites=param_substitutions,
68-
convert_types=True)
64+
configured_params = ParameterFile(
65+
RewrittenYaml(
66+
source_file=params_file,
67+
root_key=namespace,
68+
param_rewrites=param_substitutions,
69+
convert_types=True),
70+
allow_substs=True)
6971

7072
stdout_linebuf_envvar = SetEnvironmentVariable(
7173
'RCUTILS_LOGGING_BUFFERED_STREAM', '1')

nav2_bringup/launch/slam_launch.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ def generate_launch_description():
4343
slam_launch_file = os.path.join(slam_toolbox_dir, 'launch', 'online_sync_launch.py')
4444

4545
# Create our own temporary YAML files that include substitutions
46-
configured_params = RewrittenYaml(
47-
source_file=params_file,
48-
root_key=namespace,
49-
param_rewrites={},
50-
convert_types=True)
46+
configured_params = ParameterFile(
47+
RewrittenYaml(
48+
source_file=params_file,
49+
root_key=namespace,
50+
param_rewrites={},
51+
convert_types=True),
52+
allow_substs=True)
5153

5254
# Declare the launch arguments
5355
declare_namespace_cmd = DeclareLaunchArgument(

nav2_collision_monitor/launch/collision_monitor_node.launch.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,13 @@ def generate_launch_description():
7373
'container_name', default_value='nav2_container',
7474
description='the name of conatiner that nodes will load in if use composition')
7575

76-
configured_params = RewrittenYaml(
77-
source_file=params_file,
78-
root_key=namespace,
79-
param_rewrites={},
80-
convert_types=True)
76+
configured_params = ParameterFile(
77+
RewrittenYaml(
78+
source_file=params_file,
79+
root_key=namespace,
80+
param_rewrites={},
81+
convert_types=True),
82+
allow_substs=True)
8183

8284
# Declare node launching commands
8385
load_nodes = GroupAction(

0 commit comments

Comments
 (0)