Skip to content

Commit dc1fcad

Browse files
committed
Add remaps for additional image transports
1 parent 510f4e5 commit dc1fcad

File tree

5 files changed

+67
-32
lines changed

5 files changed

+67
-32
lines changed

clearpath_sensors/launch/axis_camera.launch.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ def generate_launch_description():
6565
output='screen',
6666
remappings=[
6767
('image_raw/compressed', 'color/image/compressed'),
68+
('image_raw/compressedDepth', 'color/image/compressedDepth'),
69+
('image_raw/theora', 'color/image/theora'),
70+
('image_raw/ffmpeg', 'color/image/ffmpeg'),
71+
('image_raw/ztsd', 'color/image/ztsd'),
72+
('image_raw/foxglove', 'color/image/foxglove'),
6873
('camera_info', 'color/camera_info'),
6974
('joint_states',
7075
PathJoinSubstitution(['/', robot_namespace, 'platform', 'joint_states'])),

clearpath_sensors/launch/flir_blackfly.launch.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def generate_launch_description():
7676
(name + '/image_raw/compressedDepth', 'raw/compressedDepth'),
7777
(name + '/image_raw/theora', 'raw/theora'),
7878
(name + '/image_raw/ffmpeg', 'raw/ffmpeg'),
79+
(name + '/image_raw/ztsd', 'raw/ztsd'),
80+
(name + '/image_raw/foxglove', 'raw/foxglove'),
7981
],
8082
extra_arguments=[{'use_intra_process_comms': True}],
8183
),
@@ -91,12 +93,16 @@ def generate_launch_description():
9193
('image_color/compressed', 'color/compressed'),
9294
('image_color/compressedDepth', 'color/compressedDepth'),
9395
('image_color/theora', 'color/theora'),
96+
('image_color/ffmpeg', 'color/ffmpeg'),
97+
('image_color/ztsd', 'color/ztsd'),
98+
('image_color/foxglove', 'color/foxglove'),
9499
('image_mono', 'mono/image'),
95100
('image_mono/compressed', 'mono/compressed'),
96101
('image_mono/compressedDepth', 'mono/compressedDepth'),
97102
('image_mono/theora', 'mono/theora'),
98-
('image_color/ffmpeg', 'color/ffmpeg'),
99103
('image_mono/ffmpeg', 'mono/ffmpeg'),
104+
('image_mono/ztsd', 'mono/ztsd'),
105+
('image_mono/foxglove', 'mono/foxglove'),
100106
],
101107
extra_arguments=[{'use_intra_process_comms': True}],
102108
),

clearpath_sensors/launch/intel_realsense.launch.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@
5252
'metadata',
5353
]
5454

55+
TRANSPORTS = [
56+
'compressed',
57+
'compressedDepth',
58+
'theora',
59+
'ffmpeg',
60+
'ztsd',
61+
'foxglove',
62+
]
63+
5564
OTHERS = [
5665
'rgbd',
5766
'extrinsics/depth_to_color',
@@ -88,12 +97,13 @@ def generate_launch_description():
8897

8998
for camera in CAMERAS:
9099
for image in IMAGES:
91-
remappings.extend([
100+
remappings.append(
92101
(f'~/{camera}/{image}', f'{camera}/image'),
93-
(f'~/{camera}/{image}/compressed', f'{camera}/compressed'),
94-
(f'~/{camera}/{image}/compressedDepth', f'{camera}/compressedDepth'),
95-
(f'~/{camera}/{image}/theora', f'{camera}/theora'),
96-
])
102+
)
103+
for transport in TRANSPORTS:
104+
remappings.append(
105+
(f'~/{camera}/{image}/{transport}', f'{camera}/{transport}')
106+
)
97107
for topic in TOPICS:
98108
remappings.append(
99109
(f'~/{camera}/{topic}', f'{camera}/{topic}')

clearpath_sensors/launch/luxonis_oakd.launch.py

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,41 +35,47 @@
3535
from launch_ros.descriptions import ComposableNode
3636
from launch_ros.substitutions import FindPackageShare
3737

38+
TRANSPORTS = [
39+
'compressed',
40+
'compressedDepth',
41+
'theora',
42+
'ffmpeg',
43+
'ztsd',
44+
'foxglove',
45+
]
46+
3847

3948
def launch_setup(context):
4049
parameters = LaunchConfiguration('parameters')
4150
namespace = LaunchConfiguration('namespace')
4251

4352
name = os.path.basename(namespace.perform(context))
4453

45-
depthai_oakd_node = ComposableNode(
46-
package='depthai_ros_driver',
47-
name=name,
48-
namespace=namespace,
49-
plugin='depthai_ros_driver::Camera',
50-
parameters=[parameters],
51-
remappings=[
54+
remappings = [
5255
('~/imu/data', 'imu/data'),
5356
('~/nn/spatial_detections', 'nn/spatial_detections'),
5457
('~/rgb/camera_info', 'color/camera_info'),
5558
('~/rgb/image_raw', 'color/image'),
56-
('~/rgb/image_raw/compressed', 'color/compressed'),
57-
('~/rgb/image_raw/compressedDepth', 'color/compressedDepth'),
58-
('~/rgb/image_raw/ffmpeg', 'color/ffmpeg'),
59-
('~/rgb/image_raw/theora', 'color/theora'),
6059
('~/rgb/preview/image_raw', 'color/image'),
61-
('~/rgb/preview/image_raw/compressed', 'color/compressed'),
62-
('~/rgb/preview/image_raw/compressedDepth', 'color/compressedDepth'),
63-
('~/rgb/preview/image_raw/ffmpeg', 'color/ffmpeg'),
64-
('~/rgb/preview/image_raw/theora', 'color/theora'),
6560
('~/stereo/camera_info', 'stereo/camera_info'),
6661
('~/stereo/image_raw', 'stereo/image'),
67-
('~/stereo/image_raw/compressed', 'stereo/compressed'),
68-
('~/stereo/image_raw/compressedDepth', 'stereo/compressedDepth'),
69-
('~/stereo/image_raw/ffmpeg', 'stereo/ffmpeg'),
70-
('~/stereo/image_raw/theora', 'stereo/theora'),
7162
('/diagnostics', 'diagnostics'),
72-
],
63+
]
64+
65+
for transport in TRANSPORTS:
66+
remappings.extend([
67+
(f'~/rgb/image_raw/{transport}', f'color/{transport}'),
68+
(f'~/rgb/preview/image_raw/{transport}', f'color/{transport}'),
69+
(f'~/stereo/image_raw/{transport}', f'stereo/{transport}')
70+
])
71+
72+
depthai_oakd_node = ComposableNode(
73+
package='depthai_ros_driver',
74+
name=name,
75+
namespace=namespace,
76+
plugin='depthai_ros_driver::Camera',
77+
parameters=[parameters],
78+
remappings=remappings,
7379
extra_arguments=[{'use_intra_process_comms': True}],
7480
)
7581

clearpath_sensors/launch/stereolabs_zed.launch.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@
6565
('stereo_raw', 'stereo/raw')
6666
]
6767

68+
TRANSPORTS = [
69+
'compressed',
70+
'compressedDepth',
71+
'theora',
72+
'ffmpeg',
73+
'ztsd',
74+
'foxglove',
75+
]
76+
6877
OTHERS = [
6978
'temperature/imu',
7079
'temperature/left',
@@ -129,13 +138,12 @@ def generate_launch_description():
129138
PathJoinSubstitution(['/', namespace, new, 'camera_info'])),
130139
('~/%s/%s' % (old, image),
131140
PathJoinSubstitution(['/', namespace, new, 'image'])),
132-
('~/%s/%s/compressed' % (old, image),
133-
PathJoinSubstitution(['/', namespace, new, 'compressed'])),
134-
('~/%s/%s/compressedDepth' % (old, image),
135-
PathJoinSubstitution(['/', namespace, new, 'compressedDepth'])),
136-
('~/%s/%s/theora' % (old, image),
137-
PathJoinSubstitution(['/', namespace, new, 'theora'])),
138141
])
142+
for transport in TRANSPORTS:
143+
remappings.append(
144+
('~/%s/%s/%s' % (old, image, transport),
145+
PathJoinSubstitution(['/', namespace, new, transport])),
146+
)
139147

140148
# Others
141149
for topic in OTHERS:

0 commit comments

Comments
 (0)