Commit 904df5a0 authored by Barcis, Michal's avatar Barcis, Michal
Browse files

added launchfile

parent fda54538
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Launch sync and swarm simulation"""
import launch
from launch_ros.substitutions import ExecutableInPackage
import socket
def generate_launch_description():
hostname = socket.gethostname()
interface = [
ExecutableInPackage(
package='balboa_lowlevel',
executable='balboa_interface'
),
'__ns:=/{}/balboa'.format(hostname),
]
camera_streaming = [
ExecutableInPackage(
package='camera_streaming',
executable='camera_streaming'),
]
executables_list = [interface, camera_streaming]
processes = [
launch.actions.ExecuteProcess(
cmd=executable, output='screen')
for executable in executables_list
]
return launch.LaunchDescription(
processes + [
launch.actions.RegisterEventHandler(
event_handler=launch.event_handlers.OnProcessExit(
target_action=process,
on_exit=[launch.actions.EmitEvent(
event=launch.events.Shutdown())],
))
for process in processes
]
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment