Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blackfly #26

Merged
merged 6 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions clearpath_sensors/config/flir_blackfly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
flir_blackfly:
ros__parameters:
serial_number: ''
debug: false
compute_brightness: false
adjust_timestamp: true
dump_node_map: false
gain_auto: Continuous
pixel_format: BayerRG8
exposure_auto: Continuous
# These are useful for GigE cameras
# device_link_throughput_limit: 380000000
# gev_scps_packet_size: 9000
# ---- to reduce the sensor width and shift the crop
# image_width: 1408
# image_height: 1080
# offset_x: 16
# offset_y: 0
frame_rate_auto: Off
frame_rate: 40.0
frame_rate_enable: true
buffer_queue_size: 1
trigger_mode: Off
chunk_mode_active: true
chunk_selector_frame_id: FrameID
chunk_enable_frame_id: true
chunk_selector_exposure_time: ExposureTime
chunk_enable_exposure_time: true
chunk_selector_gain: Gain
chunk_enable_gain: true
chunk_selector_timestamp: Timestamp
chunk_enable_timestamp: true
93 changes: 93 additions & 0 deletions clearpath_sensors/launch/flir_blackfly.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Software License Agreement (BSD)
#
# @author Roni Kreinin <[email protected]>
# @copyright (c) 2023, Clearpath Robotics, Inc., All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Clearpath Robotics nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution

from launch_ros.actions import Node
from launch_ros.substitutions import FindPackageShare


def generate_launch_description():
parameters = LaunchConfiguration('parameters')
namespace = LaunchConfiguration('namespace')
param_mapping_file = LaunchConfiguration('param_mapping_file')

arg_parameters = DeclareLaunchArgument(
'parameters',
default_value=PathJoinSubstitution([
FindPackageShare('clearpath_sensors'),
'config',
'flir_blackfly.yaml'
]))

arg_param_mapping_file = DeclareLaunchArgument(
'param_mapping_file',
default_value=PathJoinSubstitution([
FindPackageShare('spinnaker_camera_driver'), 'config',
'blackfly_s.yaml'
]))

arg_namespace = DeclareLaunchArgument(
'namespace',
default_value='platform/sensors/camera_0')

blackfly_camera_node = Node(
package='spinnaker_camera_driver',
namespace=namespace,
name='flir_blackfly',
executable='camera_driver_node',
parameters=[parameters, {'parameter_file': param_mapping_file,}],
output='screen',
remappings=[
('flir_blackfly/camera_info', 'color/camera_info'),
('flir_blackfly/control', 'control'),
('flir_blackfly/image_raw', 'image_raw'),
('flir_blackfly/meta', 'meta'),
]
)

debayer_node = Node(
package='image_proc',
namespace=namespace,
name='debayer_node',
executable='image_proc',
output='screen',
remappings=[
('image_color', 'color/image'),
('image_mono', 'mono/image'),
]
)

ld = LaunchDescription()
ld.add_action(arg_parameters)
ld.add_action(arg_param_mapping_file)
ld.add_action(arg_namespace)
ld.add_action(blackfly_camera_node)
ld.add_action(debayer_node)
return ld
4 changes: 4 additions & 0 deletions clearpath_sensors/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<exec_depend>flir_camera_description</exec_depend>
<exec_depend>flir_camera_msgs</exec_depend>
<exec_depend>image_proc</exec_depend>
<exec_depend>microstrain_inertial_driver</exec_depend>
<exec_depend>nmea_navsat_driver</exec_depend>
<exec_depend>realsense2_camera</exec_depend>
<exec_depend>spinnaker_camera_driver</exec_depend>
<exec_depend>umx_driver</exec_depend>
<exec_depend>urg_node</exec_depend>
<exec_depend>velodyne_driver</exec_depend>
Expand Down