converter.launch.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 
3 import os
4 
5 from ament_index_python import get_package_share_directory
6 from launch import LaunchDescription
7 from launch.actions import DeclareLaunchArgument
8 from launch.substitutions import LaunchConfiguration
9 from launch_ros.actions import Node, SetParameter
10 
11 
13 
14  remappable_topics = [
15  DeclareLaunchArgument("input_topic_udp", default_value="~/udp/in"),
16  DeclareLaunchArgument("output_topic_udp", default_value="~/udp/out"),
17  DeclareLaunchArgument("input_topic_cam", default_value="~/cam/in"),
18  DeclareLaunchArgument("output_topic_cam", default_value="~/cam/out"),
19  DeclareLaunchArgument("input_topic_cam_ts", default_value="~/cam_ts/in"),
20  DeclareLaunchArgument("output_topic_cam_ts", default_value="~/cam_ts/out"),
21  DeclareLaunchArgument("input_topic_cpm_ts", default_value="~/cpm_ts/in"),
22  DeclareLaunchArgument("output_topic_cpm_ts", default_value="~/cpm_ts/out"),
23  DeclareLaunchArgument("input_topic_denm", default_value="~/denm/in"),
24  DeclareLaunchArgument("output_topic_denm", default_value="~/denm/out"),
25  DeclareLaunchArgument("input_topic_denm_ts", default_value="~/denm_ts/in"),
26  DeclareLaunchArgument("output_topic_denm_ts", default_value="~/denm_ts/out"),
27  DeclareLaunchArgument("input_topic_mapem_ts", default_value="~/mapem_ts/in"),
28  DeclareLaunchArgument("output_topic_mapem_ts", default_value="~/mapem_ts/out"),
29  DeclareLaunchArgument("input_topic_mcm_uulm", default_value="~/mcm_uulm/in"),
30  DeclareLaunchArgument("output_topic_mcm_uulm", default_value="~/mcm_uulm/out"),
31  DeclareLaunchArgument("input_topic_spatem_ts", default_value="~/spatem_ts/in"),
32  DeclareLaunchArgument("output_topic_spatem_ts", default_value="~/spatem_ts/out"),
33  DeclareLaunchArgument("input_topic_vam_ts", default_value="~/vam_ts/in"),
34  DeclareLaunchArgument("output_topic_vam_ts", default_value="~/vam_ts/out"),
35  ]
36 
37  args = [
38  DeclareLaunchArgument("name", default_value="etsi_its_conversion", description="node name"),
39  DeclareLaunchArgument("namespace", default_value="", description="node namespace"),
40  DeclareLaunchArgument("params", default_value=os.path.join(get_package_share_directory("etsi_its_conversion"), "config", "params.yml"), description="path to parameter file"),
41  DeclareLaunchArgument("log_level", default_value="info", description="ROS logging level (debug, info, warn, error, fatal)"),
42  DeclareLaunchArgument("use_sim_time", default_value="false", description="use simulation clock"),
43  *remappable_topics,
44  ]
45 
46  nodes = [
47  Node(
48  package="etsi_its_conversion",
49  executable="etsi_its_conversion_node",
50  namespace=LaunchConfiguration("namespace"),
51  name=LaunchConfiguration("name"),
52  parameters=[LaunchConfiguration("params")],
53  arguments=["--ros-args", "--log-level", LaunchConfiguration("log_level")],
54  remappings=[(la.default_value[0].text, LaunchConfiguration(la.name)) for la in remappable_topics],
55  output="screen",
56  emulate_tty=True,
57  )
58  ]
59 
60  return LaunchDescription([
61  *args,
62  SetParameter("use_sim_time", LaunchConfiguration("use_sim_time")),
63  *nodes,
64  ])
converter.generate_launch_description
def generate_launch_description()
Definition: converter.launch.py:12


etsi_its_conversion
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:32:28