2929 OpaqueFunction ,
3030 RegisterEventHandler ,
3131)
32- from launch .substitutions import Command
3332from launch .conditions import IfCondition
3433from launch .event_handlers import OnShutdown
3534from launch .launch_description_sources import PythonLaunchDescriptionSource
35+ from launch .substitutions import Command
3636from launch .substitutions import LaunchConfiguration , PythonExpression
3737
3838from launch_ros .actions import Node
@@ -46,14 +46,12 @@ def generate_launch_description():
4646
4747 # Create the launch configuration variables
4848 namespace = LaunchConfiguration ('namespace' )
49- use_namespace = LaunchConfiguration ('use_namespace' )
5049 use_sim_time = LaunchConfiguration ('use_sim_time' )
5150
5251 # Launch configuration variables specific to simulation
5352 rviz_config_file = LaunchConfiguration ('rviz_config_file' )
5453 use_simulator = LaunchConfiguration ('use_simulator' )
5554 use_robot_state_pub = LaunchConfiguration ('use_robot_state_pub' )
56- use_rviz = LaunchConfiguration ('use_rviz' )
5755 headless = LaunchConfiguration ('headless' )
5856 world = LaunchConfiguration ('world' )
5957 pose = {
@@ -80,12 +78,6 @@ def generate_launch_description():
8078 'namespace' , default_value = '' , description = 'Top-level namespace'
8179 )
8280
83- declare_use_namespace_cmd = DeclareLaunchArgument (
84- 'use_namespace' ,
85- default_value = 'false' ,
86- description = 'Whether to apply a namespace to the navigation stack' ,
87- )
88-
8981 declare_use_sim_time_cmd = DeclareLaunchArgument (
9082 'use_sim_time' ,
9183 default_value = 'True' ,
@@ -110,10 +102,6 @@ def generate_launch_description():
110102 description = 'Whether to start the robot state publisher' ,
111103 )
112104
113- declare_use_rviz_cmd = DeclareLaunchArgument (
114- 'use_rviz' , default_value = 'True' , description = 'Whether to start RVIZ'
115- )
116-
117105 declare_simulator_cmd = DeclareLaunchArgument (
118106 'headless' , default_value = 'False' , description = 'Whether to execute gzclient)'
119107 )
@@ -143,7 +131,7 @@ def generate_launch_description():
143131 output = 'screen' ,
144132 parameters = [
145133 {'use_sim_time' : use_sim_time ,
146- 'robot_description' : Command (['xacro' , ' ' , robot_sdf ])}
134+ 'robot_description' : Command (['xacro' , ' ' , robot_sdf ])}
147135 ],
148136 remappings = remappings ,
149137 )
@@ -214,13 +202,11 @@ def generate_launch_description():
214202
215203 # Declare the launch options
216204 ld .add_action (declare_namespace_cmd )
217- ld .add_action (declare_use_namespace_cmd )
218205 ld .add_action (declare_use_sim_time_cmd )
219206
220207 ld .add_action (declare_rviz_config_file_cmd )
221208 ld .add_action (declare_use_simulator_cmd )
222209 ld .add_action (declare_use_robot_state_pub_cmd )
223- ld .add_action (declare_use_rviz_cmd )
224210 ld .add_action (declare_simulator_cmd )
225211 ld .add_action (declare_world_cmd )
226212 ld .add_action (declare_robot_name_cmd )
0 commit comments