17from ament_index_python.packages
import get_package_share_directory
19from launch
import LaunchDescription
20from launch.actions
import DeclareLaunchArgument, IncludeLaunchDescription
21from launch.launch_description_sources
import PythonLaunchDescriptionSource
22from launch.substitutions
import LaunchConfiguration
32 use_sim_time = LaunchConfiguration(
"use_sim_time")
41 sm_aws_warehouse_navigation_dir = get_package_share_directory(
"sm_aws_warehouse_navigation")
43 slam_launch_file = os.path.join(
44 sm_aws_warehouse_navigation_dir,
"launch",
"online_sync_launch.py"
58 declare_namespace_cmd = DeclareLaunchArgument(
59 "namespace", default_value=
"", description=
"Top-level namespace"
67 declare_use_sim_time_cmd = DeclareLaunchArgument(
68 "use_sim_time", default_value=
"True", description=
"Use simulation (Gazebo) clock if true"
71 declare_autostart_cmd = DeclareLaunchArgument(
72 "autostart", default_value=
"True", description=
"Automatically startup the nav2 stack"
103 start_slam_toolbox_cmd = IncludeLaunchDescription(
104 PythonLaunchDescriptionSource(slam_launch_file),
105 launch_arguments={
"use_sim_time": use_sim_time}.items(),
112 ld = LaunchDescription()
115 ld.add_action(declare_namespace_cmd)
117 ld.add_action(declare_use_sim_time_cmd)
118 ld.add_action(declare_autostart_cmd)
127 ld.add_action(start_slam_toolbox_cmd)
def generate_launch_description()