Go2Py_SIM/deploy/ros2_nodes/sportmode_nav2/launch/localization.launch.py

28 lines
845 B
Python
Raw Normal View History

2024-02-17 04:33:53 +08:00
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_ros.actions import Node
def generate_launch_description():
2024-05-21 06:45:59 +08:00
2024-02-17 04:33:53 +08:00
robot_localization = IncludeLaunchDescription(
2024-05-21 06:45:59 +08:00
PythonLaunchDescriptionSource([os.path.join(
get_package_share_directory('sportmode_nav2'), 'launch'),
'/ros_ekf.launch.py'])
)
2024-02-17 04:33:53 +08:00
async_mapping = IncludeLaunchDescription(
2024-05-21 06:45:59 +08:00
PythonLaunchDescriptionSource([os.path.join(
get_package_share_directory('sportmode_nav2'), 'launch'),
'/localization_async.launch.py'])
)
2024-02-17 04:33:53 +08:00
return LaunchDescription([
robot_localization,
async_mapping,
2024-05-21 06:45:59 +08:00
])