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

[HUMBLE] Ubuntu 24.04 - Brightness not computed for non-BayerRG8 pixel formats #216

Closed
GreatAlexander opened this issue Nov 19, 2024 · 4 comments
Assignees
Labels
ROS2 This problem occurs with the ROS2 driver

Comments

@GreatAlexander
Copy link
Contributor

Hi there, first of all thank you for all your hard work on this ROS driver. We really appreciate this!

Is this behavior also observed when using SpinView?
N/A. Brightness computation is an output of the ROS driver.

Describe the bug
Brightness value (as produced in the /meta topic) is not computed for non-BayerRG8 pixel formats (i.e. BayerBG8).

We are using this driver with some cameras (CM3-U3-50S5C) installed upside down, which flips the Bayer format from BayerRG8 to BayerBG8. We noticed that when compute_brightness is enabled, the brightness output is stuck at 0 and the brightness controller does not work as expected. With cameras not upside down, compute brightness with BayerRG8 pixel format works as expected.

We have tested removing the if statement and we can confirm the brightness computation works with BayerBG8 too as expected. We are happy to provide a PR to add BayerBG8 as a pixel format supported and tested for brightness computation if you would prefer.

Useful logging output
None, but we are happy to provide evidence and data to demonstrate this behaviour.

System details

  • Operating system/version: Ubuntu22.04 (Dockerised)
  • ROS version: Humble
  • Complete FLIR camera model: CM3-U3-50S5C

Notes:

  • We are running a system with 6 x CM3-U3-50S5C cameras (via USB3), using the synchronised driver and externally triggered via custom hardware. We want to use the brightness controller, as it provides better direct control over the brightness of the image.
  • We have added a couple of new camera parameters supported by our camera model, specifically the reverse X/Y params (Since some of our cameras are installed upside down). FYI our repo
  • We are happy to support this driver and test/evaluate with our specific camera models any versions/configurations as requested.

Our camera parameter configuration (example):

[rsp_l]: reading ros parameters for camera with serial: 17496130
[rsp_l]: adjusting time stamps!
[rsp_l]: parameter definitions file: /opt/ros_ws/install/av_camera_launch/share/av_camera_launch/config/chameleon.yaml
[sensor.camera]: camera calibration URL: file:///opt/ros_ws/install/av_camera_launch/share/av_camera_launch/config/rsp_l_calib.yaml
[rsp_l]: using spinnaker lib version: 3.1.0.79
[rsp_l]: found camera with serial number: 17496130
[Spinnaker Wrapper]: Initialized camera [serial: 17496130] from: [USB Interface 0]
[rsp_l]: setting ImageFormatControl/PixelFormat to: BayerBG8
[rsp_l]: setting ImageFormatControl/Width to: 2400
[rsp_l]: setting ImageFormatControl/Height to: 1200
[rsp_l]: setting ImageFormatControl/OffsetX to: 24
[rsp_l]: setting ImageFormatControl/OffsetY to: 522
[rsp_l]: setting ImageFormatControl/ReverseX to: 1
[rsp_l]: setting ImageFormatControl/ReverseY to: 1
[rsp_l]: setting ImageFormatControl/VideoMode to: Mode0
[rsp_l]: setting AnalogControl/GainAuto to: Off
[rsp_l]: setting AcquisitionControl/ExposureAuto to: Off
[rsp_l]: setting AcquisitionControl/ExposureTime to: 1000
[rsp_l]: setting AcquisitionControl/TriggerMode to: On
[rsp_l]: setting AcquisitionControl/AcquisitionMode to: SingleFrame
[rsp_l]: setting AcquisitionControl/TriggerSelector to: FrameStart
[rsp_l]: setting AcquisitionControl/TriggerSource to: Line0
[rsp_l]: setting AcquisitionControl/TriggerDelay to: 0
[rsp_l]: setting AcquisitionControl/TriggerOverlap to: ReadOut
[rsp_l]: setting ChunkDataControl/ChunkModeActive to: 1
[rsp_l]: setting ChunkDataControl/ChunkSelector to: ExposureTime
[rsp_l]: setting ChunkDataControl/ChunkEnable to: 1
[rsp_l]: setting ChunkDataControl/ChunkSelector to: Gain
[rsp_l]: setting ChunkDataControl/ChunkEnable to: 1
[rsp_l]: setting ChunkDataControl/ChunkSelector to: Timestamp
[rsp_l]: setting ChunkDataControl/ChunkEnable to: 1
[rsp_l]: camera has pixel format: BayerBG8
@berndpfrommer
Copy link
Collaborator

Thanks for the feedback! Would love to see a PR for the parameters you added to chameleon.yaml

@berndpfrommer
Copy link
Collaborator

Oh, and would you mind testing PR #217 ? I just implemented it, but have very limited time right now for testing.

@GreatAlexander
Copy link
Contributor Author

Thanks @berndpfrommer, the PR solved this for us, so feel free to close this issue. Any ETA for when these changes will be in a humble release?

@berndpfrommer
Copy link
Collaborator

I just submitted PRs to the packaging system. You should see the changes after the next "sync" for humble, which I expect to happen some time early/mid December.

GreatAlexander added a commit to ipab-rad/av_camera that referenced this issue Nov 26, 2024
 - Use ROS2 spinnaker synchronized camera driver instead of default
 - Modify camera config parameter yaml files to fit new structure
 - Add brightness controller parameters as required
 - Update `all_cams.launch.xml` to run all cameras in single node
 - Set exposure min/max on Brighntess Controller to 1ms (constant)
 - NOTE: Temporarily disable Brightness Controller (Use continuous gain) until ros-drivers/flir_camera_driver#216 is released into the wild

---------

Co-authored-by: Hector Cruz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ROS2 This problem occurs with the ROS2 driver
Projects
None yet
Development

No branches or pull requests

2 participants