File tree Expand file tree Collapse file tree
system_modes_examples/launch Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818import launch
1919import launch .actions
20- import launch .launch_description_sources
21- import launch .substitutions
2220import launch_ros
2321
2422
2523def generate_launch_description ():
26- launch .actions .DeclareLaunchArgument ('modelfile' , description = 'Path to modelfile' )
27- modelfile = (ament_index_python .packages .get_package_share_directory ('system_modes_examples' ) +
28- '/example_modes.yaml' )
29-
30- node = launch_ros .actions .Node (
31- package = 'system_modes_examples' ,
32- executable = 'drive_base' ,
33- parameters = [{'modelfile' : modelfile }],
34- output = 'screen' )
35-
36- description = launch .LaunchDescription ()
37- description .add_action (node )
38-
39- return description
24+ default_modelfile = (ament_index_python .packages .get_package_share_directory ('system_modes_examples' ) +
25+ '/example_modes.yaml' )
26+ return launch .LaunchDescription ([
27+ launch_ros .actions .Node (
28+ package = 'system_modes_examples' ,
29+ executable = 'drive_base' ,
30+ parameters = [{'modelfile' : default_modelfile }],
31+ output = 'screen' )])
Original file line number Diff line number Diff line change 1717
1818import launch
1919import launch .actions
20- import launch .launch_description_sources
21- import launch .substitutions
2220import launch_ros
2321
2422
2523def generate_launch_description ():
26- launch .actions .DeclareLaunchArgument ('modelfile' , description = 'Path to modelfile' )
27- modelfile = (ament_index_python .packages .get_package_share_directory ('system_modes_examples' ) +
28- '/example_modes.yaml' )
29-
30- node = launch_ros .actions .Node (
31- package = 'system_modes_examples' ,
32- executable = 'manipulator' ,
33- parameters = [{'modelfile' : modelfile }],
34- output = 'screen' )
35-
36- description = launch .LaunchDescription ()
37- description .add_action (node )
38-
39- return description
24+ default_modelfile = (ament_index_python .packages .get_package_share_directory ('system_modes_examples' ) +
25+ '/example_modes.yaml' )
26+ return launch .LaunchDescription ([
27+ launch_ros .actions .Node (
28+ package = 'system_modes_examples' ,
29+ executable = 'manipulator' ,
30+ parameters = [{'modelfile' : default_modelfile }],
31+ output = 'screen' )])
You can’t perform that action at this time.
0 commit comments