4 from launch
import LaunchDescription
5 from launch.substitutions
import TextSubstitution
6 from launch.substitutions
import LaunchConfiguration
7 from launch_ros.actions
import Node
8 from launch.actions
import DeclareLaunchArgument
9 from ament_index_python
import get_package_share_directory
14 mvsimDir = get_package_share_directory(
"mvsim")
18 world_file_launch_arg = DeclareLaunchArgument(
19 "world_file", default_value=TextSubstitution(
20 text=os.path.join(mvsimDir,
'mvsim_tutorial',
'demo_jackal.world.xml')))
21 do_fake_localization_arg = DeclareLaunchArgument(
22 "do_fake_localization", default_value=
'True', description=
'publish tf odom -> base_link')
26 executable=
'mvsim_node',
30 os.path.join(mvsimDir,
'mvsim_tutorial',
31 'mvsim_ros2_params.yaml'),
33 "world_file": LaunchConfiguration(
'world_file'),
35 "do_fake_localization": LaunchConfiguration(
'do_fake_localization'),
44 '-d', [os.path.join(mvsimDir,
'mvsim_tutorial',
'demo_depth_camera_ros2.rviz')]]
47 return LaunchDescription([
48 world_file_launch_arg,
49 do_fake_localization_arg,