added launch file for the python script

This commit is contained in:
dmalad 2023-11-29 12:06:26 +01:00
parent b10dbaf6fa
commit dd61cd42ff
1 changed files with 15 additions and 0 deletions

15
launch/rtsp.launch.py Normal file
View File

@ -0,0 +1,15 @@
from launch import LaunchDescription
from launch.actions import ExecuteProcess
import os
def generate_launch_description():
home_dir = os.path.expanduser("~")
script_path = os.path.join(home_dir, 'ros2_ws/src/image2rtsp/python/rtsp.py')
return LaunchDescription(
[
ExecuteProcess(
cmd=['python3', script_path],
),
]
)