From 60c42d42bfc1285570465cd8e4c58d7d82190c96 Mon Sep 17 00:00:00 2001 From: Andrew Ealovega Date: Tue, 2 Apr 2024 16:57:49 -0400 Subject: [PATCH] Fix object detector launch not using compressed --- .../obj_detector/obj_detector.launch.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/phoenix_gazebo/launch/include/obj_detector/obj_detector.launch.py b/phoenix_gazebo/launch/include/obj_detector/obj_detector.launch.py index 941ed81..e377452 100644 --- a/phoenix_gazebo/launch/include/obj_detector/obj_detector.launch.py +++ b/phoenix_gazebo/launch/include/obj_detector/obj_detector.launch.py @@ -5,9 +5,9 @@ from launch.conditions import IfCondition, UnlessCondition from launch import LaunchDescription from launch.actions import DeclareLaunchArgument -from launch.actions import IncludeLaunchDescription +from launch.actions import IncludeLaunchDescription, LogInfo from launch.launch_description_sources import PythonLaunchDescriptionSource -from launch.substitutions import LaunchConfiguration +from launch.substitutions import LaunchConfiguration, PythonExpression from launch_ros.actions import Node @@ -23,6 +23,13 @@ def generate_launch_description(): debug = LaunchConfiguration('debug') trans = LaunchConfiguration('transport') + remappings = [('/camera/mid/rgb/camera_info', camera_info_topic), + ('/camera/mid/depth', depth_topic), + ('/object_poses', detection_topic), + ('/camera/mid/rgb', rgb_topic), + ('/camera/mid/rgb/compressed', [rgb_topic, '/compressed']), + ] + det = Node( package='obj_detector', executable='obj_detector', @@ -34,12 +41,7 @@ def generate_launch_description(): 'debug': debug, 'transport_type': trans }], - remappings=[ - ('/camera/mid/rgb', rgb_topic), - ('/camera/mid/rgb/camera_info', camera_info_topic), - ('/camera/mid/depth', depth_topic), - ('/object_poses', detection_topic), - ] + remappings=remappings ) return LaunchDescription([