berndpfrommer / flir_spinnaker_ros2

ros2 driver for flir spinnaker SDK
26 stars 27 forks source link

Pixel Format RGB8Packed on Chameleon3 not available #39

Closed FranzAlbers closed 1 year ago

FranzAlbers commented 1 year ago

Hello,

after pulling the latest changes from commit c3c6e440fdc9cc32a21cf5634a211170fd86ae32 and https://github.com/berndpfrommer/flir_spinnaker_common/commit/cf877300697953d1232b9586e36bc755ebef4957, running our Chameleon3 cameras in RGB8 pixel format is not possible anymore. Setting the pixel format to RGB8Packed instead is no option with our cameras because that parameter seems to be not available for the Chameleon3 cameras:

[camera_driver_node-1] [sensing.camera.camera_front]: using spinnaker lib version: 3.0.0.118
...
[camera_driver_node-1] [sensing.camera.camera_front]: setting ImageFormatControl/PixelFormat to: RGB8Packed
[camera_driver_node-1] [sensing.camera.camera_front]: setting ImageFormatControl/PixelFormat failed: node ImageFormatControl/PixelFormat invalid enum: RGB8Packed
[camera_driver_node-1] [sensing.camera.camera_front]: ImageFormatControl/PixelFormat set to: RGB8 instead of: RGB8Packed
...
[camera_driver_node-1] [sensing.camera.camera_front]: camera has pixel format: INVALID
[camera_driver_node-1] [sensing.camera.camera_front]: camera_driver_node started up!
[camera_driver_node-1] [sensing.camera.camera_front]: no ROS encoding for pixel format INVALID
[camera_driver_node-1] [sensing.camera.camera_front]: no ROS encoding for pixel format INVALID

It seems like the parameter RGB8Packed is simply called RGB8 on our models, which could be different from the Blackfly cameras (http://softwareservices.flir.com/BFS-U3-50S5/latest/Model/public/ImageFormatControl.html#PixelFormat). I did not find a similar list of image formats for the Chameleon3 camera, but RGB8 is also listed in the Spinview app for our cameras. An option that works for me is to simply add the RGB8 Format to the pixel format mapping lists. I'm happy to file the pull requests, if these changes sound good to you, @berndpfrommer.

berndpfrommer commented 1 year ago

Sorry for breaking the driver for the Chameleon. I no longer have access to that camera for testing. Your suggested fix sounds good to me. Looking forward to the PR.