-
Notifications
You must be signed in to change notification settings - Fork 95
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
5 changed files
with
97 additions
and
35 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
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
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
47 changes: 47 additions & 0 deletions
47
mrpt_tutorials/launch/demo_pointcloud_pipeline_mvsim.launch.py
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,47 @@ | ||
# ROS 2 launch file for example in mrpt_tutorials | ||
# | ||
# See repo online: https://github.com/mrpt-ros-pkg/mrpt_navigation | ||
# | ||
|
||
import os | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription | ||
from launch.substitutions import LaunchConfiguration | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
|
||
|
||
def generate_launch_description(): | ||
|
||
# Launch for mrpt_pointcloud_pipeline: | ||
pointcloud_pipeline_launch = IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource([os.path.join( | ||
get_package_share_directory('mrpt_pointcloud_pipeline'), 'launch', | ||
'pointcloud_pipeline.launch.py')]), | ||
launch_arguments={ | ||
'log_level': 'INFO', | ||
'scan_topic_name': '/laser1, /laser2', | ||
'points_topic_name': '/camera1_points', | ||
'time_window': '0.20', | ||
'show_gui': 'True', | ||
}.items() | ||
) | ||
|
||
mvsim_pkg_share_dir = get_package_share_directory('mvsim') | ||
# Finding the launch file | ||
launch_file_name = 'demo_jackal.launch.py' | ||
mvsim_launch_file_path = os.path.join( | ||
mvsim_pkg_share_dir, 'mvsim_tutorial', launch_file_name) | ||
|
||
# Check if the launch file exists | ||
if not os.path.isfile(mvsim_launch_file_path): | ||
raise Exception( | ||
f"Launch file '{mvsim_launch_file_path}' does not exist!") | ||
|
||
return LaunchDescription([ | ||
IncludeLaunchDescription( | ||
PythonLaunchDescriptionSource(mvsim_launch_file_path) | ||
), | ||
pointcloud_pipeline_launch | ||
]) |
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