forked from TUMFTM/MixNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix_net.launch.py
61 lines (58 loc) · 2.06 KB
/
mix_net.launch.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def generate_launch_description():
# Initialize launch parameters
frequency = LaunchConfiguration("frequency", default=20.0)
track = LaunchConfiguration("track", default="IMS")
use_sim_time = LaunchConfiguration("use_sim_time", default=False)
ci = LaunchConfiguration("ci", default=False)
use_cuda = LaunchConfiguration("use_cuda", default=False)
return LaunchDescription(
[
# Declare Arguments
DeclareLaunchArgument(
"frequency",
default_value=frequency,
description="Specify node frequency in Hz",
),
DeclareLaunchArgument(
"track",
default_value=track,
description="Specify track to use correct map, currently only 'IMS' supported",
),
DeclareLaunchArgument(
"use_sim_time",
default_value=use_sim_time,
description="Set node to use sim time to replay ros2-bags",
),
DeclareLaunchArgument(
"ci",
default_value=ci,
description="trigger ci shut down",
),
DeclareLaunchArgument(
"use_cuda",
default_value=use_cuda,
description="Set boolean to use cuda",
),
# Create Node
Node(
package="mix_net",
executable="mix_net_node",
name="MIX_NET",
namespace="",
parameters=[
{
"frequency": frequency,
"track": track,
"use_sim_time": use_sim_time,
"ci": ci,
"use_cuda": use_cuda,
}
],
arguments=["--ros-args"],
),
]
)