Created
February 23, 2022 19:04
-
-
Save rfzeg/0d42e75484f4b08927b74ee3e6ce46db to your computer and use it in GitHub Desktop.
Minimal ROS2 launch file via include and launch the gazebo.launch.py file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Launch Gazebo server and client via include and launch the gazebo.launch.py file.""" | |
import os | |
from launch import LaunchDescription | |
from launch.actions import IncludeLaunchDescription | |
from launch.launch_description_sources import PythonLaunchDescriptionSource | |
from ament_index_python.packages import get_package_share_directory | |
def generate_launch_description(): | |
pkg_gazebo_ros = get_package_share_directory('gazebo_ros') | |
# Gazebo launch | |
gazebo = IncludeLaunchDescription( | |
PythonLaunchDescriptionSource( | |
os.path.join(pkg_gazebo_ros, 'launch', 'gazebo.launch.py'), | |
) | |
) | |
return LaunchDescription([ | |
gazebo, | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment