Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
# replace serials with your owns
SERIALS = {0: "<serial 1>", 1: "<serial 2>", 2: "<serial 3>", 3: "<serial 4>"}
def generate_launch_description() -> LaunchDescription:
# Camera model (force value)
camera_model = "zed2i"
num_zed = 4
# Define LaunchDescription variable
ld = LaunchDescription()
for idx in range(num_zed):
# ZED Wrapper node
zed_wrapper_launch = IncludeLaunchDescription(
"camera_model": camera_model,
"camera_name": f"{camera_model}{idx}",
"zed_id": str(idx),
"serial_number": SERIALS[idx],
# Add nodes to LaunchDescription
return ld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment