add mega I launch file

This commit is contained in:
Joe Dong
2024-11-04 13:46:31 +08:00
parent 0e2dfec272
commit 30ec7fb511
2 changed files with 137 additions and 6 deletions
@@ -0,0 +1,33 @@
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, GroupAction, ExecuteProcess
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.actions import Node
from ament_index_python.packages import get_package_share_directory
import os
def generate_launch_description():
# Include launch files
# you can use this launch file to launch femto mega and femto mega I with net device ip and port
package_dir = get_package_share_directory('orbbec_camera')
launch_file_dir = os.path.join(package_dir, 'launch')
launch1_include = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(launch_file_dir, 'femto_mega.launch.py')
),
launch_arguments={
'camera_name': 'camera',
'net_device_ip': '192.168.1.10',
'net_device_port': '8090',
'sync_mode': 'standalone'
}.items()
)
# If you need more cameras, just add more launch_include here, and change the usb_port and device_num
# Launch description
ld = LaunchDescription([
GroupAction([launch1_include]),
])
return ld