3 from launch
import LaunchDescription
4 from launch.substitutions
import TextSubstitution
5 from launch.substitutions
import LaunchConfiguration
6 from launch_ros.actions
import Node
7 from launch.actions
import DeclareLaunchArgument
8 from ament_index_python
import get_package_share_directory
11 mvsimDir = get_package_share_directory(
"mvsim")
13 MVSIM_WORLD_FILE = os.path.join(mvsimDir,
'mvsim_tutorial',
14 'demo_turtlebot_world.world.xml')
15 MVSIM_ROS2_PARAMS_FILE = os.path.join(mvsimDir,
'mvsim_tutorial',
16 'mvsim_ros2_params.yaml')
17 RVIZ2_FILE = os.path.join(mvsimDir,
'mvsim_tutorial',
18 'demo_turtlebot_world_ros2.rviz')
23 world_file_launch_arg = DeclareLaunchArgument(
24 "world_file", default_value=TextSubstitution(
25 text=MVSIM_WORLD_FILE))
29 executable=
'mvsim_node',
33 MVSIM_ROS2_PARAMS_FILE,
35 "world_file": LaunchConfiguration(
'world_file'),
48 return LaunchDescription([
49 world_file_launch_arg,
def generate_launch_description()