Loading files
# MIT License
# Copyright (c) 2023 Miguel Ángel González Santamarta
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
from launch.actions import DeclareLaunchArgument
def generate_launch_description():
pkg_rover_localization = get_package_share_directory("rover_localization")
use_sim_time = LaunchConfiguration("use_sim_time")
use_sim_time_cmd = DeclareLaunchArgument(
"use_sim_time",
default_value="False",
description="Use simulation (Gazebo) clock if True")
rgbd_odometry_cmd = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_rover_localization,
"launch", "rgbd_odometry.launch.py")
)
)
rtabmap_cmd = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_rover_localization,
"launch", "rtabmap.launch.py")
),
launch_arguments={"use_sim_time": use_sim_time}.items()
)
ekf_cmd = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(pkg_rover_localization,
"launch", "ekf.launch.py")
),
launch_arguments={"use_sim_time": use_sim_time}.items()
)
ld = LaunchDescription()
ld.add_action(use_sim_time_cmd)
ld.add_action(rgbd_odometry_cmd)
ld.add_action(rtabmap_cmd)
ld.add_action(ekf_cmd)
return ld
3e22d93efThis file is pinned to the selected release. Download the original to open it in your design tool.