|
| 1 | +# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES |
| 2 | +# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# |
| 16 | +# SPDX-License-Identifier: Apache-2.0 |
| 17 | + |
| 18 | +from typing import Dict |
| 19 | + |
| 20 | + |
| 21 | +class IsaacROSLaunchFragmentSpec: |
| 22 | + |
| 23 | + def __init__(self, package, class_name, filename=''): |
| 24 | + self.package = package |
| 25 | + self.class_name = class_name |
| 26 | + self.filename = filename if filename != '' else f'{package}_core.launch.py' |
| 27 | + |
| 28 | + |
| 29 | +LAUNCH_FRAGMENT_SPECS: Dict[str, IsaacROSLaunchFragmentSpec] = { |
| 30 | + ################ |
| 31 | + # Data Sources # |
| 32 | + ################ |
| 33 | + |
| 34 | + # RealSense Camera |
| 35 | + 'realsense_mono': IsaacROSLaunchFragmentSpec( |
| 36 | + 'isaac_ros_realsense', 'IsaacROSRealSenseMonoLaunchFragment', |
| 37 | + 'isaac_ros_realsense_mono_core.launch.py'), |
| 38 | + 'realsense_mono_rect': IsaacROSLaunchFragmentSpec( |
| 39 | + 'isaac_ros_realsense', 'IsaacROSRealSenseMonoRectLaunchFragment', |
| 40 | + 'isaac_ros_realsense_mono_rect_core.launch.py'), |
| 41 | + 'realsense_stereo_rect': IsaacROSLaunchFragmentSpec( |
| 42 | + 'isaac_ros_realsense', 'IsaacROSRealSenseStereoRectLaunchFragment', |
| 43 | + 'isaac_ros_realsense_stereo_rect_core.launch.py'), |
| 44 | + 'realsense_stereo_rect_imu': IsaacROSLaunchFragmentSpec( |
| 45 | + 'isaac_ros_realsense', 'IsaacROSRealSenseStereoRectImuLaunchFragment', |
| 46 | + 'isaac_ros_realsense_stereo_rect_imu_core.launch.py'), |
| 47 | + 'realsense_mono_rect_depth': IsaacROSLaunchFragmentSpec( |
| 48 | + 'isaac_ros_realsense', 'IsaacROSRealSenseMonoRectDepthLaunchFragment', |
| 49 | + 'isaac_ros_realsense_mono_rect_depth_core.launch.py'), |
| 50 | + |
| 51 | + # Argus Camera |
| 52 | + 'argus_mono': IsaacROSLaunchFragmentSpec( |
| 53 | + 'isaac_ros_argus_camera', 'IsaacROSArgusMonoLaunchFragment', |
| 54 | + 'isaac_ros_argus_camera_mono_core.launch.py'), |
| 55 | + 'argus_stereo': IsaacROSLaunchFragmentSpec( |
| 56 | + 'isaac_ros_argus_camera', 'IsaacROSArgusStereoLaunchFragment', |
| 57 | + 'isaac_ros_argus_camera_stereo_core.launch.py'), |
| 58 | + 'argus_depth': IsaacROSLaunchFragmentSpec( |
| 59 | + 'isaac_ros_argus_camera', 'IsaacROSArgusDepthLaunchFragment', |
| 60 | + 'isaac_ros_argus_camera_depth_core.launch.py'), |
| 61 | + |
| 62 | + # USB Camera |
| 63 | + 'usb_cam': IsaacROSLaunchFragmentSpec( |
| 64 | + 'isaac_ros_usb_cam', 'IsaacROSUSBCameraLaunchFragment'), |
| 65 | + |
| 66 | + ########################### |
| 67 | + # Preprocessing Utilities # |
| 68 | + ########################### |
| 69 | + |
| 70 | + # Rectification |
| 71 | + 'rectify_mono': IsaacROSLaunchFragmentSpec( |
| 72 | + 'isaac_ros_image_proc', 'IsaacROSRectifyMonoLaunchFragment', |
| 73 | + 'isaac_ros_image_rectify_mono_core.launch.py'), |
| 74 | + 'rectify_stereo': IsaacROSLaunchFragmentSpec( |
| 75 | + 'isaac_ros_image_proc', 'IsaacROSRectifyStereoLaunchFragment', |
| 76 | + 'isaac_ros_image_rectify_stereo_core.launch.py'), |
| 77 | + |
| 78 | + # Resize + Rectification |
| 79 | + 'resize_rectify_stereo': IsaacROSLaunchFragmentSpec( |
| 80 | + 'isaac_ros_image_proc', 'IsaacROSResizeRectifyStereoLaunchFragment', |
| 81 | + 'isaac_ros_image_resize_rectify_stereo_core.launch.py'), |
| 82 | + |
| 83 | + # Isaac ROS Depth Proc |
| 84 | + # Convert depth to metric |
| 85 | + 'convert_metric': IsaacROSLaunchFragmentSpec( |
| 86 | + 'isaac_ros_depth_image_proc', 'IsaacROSConvertMetricLaunchFragment', |
| 87 | + 'isaac_ros_depth_image_proc_convert_metric_core.launch.py'), |
| 88 | + # Convert depth to pointcloud |
| 89 | + 'point_cloud_xyz': IsaacROSLaunchFragmentSpec( |
| 90 | + 'isaac_ros_depth_image_proc', 'IsaacROSPointCloudXyzLaunchFragment', |
| 91 | + 'isaac_ros_depth_image_proc_point_cloud_xyz_core.launch.py'), |
| 92 | + # Convert depth to colorized pointcloud |
| 93 | + 'point_cloud_xyzrgb': IsaacROSLaunchFragmentSpec( |
| 94 | + 'isaac_ros_depth_image_proc', 'IsaacROSPointCloudXyzrgbLaunchFragment', |
| 95 | + 'isaac_ros_depth_image_proc_point_cloud_xyzrgb_core.launch.py'), |
| 96 | + |
| 97 | + # Isaac ROS Stereo Image Proc |
| 98 | + # SGM disparity estimation |
| 99 | + 'disparity': IsaacROSLaunchFragmentSpec( |
| 100 | + 'isaac_ros_stereo_image_proc', 'IsaacROSDisparityLaunchFragment', |
| 101 | + 'isaac_ros_stereo_image_proc_disparity_core.launch.py'), |
| 102 | + # Convert disparity to colorized pointcloud |
| 103 | + 'point_cloud': IsaacROSLaunchFragmentSpec( |
| 104 | + 'isaac_ros_stereo_image_proc', 'IsaacROSPointCloudLaunchFragment', |
| 105 | + 'isaac_ros_stereo_image_proc_point_cloud_core.launch.py'), |
| 106 | + # Convert disparity to depth |
| 107 | + 'disparity_to_depth': IsaacROSLaunchFragmentSpec( |
| 108 | + 'isaac_ros_stereo_image_proc', 'IsaacROSDisparityToDepthLaunchFragment', |
| 109 | + 'isaac_ros_stereo_image_proc_disparity_to_depth_core.launch.py'), |
| 110 | + |
| 111 | + ############### |
| 112 | + # Core Graphs # |
| 113 | + ############### |
| 114 | + |
| 115 | + # Isaac ROS AprilTag |
| 116 | + 'apriltag': IsaacROSLaunchFragmentSpec( |
| 117 | + 'isaac_ros_apriltag', 'IsaacROSAprilTagLaunchFragment'), |
| 118 | + |
| 119 | + # Isaac ROS Compression |
| 120 | + 'stereo_h264_decoder': IsaacROSLaunchFragmentSpec( |
| 121 | + 'isaac_ros_h264_decoder', 'IsaacROSStereoH264DecoderLaunchFragment'), |
| 122 | + 'stereo_h264_encoder': IsaacROSLaunchFragmentSpec( |
| 123 | + 'isaac_ros_h264_encoder', 'IsaacROSStereoH264EncoderLaunchFragment'), |
| 124 | + |
| 125 | + # Isaac ROS Depth Segmentation |
| 126 | + 'bi3d': IsaacROSLaunchFragmentSpec( |
| 127 | + 'isaac_ros_bi3d', 'IsaacROSBi3DLaunchFragment'), |
| 128 | + |
| 129 | + # Isaac ROS DNN Stereo Depth |
| 130 | + 'ess_disparity': IsaacROSLaunchFragmentSpec( |
| 131 | + 'isaac_ros_ess', 'IsaacROSEssLaunchFragment'), |
| 132 | + |
| 133 | + # Isaac ROS Freespace Segmentation |
| 134 | + 'bi3d_freespace': IsaacROSLaunchFragmentSpec( |
| 135 | + 'isaac_ros_bi3d_freespace', 'IsaacROSBi3DFreespaceLaunchFragment'), |
| 136 | + |
| 137 | + # Isaac ROS Image Pipeline |
| 138 | + 'resize': IsaacROSLaunchFragmentSpec( |
| 139 | + 'isaac_ros_image_proc', 'IsaacROSResizeLaunchFragment', |
| 140 | + 'isaac_ros_image_resize_core.launch.py'), |
| 141 | + 'flip': IsaacROSLaunchFragmentSpec( |
| 142 | + 'isaac_ros_image_proc', 'IsaacROSFlipLaunchFragment', |
| 143 | + 'isaac_ros_image_flip_core.launch.py'), |
| 144 | + 'crop': IsaacROSLaunchFragmentSpec( |
| 145 | + 'isaac_ros_image_proc', 'IsaacROSCropLaunchFragment', |
| 146 | + 'isaac_ros_image_crop_core.launch.py'), |
| 147 | + 'color_conversion': IsaacROSLaunchFragmentSpec( |
| 148 | + 'isaac_ros_image_proc', 'IsaacROSColorConversionLaunchFragment', |
| 149 | + 'isaac_ros_image_color_conversion_core.launch.py'), |
| 150 | + |
| 151 | + # Isaac ROS Image Segmentation |
| 152 | + 'segformer': IsaacROSLaunchFragmentSpec( |
| 153 | + 'isaac_ros_segformer', 'IsaacROSSegformerLaunchFragment'), |
| 154 | + 'segment_anything': IsaacROSLaunchFragmentSpec( |
| 155 | + 'isaac_ros_segment_anything', 'IsaacROSSegmentAnythingLaunchFragment'), |
| 156 | + 'unet': IsaacROSLaunchFragmentSpec( |
| 157 | + 'isaac_ros_unet', 'IsaacROSUNetLaunchFragment'), |
| 158 | + |
| 159 | + # Isaac ROS Object Detection |
| 160 | + 'rtdetr': IsaacROSLaunchFragmentSpec( |
| 161 | + 'isaac_ros_rtdetr', 'IsaacROSRtDetrLaunchFragment'), |
| 162 | + 'detectnet': IsaacROSLaunchFragmentSpec( |
| 163 | + 'isaac_ros_detectnet', 'IsaacROSDetectnetLaunchFragment'), |
| 164 | + 'yolov8': IsaacROSLaunchFragmentSpec( |
| 165 | + 'isaac_ros_yolov8', 'IsaacROSYolov8LaunchFragment'), |
| 166 | + |
| 167 | + # Isaac ROS Pose Estimation |
| 168 | + 'centerpose': IsaacROSLaunchFragmentSpec( |
| 169 | + 'isaac_ros_centerpose', 'IsaacROSCenterPoseLaunchFragment'), |
| 170 | + 'centerpose_visualizer': IsaacROSLaunchFragmentSpec( |
| 171 | + 'isaac_ros_centerpose', 'IsaacROSCenterPoseVisualizerLaunchFragment', |
| 172 | + 'isaac_ros_centerpose_visualizer_core.launch.py'), |
| 173 | + 'dope': IsaacROSLaunchFragmentSpec( |
| 174 | + 'isaac_ros_dope', 'IsaacROSDopeLaunchFragment'), |
| 175 | + 'foundationpose': IsaacROSLaunchFragmentSpec( |
| 176 | + 'isaac_ros_foundationpose', 'IsaacROSFoundationPoseLaunchFragment'), |
| 177 | + 'foundationpose_tracking': IsaacROSLaunchFragmentSpec( |
| 178 | + 'isaac_ros_foundationpose', 'IsaacROSFoundationPoseTrackingLaunchFragment', |
| 179 | + 'isaac_ros_foundationpose_tracking_core.launch.py'), |
| 180 | + |
| 181 | + # Isaac ROS Visual Slam |
| 182 | + 'visual_slam': IsaacROSLaunchFragmentSpec( |
| 183 | + 'isaac_ros_visual_slam', 'IsaacROSVisualSlamLaunchFragment'), |
| 184 | +} |
0 commit comments