-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
# ROS2 launch file | ||
|
||
from launch import LaunchDescription | ||
from launch.substitutions import TextSubstitution | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import Node | ||
from launch.actions import DeclareLaunchArgument | ||
from ament_index_python import get_package_share_directory | ||
import os | ||
|
||
|
||
def generate_launch_description(): | ||
pfLocDir = get_package_share_directory("mrpt_pf_localization") | ||
print('pfLocDir: ' + pfLocDir) | ||
|
||
# args that can be set from the command line or a default will be used | ||
world_file_launch_arg = DeclareLaunchArgument( | ||
"world_file", default_value=TextSubstitution( | ||
text=os.path.join(pfLocDir, 'mvsim_tutorial', 'demo_jackal.world.xml'))) | ||
|
||
mvsim_node = Node( | ||
package='mvsim', | ||
executable='mvsim_node', | ||
name='mvsim', | ||
output='screen', | ||
parameters=[ | ||
os.path.join(pfLocDir, 'mvsim_tutorial', | ||
'mvsim_ros2_params.yaml'), | ||
{ | ||
"world_file": LaunchConfiguration('world_file'), | ||
"headless": False | ||
}] | ||
) | ||
|
||
rviz2_node = Node( | ||
package='rviz2', | ||
executable='rviz2', | ||
name='rviz2', | ||
arguments=[ | ||
'-d', [os.path.join(pfLocDir, 'mvsim_tutorial', 'demo_depth_camera_ros2.rviz')]] | ||
) | ||
|
||
return LaunchDescription([ | ||
world_file_launch_arg, | ||
mvsim_node, | ||
rviz2_node | ||
]) |
Binary file not shown.
File renamed without changes.