-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathe2e_planner.launch.py
More file actions
46 lines (41 loc) · 1.41 KB
/
e2e_planner.launch.py
File metadata and controls
46 lines (41 loc) · 1.41 KB
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
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, OpaqueFunction
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node
def launch_setup(context, *args, **kwargs):
sim_flag = LaunchConfiguration('sim_flag').perform(context)
is_sim = sim_flag.lower() == 'true'
executable_name = 'inference_node'
model_name = 'e2e_model.pt'
inference_node = Node(
package='e2e_planner',
executable=executable_name,
name='inference_node',
output='screen',
parameters=[{
'model_name': model_name,
'interval_ms': 50,
'sim_flag': is_sim,
'image_topic': '/image_raw',
'debug_mode': True,
'default_command': 1,
'use_place_recognition': True,
'yolop_input_size': 256,
'yolop_fp16': True,
'placenet_model_name': 'placenet.pt',
'topomap_dir_name': 'topomap',
'placenet_delta': 5.0,
'placenet_window_lower': -1,
'placenet_window_upper': 10,
}]
)
return [inference_node]
def generate_launch_description():
return LaunchDescription([
DeclareLaunchArgument(
'sim_flag',
default_value='false',
description='Flag to use simulation inference node'
),
OpaqueFunction(function=launch_setup)
])