-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from aliddell/8-add-launch-file-for-oryx-camera
Add launch file for Oryx camera
- Loading branch information
Showing
4 changed files
with
84 additions
and
22 deletions.
There are no files selected for viewing
Submodule acquire-zarr-library
updated
27 files
+62 −15 | .github/workflows/build.yml | |
+88 −16 | .github/workflows/release.yml | |
+56 −17 | .github/workflows/test.yml | |
+66 −7 | .gitignore | |
+17 −2 | CMakeLists.txt | |
+10 −0 | MANIFEST.in | |
+146 −278 | README.md | |
+3 −3 | include/acquire.zarr.h | |
+53 −0 | pyproject.toml | |
+26 −0 | python/CMakeLists.txt | |
+727 −0 | python/acquire-zarr-py.cpp | |
+129 −0 | python/tests/test_settings.py | |
+410 −0 | python/tests/test_stream.py | |
+72 −0 | setup.py | |
+1 −1 | src/logger/CMakeLists.txt | |
+1 −1 | src/logger/logger.cpp | |
+4 −0 | src/logger/logger.hh | |
+2 −1 | src/logger/logger.types.h | |
+4 −3 | src/streaming/CMakeLists.txt | |
+7 −1 | src/streaming/acquire.zarr.cpp | |
+9 −11 | src/streaming/s3.sink.cpp | |
+1 −0 | src/streaming/zarr.common.cpp | |
+11 −19 | src/streaming/zarr.stream.cpp | |
+2 −6 | tests/CMakeLists.txt | |
+2 −2 | tests/integration/CMakeLists.txt | |
+4 −3 | tests/unit-tests/CMakeLists.txt | |
+112 −0 | tests/unit-tests/s3-sink-write-multipart.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
from launch_ros.substitutions import FindPackageShare | ||
|
||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
from launch.actions import OpaqueFunction, IncludeLaunchDescription, DeclareLaunchArgument as LaunchArg | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch.substitutions import PathJoinSubstitution, LaunchConfiguration as LaunchConfig | ||
|
||
oryx_parameters = { | ||
'debug': False, | ||
'compute_brightness': False, | ||
'adjust_timestamp': True, | ||
'dump_node_map': False, | ||
'frame_rate_auto': 'Off', | ||
'buffer_queue_size': 10, | ||
} | ||
|
||
def launch_setup(context, *args, **kwargs): | ||
"""Launch camera driver node.""" | ||
parameter_file = PathJoinSubstitution( | ||
[FindPackageShare('spinnaker_camera_driver'), 'config', 'oryx.yaml'] | ||
) | ||
|
||
camera_node = Node( | ||
package='spinnaker_camera_driver', | ||
executable='camera_driver_node', | ||
output='screen', | ||
name='oryx', | ||
parameters=[ | ||
oryx_parameters, | ||
{ | ||
'ffmpeg_image_transport.encoding': 'hevc_nvenc', | ||
'parameter_file': parameter_file, | ||
'serial_number': [LaunchConfig('serial')], #"'23011970'", | ||
}, | ||
], | ||
) | ||
|
||
zarr_writer_node = Node( | ||
package='acquire_zarr', | ||
executable='zarr_writer_node_exe', | ||
parameters=[{ | ||
'zarr_out_path': LaunchConfig('zarr_out_path'), | ||
'dimension_sizes': [0, LaunchConfig('image_height'), LaunchConfig('image_width')], | ||
'chunk_sizes': [1, LaunchConfig('image_height'), LaunchConfig('image_width')], | ||
}], | ||
remappings=[ | ||
('image_raw', '/oryx/image_raw'), | ||
], | ||
output='screen' | ||
) | ||
|
||
return [camera_node, zarr_writer_node] | ||
|
||
def generate_launch_description(): | ||
return LaunchDescription([ | ||
LaunchArg('serial', default_value="'23011970'", description='Camera serial number'), | ||
LaunchArg('image_width', default_value='2448', description='Image width'), | ||
LaunchArg('image_height', default_value='2048', description='Image height'), | ||
LaunchArg('zarr_out_path', default_value='/tmp/out.zarr', description='zarr output path'), | ||
OpaqueFunction(function=launch_setup) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters