Skip to content

Commit

Permalink
Add ffmpeg compression support for Blackfly
Browse files Browse the repository at this point in the history
  • Loading branch information
hilary-luo committed Nov 4, 2024
1 parent 18906e7 commit f0ec5c8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions clearpath_sensors/config/flir_blackfly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,18 @@ flir_blackfly:
chunk_enable_gain: true
chunk_selector_timestamp: Timestamp
chunk_enable_timestamp: true
image_debayer:
ros__parameters:
ffmpeg_image_transport:
qmax: 48
preset: veryfast
tune: zerolatency
bit_rate: 1000000
gop_size: 15
image_raw:
enable_pub_plugins: {}
debayer_node:
enable_pub_plugins:
- image_transport/compressed
- image_transport/ffmpeg
- image_transport/raw
4 changes: 4 additions & 0 deletions clearpath_sensors/launch/flir_blackfly.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def generate_launch_description():
(name + '/image_raw/compressed', 'raw/compressed'),
(name + '/image_raw/compressedDepth', 'raw/compressedDepth'),
(name + '/image_raw/theora', 'raw/theora'),
(name + '/image_raw/ffmpeg', 'raw/ffmpeg'),
],
extra_arguments=[{'use_intra_process_comms': True}],
),
Expand All @@ -83,6 +84,7 @@ def generate_launch_description():
plugin='image_proc::DebayerNode',
name='image_debayer',
namespace=namespace,
parameters=[parameters],
remappings=[
('image_raw', 'raw/image'),
('image_color', 'color/image'),
Expand All @@ -93,6 +95,8 @@ def generate_launch_description():
('image_mono/compressed', 'mono/compressed'),
('image_mono/compressedDepth', 'mono/compressedDepth'),
('image_mono/theora', 'mono/theora'),
('image_color/ffmpeg', 'color/ffmpeg'),
('image_mono/ffmpeg', 'mono/ffmpeg'),
],
extra_arguments=[{'use_intra_process_comms': True}],
),
Expand Down
1 change: 1 addition & 0 deletions clearpath_sensors/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend>ffmpeg_image_transport</exec_depend>
<exec_depend>flir_camera_description</exec_depend>
<exec_depend>flir_camera_msgs</exec_depend>
<exec_depend>image_proc</exec_depend>
Expand Down

0 comments on commit f0ec5c8

Please sign in to comment.