29
30
31
32 use_sim_time = LaunchConfiguration("use_sim_time")
33
34
35
36
37
38
39
40
41 sm_aws_warehouse_navigation_dir = get_package_share_directory("sm_aws_warehouse_navigation")
42
43 slam_launch_file = os.path.join(
44 sm_aws_warehouse_navigation_dir, "launch", "online_sync_launch.py"
45 )
46
47
48
49
50
51
52
53
54
55
56
57
58 declare_namespace_cmd = DeclareLaunchArgument(
59 "namespace", default_value="", description="Top-level namespace"
60 )
61
62
63
64
65
66
67 declare_use_sim_time_cmd = DeclareLaunchArgument(
68 "use_sim_time", default_value="True", description="Use simulation (Gazebo) clock if true"
69 )
70
71 declare_autostart_cmd = DeclareLaunchArgument(
72 "autostart", default_value="True", description="Automatically startup the nav2 stack"
73 )
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103 start_slam_toolbox_cmd = IncludeLaunchDescription(
104 PythonLaunchDescriptionSource(slam_launch_file),
105 launch_arguments={"use_sim_time": use_sim_time}.items(),
106 )
107
108
109
110
111
112 ld = LaunchDescription()
113
114
115 ld.add_action(declare_namespace_cmd)
116
117 ld.add_action(declare_use_sim_time_cmd)
118 ld.add_action(declare_autostart_cmd)
119
120
121
122
123
124
125
126
127 ld.add_action(start_slam_toolbox_cmd)
128
129
130 return ld
def generate_launch_description()