From c178eb97dd79c3473b7834b9680fd594b6d2b046 Mon Sep 17 00:00:00 2001 From: Dzmitry Maladzenkau <151655734+45kmh@users.noreply.github.com> Date: Tue, 5 Dec 2023 14:46:07 +0100 Subject: [PATCH] Update rtsp.launch.py --- launch/rtsp.launch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/launch/rtsp.launch.py b/launch/rtsp.launch.py index 49a76f4..a3ccae4 100644 --- a/launch/rtsp.launch.py +++ b/launch/rtsp.launch.py @@ -1,10 +1,11 @@ from launch import LaunchDescription from launch.actions import ExecuteProcess +from ament_index_python.packages import get_package_share_directory 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') + pkg_share = get_package_share_directory('image2rtsp') + script_path = os.path.join(pkg_share, '../../../../src/image2rtsp/python/rtsp.py') return LaunchDescription( [