Package Summary

Tags No category tags.
Version 2.1.16
License Apache-2
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros-drivers/flir_camera_driver.git
VCS Type git
VCS Version humble-release
Last Updated 2024-04-20
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS2 driver for synchronized flir cameras using the Spinnaker SDK

Additional Links

No additional links.

Maintainers

  • Bernd Pfrommer

Authors

No additional authors.

Spinnaker ROS2 Synchronized Camera Driver

This package provides a driver specifically for hardware synchronized cameras made by Teledyne/FLIR that work with the Spinnaker SDK. The main difference to running several instances of the unsynchronized camera driver is that this driver will assign identical header time stamps to frames that have been generated by the same synchronization pulse.

NOTE: This driver is not written or supported by FLIR.

Tested Configurations

Cameras

The following cameras have been used with this driver:

  • Blackfly S (USB3)
  • Blackfly (GigE)

Platforms

  • ROS2 Galactic under Ubuntu 20.04 LTS (no longer actively tested)
  • ROS2 Humble/Iron/Rolling under Ubuntu 22.04 LTS
  • Spinnaker 3.1.0.79 (other versions may work as well but this is what the continuous integration builds are using)

How to install

The installation is analogous to the one for the unsynchronized spinnaker camera driver.

How to use

It is recommended to first get the cameras working with SpinView, then with the single-camera driver individually before proceeding with the synchronized setup.

The synchronized camera server works by instantiating a number of individual camera servers and exposure controllers. Each camera server is fully configurable with all parameters available as listed in the spinnaker camera driver. Likewise each exposure controller has its own parameter set.

There are two types of controllers: master controllers and followers. The master controllers regulate the brightness of the camera they are controlling, while follower controllers set the exposure parameters of the camera they are controlling based on the exposure parameters of the master controller they follow.

Since there are many parameters involved the setup can be tricky. It is recommended to start from the follower_example.launch.py example when using a stereo camera for e.g. VIO, or the master_example.launch.py when running cameras with individual exposure control.

Topics

Published:

  • ~/<camera_name>/image_raw: the synchronized camera image
  • ~/<camera_name>/camera_info: the synchronized camera calibration messages
  • ~/<camera_name>/meta: synchronized meta data like exposure time and gain

Synchronized server parameters

  • cameras (list of strings): names of the cameras. Default: empty list.
  • exposure_controllers (list of strings): names of the exposure controllers. List must be of same length as the list of camera names.

Camera server parameters

For a list of all parameters, see the spinnaker camera driver. The parameters are exposed under <camera_name>.parameter.

Exposure controller parameters

  • Master exposure controller:

    : - brightness target (int): average image brightness to accomplish. Value range is [0..255]. Default: 120. - brightness_tolerance (int): how much actual brightness can deviate for brightness_target before the control parameters are updated. Default: 5. - exposure_parameter (string): Name of the ROS parameter under which exposure time is accessible for the single camera driver. This must match the ros parameter name associated with the Spinnaker node that controls exposure time, which is set in the camera .yaml config file. Default: exposure_time. - gain_parameter (string): Name of the ROS parameter controlling camera gain. See camera .yaml config file. Default: gain. - gain_priority (boolean): Gain priority means: If image is too bright, first try reducing the gain, and only update exposure time if gain is zero. If image is too dark, first try increasing the exposure time, and only increase gain if maximum exposure time has been reached. Time priority means: if image is too bright, first try reducing the exposure time, and only when min_exposure_time has been reached, reduce the gain. If image is too dark and gain is below max_gain, increase the gain, otherwise increase the exposure time. Default: false (i.e. use Time priority). - max_exposure_time (int): Maximum exposure time (in microseconds). Default: 1000. - max_frames_skip (int): It sometimes takes a few frames before a change commanded to exposure time or gain will actually be executed by the camera, and the frame meta data will indicate the change. After commanding a change of exposure parameters, the exposure controller will wait for at most max_frames_skip before it gives up and sends a new command to change exposure parameters (gain or time). Default: 10. - max_gain (float): Maximum gain (in db). Default: 10.0 - min_exposure_time (int): Minimum exposure time (in microseconds). This is not a hard limit, but has the following function: if the brightness needs to be reduced and the exposure time would fall below min_exposure_time, then the gain (if greater than zero) is reduced first. Only if the gain is zero and the image is still too bright will the exposure time be reduced below min_exposure_time. Default: 1us

  • Follower exposure controller:

    : - exposure_parameter (string): see Master exposure controller. - gain_parameter (string): see Master exposure controller. - master (string): the name of the master controller to use - max_frames_skip (int): see Master exposure controller.

Example usage

The driver comes with two example launch files that need to be modified for your purposes (update serial numbers etc). The follower_example.launch.py can be used as template for stereo cameras, the master_example.launch.py for situations where each camera should run their own exposure control.

ros2 launch spinnaker_synchronized_camera_driver follower_example.launch.py

Carefully examine the camera parameters that are set in the launch file, in particular the following ones:

  • compute_brightness must be true for any camera governed by a master controller.
  • exposure_auto must be off (disable the individual camera controller).
  • chunk_mode_active must be true, and chunk exposure time, gain and frame id must be enabled

Known issues

See the caveats for the spinnaker camera driver.

How to contribute

Bug fixes and config files for new cameras are greatly appreciated. Before submitting a pull request, run this to see if your commit passes some basic lint tests:

colcon test --packages-select spinnaker_synchronized_camera_driver && colcon test-result --verbose

License

This software is issued under the Apache License Version 2.0.

CHANGELOG

Changelog for package spinnaker_synchronized_camera_driver

2.1.16 (2024-04-20)

  • updated docs for sync driver, switch to RST
  • added follower exposure controller renamed individual -> master
  • Contributors: Bernd Pfrommer

2.1.15 (2024-03-28)

  • fixes to compile on focal/galactic
  • Contributors: Bernd Pfrommer

2.1.14 (2024-03-22)

  • remove direct dependency on spinnaker to fix broken build on ros2 farm
  • Contributors: Bernd Pfrommer

2.1.13 (2024-03-13)

  • track incomplete frames
  • fixed licensing documentation
  • implement individual exposure controller
  • fixed bugs discovered when running on GigE cams
  • Contributors: Bernd Pfrommer

2.1.11 (2024-02-23)

  • First release as a ROS package
  • Contributors: Bernd Pfrommer

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged spinnaker_synchronized_camera_driver at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.2.16
License Apache-2
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros-drivers/flir_camera_driver.git
VCS Type git
VCS Version iron-release
Last Updated 2024-04-20
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS2 driver for synchronized flir cameras using the Spinnaker SDK

Additional Links

No additional links.

Maintainers

  • Bernd Pfrommer

Authors

No additional authors.

Spinnaker ROS2 Synchronized Camera Driver

This package provides a driver specifically for hardware synchronized cameras made by Teledyne/FLIR that work with the Spinnaker SDK. The main difference to running several instances of the unsynchronized camera driver is that this driver will assign identical header time stamps to frames that have been generated by the same synchronization pulse.

NOTE: This driver is not written or supported by FLIR.

Tested Configurations

Cameras

The following cameras have been used with this driver:

  • Blackfly S (USB3)
  • Blackfly (GigE)

Platforms

  • ROS2 Galactic under Ubuntu 20.04 LTS (no longer actively tested)
  • ROS2 Humble/Iron/Rolling under Ubuntu 22.04 LTS
  • Spinnaker 3.1.0.79 (other versions may work as well but this is what the continuous integration builds are using)

How to install

The installation is analogous to the one for the unsynchronized spinnaker camera driver.

How to use

It is recommended to first get the cameras working with SpinView, then with the single-camera driver individually before proceeding with the synchronized setup.

The synchronized camera server works by instantiating a number of individual camera servers and exposure controllers. Each camera server is fully configurable with all parameters available as listed in the spinnaker camera driver. Likewise each exposure controller has its own parameter set.

There are two types of controllers: master controllers and followers. The master controllers regulate the brightness of the camera they are controlling, while follower controllers set the exposure parameters of the camera they are controlling based on the exposure parameters of the master controller they follow.

Since there are many parameters involved the setup can be tricky. It is recommended to start from the follower_example.launch.py example when using a stereo camera for e.g. VIO, or the master_example.launch.py when running cameras with individual exposure control.

Topics

Published:

  • ~/<camera_name>/image_raw: the synchronized camera image
  • ~/<camera_name>/camera_info: the synchronized camera calibration messages
  • ~/<camera_name>/meta: synchronized meta data like exposure time and gain

Synchronized server parameters

  • cameras (list of strings): names of the cameras. Default: empty list.
  • exposure_controllers (list of strings): names of the exposure controllers. List must be of same length as the list of camera names.

Camera server parameters

For a list of all parameters, see the spinnaker camera driver. The parameters are exposed under <camera_name>.parameter.

Exposure controller parameters

  • Master exposure controller:

    : - brightness target (int): average image brightness to accomplish. Value range is [0..255]. Default: 120. - brightness_tolerance (int): how much actual brightness can deviate for brightness_target before the control parameters are updated. Default: 5. - exposure_parameter (string): Name of the ROS parameter under which exposure time is accessible for the single camera driver. This must match the ros parameter name associated with the Spinnaker node that controls exposure time, which is set in the camera .yaml config file. Default: exposure_time. - gain_parameter (string): Name of the ROS parameter controlling camera gain. See camera .yaml config file. Default: gain. - gain_priority (boolean): Gain priority means: If image is too bright, first try reducing the gain, and only update exposure time if gain is zero. If image is too dark, first try increasing the exposure time, and only increase gain if maximum exposure time has been reached. Time priority means: if image is too bright, first try reducing the exposure time, and only when min_exposure_time has been reached, reduce the gain. If image is too dark and gain is below max_gain, increase the gain, otherwise increase the exposure time. Default: false (i.e. use Time priority). - max_exposure_time (int): Maximum exposure time (in microseconds). Default: 1000. - max_frames_skip (int): It sometimes takes a few frames before a change commanded to exposure time or gain will actually be executed by the camera, and the frame meta data will indicate the change. After commanding a change of exposure parameters, the exposure controller will wait for at most max_frames_skip before it gives up and sends a new command to change exposure parameters (gain or time). Default: 10. - max_gain (float): Maximum gain (in db). Default: 10.0 - min_exposure_time (int): Minimum exposure time (in microseconds). This is not a hard limit, but has the following function: if the brightness needs to be reduced and the exposure time would fall below min_exposure_time, then the gain (if greater than zero) is reduced first. Only if the gain is zero and the image is still too bright will the exposure time be reduced below min_exposure_time. Default: 1us

  • Follower exposure controller:

    : - exposure_parameter (string): see Master exposure controller. - gain_parameter (string): see Master exposure controller. - master (string): the name of the master controller to use - max_frames_skip (int): see Master exposure controller.

Example usage

The driver comes with two example launch files that need to be modified for your purposes (update serial numbers etc). The follower_example.launch.py can be used as template for stereo cameras, the master_example.launch.py for situations where each camera should run their own exposure control.

ros2 launch spinnaker_synchronized_camera_driver follower_example.launch.py

Carefully examine the camera parameters that are set in the launch file, in particular the following ones:

  • compute_brightness must be true for any camera governed by a master controller.
  • exposure_auto must be off (disable the individual camera controller).
  • chunk_mode_active must be true, and chunk exposure time, gain and frame id must be enabled

Known issues

See the caveats for the spinnaker camera driver.

How to contribute

Bug fixes and config files for new cameras are greatly appreciated. Before submitting a pull request, run this to see if your commit passes some basic lint tests:

colcon test --packages-select spinnaker_synchronized_camera_driver && colcon test-result --verbose

License

This software is issued under the Apache License Version 2.0.

CHANGELOG

Changelog for package spinnaker_synchronized_camera_driver

2.2.16 (2024-04-20)

  • updated docs for sync driver, switch to RST
  • added follower exposure controller renamed individual -> master
  • Contributors: Bernd Pfrommer

2.2.15 (2024-03-28)

  • fixes to compile on focal/galactic
  • Contributors: Bernd Pfrommer

2.2.14 (2024-03-17)

  • avoid direct spinnaker dependency
  • Contributors: Bernd Pfrommer

2.2.13 (2024-03-13)

2.2.12 (2024-03-07)

  • track incomplete frames
  • fixed licensing documentation
  • implement individual exposure controller
  • fixed bugs discovered when running on GigE cams
  • Contributors: Bernd Pfrommer

2.2.11 (2024-02-23)

  • First release as ROS package
  • Contributors: Bernd Pfrommer

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged spinnaker_synchronized_camera_driver at Robotics Stack Exchange

Package Summary

Tags No category tags.
Version 2.0.16
License Apache-2
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros-drivers/flir_camera_driver.git
VCS Type git
VCS Version rolling-release
Last Updated 2024-04-20
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS2 driver for synchronized flir cameras using the Spinnaker SDK

Additional Links

No additional links.

Maintainers

  • Bernd Pfrommer

Authors

No additional authors.

Spinnaker ROS2 Synchronized Camera Driver

This package provides a driver specifically for hardware synchronized cameras made by Teledyne/FLIR that work with the Spinnaker SDK. The main difference to running several instances of the unsynchronized camera driver is that this driver will assign identical header time stamps to frames that have been generated by the same synchronization pulse.

NOTE: This driver is not written or supported by FLIR.

Tested Configurations

Cameras

The following cameras have been used with this driver:

  • Blackfly S (USB3)
  • Blackfly (GigE)

Platforms

  • ROS2 Galactic under Ubuntu 20.04 LTS (no longer actively tested)
  • ROS2 Humble/Iron/Rolling under Ubuntu 22.04 LTS
  • Spinnaker 3.1.0.79 (other versions may work as well but this is what the continuous integration builds are using)

How to install

The installation is analogous to the one for the unsynchronized spinnaker camera driver.

How to use

It is recommended to first get the cameras working with SpinView, then with the single-camera driver individually before proceeding with the synchronized setup.

The synchronized camera server works by instantiating a number of individual camera servers and exposure controllers. Each camera server is fully configurable with all parameters available as listed in the spinnaker camera driver. Likewise each exposure controller has its own parameter set.

There are two types of controllers: master controllers and followers. The master controllers regulate the brightness of the camera they are controlling, while follower controllers set the exposure parameters of the camera they are controlling based on the exposure parameters of the master controller they follow.

Since there are many parameters involved the setup can be tricky. It is recommended to start from the follower_example.launch.py example when using a stereo camera for e.g. VIO, or the master_example.launch.py when running cameras with individual exposure control.

Topics

Published:

  • ~/<camera_name>/image_raw: the synchronized camera image
  • ~/<camera_name>/camera_info: the synchronized camera calibration messages
  • ~/<camera_name>/meta: synchronized meta data like exposure time and gain

Synchronized server parameters

  • cameras (list of strings): names of the cameras. Default: empty list.
  • exposure_controllers (list of strings): names of the exposure controllers. List must be of same length as the list of camera names.

Camera server parameters

For a list of all parameters, see the spinnaker camera driver. The parameters are exposed under <camera_name>.parameter.

Exposure controller parameters

  • Master exposure controller:

    : - brightness target (int): average image brightness to accomplish. Value range is [0..255]. Default: 120. - brightness_tolerance (int): how much actual brightness can deviate for brightness_target before the control parameters are updated. Default: 5. - exposure_parameter (string): Name of the ROS parameter under which exposure time is accessible for the single camera driver. This must match the ros parameter name associated with the Spinnaker node that controls exposure time, which is set in the camera .yaml config file. Default: exposure_time. - gain_parameter (string): Name of the ROS parameter controlling camera gain. See camera .yaml config file. Default: gain. - gain_priority (boolean): Gain priority means: If image is too bright, first try reducing the gain, and only update exposure time if gain is zero. If image is too dark, first try increasing the exposure time, and only increase gain if maximum exposure time has been reached. Time priority means: if image is too bright, first try reducing the exposure time, and only when min_exposure_time has been reached, reduce the gain. If image is too dark and gain is below max_gain, increase the gain, otherwise increase the exposure time. Default: false (i.e. use Time priority). - max_exposure_time (int): Maximum exposure time (in microseconds). Default: 1000. - max_frames_skip (int): It sometimes takes a few frames before a change commanded to exposure time or gain will actually be executed by the camera, and the frame meta data will indicate the change. After commanding a change of exposure parameters, the exposure controller will wait for at most max_frames_skip before it gives up and sends a new command to change exposure parameters (gain or time). Default: 10. - max_gain (float): Maximum gain (in db). Default: 10.0 - min_exposure_time (int): Minimum exposure time (in microseconds). This is not a hard limit, but has the following function: if the brightness needs to be reduced and the exposure time would fall below min_exposure_time, then the gain (if greater than zero) is reduced first. Only if the gain is zero and the image is still too bright will the exposure time be reduced below min_exposure_time. Default: 1us

  • Follower exposure controller:

    : - exposure_parameter (string): see Master exposure controller. - gain_parameter (string): see Master exposure controller. - master (string): the name of the master controller to use - max_frames_skip (int): see Master exposure controller.

Example usage

The driver comes with two example launch files that need to be modified for your purposes (update serial numbers etc). The follower_example.launch.py can be used as template for stereo cameras, the master_example.launch.py for situations where each camera should run their own exposure control.

ros2 launch spinnaker_synchronized_camera_driver follower_example.launch.py

Carefully examine the camera parameters that are set in the launch file, in particular the following ones:

  • compute_brightness must be true for any camera governed by a master controller.
  • exposure_auto must be off (disable the individual camera controller).
  • chunk_mode_active must be true, and chunk exposure time, gain and frame id must be enabled

Known issues

See the caveats for the spinnaker camera driver.

How to contribute

Bug fixes and config files for new cameras are greatly appreciated. Before submitting a pull request, run this to see if your commit passes some basic lint tests:

colcon test --packages-select spinnaker_synchronized_camera_driver && colcon test-result --verbose

License

This software is issued under the Apache License Version 2.0.

CHANGELOG

Changelog for package spinnaker_synchronized_camera_driver

2.0.16 (2024-04-20)

  • updated docs for sync driver, switch to RST
  • added follower exposure controller renamed individual -> master
  • Contributors: Bernd Pfrommer

2.0.15 (2024-03-28)

  • fixes to compile on focal/galactic
  • track incomplete frames
  • fixed licensing documentation
  • Contributors: Bernd Pfrommer

2.0.11 (2024-02-29)

  • first release as a ROS package on rolling
  • Contributors: Bernd Pfrommer

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged spinnaker_synchronized_camera_driver at Robotics Stack Exchange

No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.