flir_camera_driver
flir_camera_driver copied to clipboard
[image_format_encoding] The driver cannot work well with 24-pixel encoding
I am running this ros driver in Ubuntu18.04 using spinnaker SDK version 1.23.0.27 and a GigE Flir camera which can support encoding BGR8
.
The driver outputs the following error. But using encoding BayerRG8
has no issues.
auto-starting new master
process[master]: started with pid [21484]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to f56c62dc-aaef-11ea-bf3f-4c1d96b04f6e
process[rosout-1]: started with pid [21495]
started core service [/rosout]
process[wide_angle_camera/camera_nodelet_manager-2]: started with pid [21498]
process[wide_angle_camera/spinnaker_camera_nodelet-3]: started with pid [21503]
process[wide_angle_camera/image_proc_debayer-4]: started with pid [21504]
[ INFO] [1591775818.511763483]: Loader::Impl::advertiseRosApi Initializing nodelet with 12 worker threads.
[ INFO] [1591775821.087440826]: SpinnakerCamera::connect [SpinnakerCamera]: Detected device type: GEV. Camera model name: 'Blackfly S BFS-GE-16S2C-BD' with serial '20064260'.
[ERROR] [1591775821.473754766]: SpinnakerCameraNodelet::paramCallback Reconfigure Callback failed with error: [Camera::setNewConfiguration] Failed to set configuration: Spinnaker: GenICam::OutOfRangeException= Value 25.843523 must be smaller than or equal 25.843522. : OutOfRangeException thrown in node 'AcquisitionFrameRate' while calling 'AcquisitionFrameRate.SetValue()' (file 'FloatT.h', line 85) [-2002]
I also tested the encoding BGR8
in Ubuntu18.04 using spinnaker SDK version 1.23.0.27 and a USB Flir camera. This results in blue and red colors being inverted in the published image. Using BayerRG8
has no issues.
So i think there is something wrong to handle the encoding in the ros driver.
@civerachb-cpr Could you have a look at this?
I just talked with the package maintainer. This is a known issue. If you can work around the problem by using BayerRG that would be the most-expedient solution for now until a permanent fix can be implemented.
Looks like 24bit defaults to RGB8.
https://github.com/ros-drivers/flir_camera_driver/blob/317b34bb0ed836912100d6ffaeae0a6950eb2092/spinnaker_camera_driver/src/SpinnakerCamera.cpp#L423
Yes. When setting "image_format_color_coding" to "BGR8" the encoding of the published image is "RGB8". This results in blue and red colors being inverted in the published image.