-
Notifications
You must be signed in to change notification settings - Fork 177
/
example.launch.py.in
35 lines (31 loc) · 1.13 KB
/
example.launch.py.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""Launch analyzer loader with parameters from yaml."""
import launch
import launch_ros.actions
analyzer_params_filepath = "@ANALYZER_PARAMS_FILEPATH@"
add_analyzer_params_filepath = "@ADD_ANALYZER_PARAMS_FILEPATH@"
def generate_launch_description():
aggregator = launch_ros.actions.Node(
package='diagnostic_aggregator',
executable='aggregator_node',
output='screen',
parameters=[analyzer_params_filepath])
add_analyzer = launch_ros.actions.Node(
package='diagnostic_aggregator',
executable='add_analyzer',
output='screen',
parameters=[add_analyzer_params_filepath]
)
diag_publisher = launch_ros.actions.Node(
package='diagnostic_aggregator',
executable='example_pub.py')
return launch.LaunchDescription([
aggregator,
add_analyzer,
diag_publisher,
launch.actions.RegisterEventHandler(
event_handler=launch.event_handlers.OnProcessExit(
target_action=aggregator,
on_exit=[launch.actions.EmitEvent(
event=launch.events.Shutdown())],
)),
])