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

can't capture image at defined frequency. #264

Open
leiwanrobotics opened this issue Feb 3, 2025 · 1 comment
Open

can't capture image at defined frequency. #264

leiwanrobotics opened this issue Feb 3, 2025 · 1 comment

Comments

@leiwanrobotics
Copy link

Issue description

I have a basler camera, a2A1920-51gcBAS

I tried this driver and can reach the defined frequency under free mode(trigger mode = off). But it will heavly increase the usage of bandwidth (easily reach 850 Mbps). I want to decrease the usage of bandwidth as I have multi cameras, so I decide to use trigger mode on. However, the camera can't reach the defined frequency anymore.

When trigger mode = off, I also got error:

Image

Do you have any solution?

BTY, how can I capture image with 20 / 30 Hz starting from interger seconds, like 0s, 1s and so on.

Code example about how to reproduce the issue

ROS2 driver

Error message

[ERROR] [1738586959.635602687] [basler.pylon.ros2.pylon_ros2_camera_base]: An image grabbing exception occurred: Grab timed out. Possible reasons are: The image transport from the camera device is not working properly, e.g., all GigE network packets for streaming are dropped; The camera uses explicit triggering (see TriggerSelector for more information) and has not been triggered; Single frame acquisition mode is used and one frame has already been acquired; The acquisition has not been started or has been stopped.
[ERROR] [1738586959.635730926] [basler.pylon.ros2.pylon_ros2_camera_base]: Error: Grab was not successful

Hardware setup description

  • Ubuntu22.04
  • ROS2 Humble

Runtime information

[WARN] [1738586109.830685923] [basler.pylon.ros2.pylon_ros2_camera_parameter]: Gain and exposure are specified as startup parameters and hence assumed to be fixed! The specified brightness (100) can't be reached! Brightness is going to ignored by only setting gain and exposure.
[INFO] [1738586109.830757795] [basler.pylon.ros2.pylon_ros2_camera_parameter]: Autoflash: 0, line2: 1, line3: 1
[INFO] [1738586109.830790854] [basler.pylon.ros2.pylon_ros2_camera_parameter]: Trying to connect the camera device with the following device user id: 40549247
[INFO] [1738586111.619580333] [basler.pylon.ros2.pylon_ros2_camera]: Found camera device! Device Model: a2A1920-51gcBAS with Device User Id: 40549247
[INFO] [1738586111.946480993] [basler.pylon.ros2.pylon_ros2_camera_node]: Pylon camera instance created with the following user id: 40549247
[INFO] [1738586112.143901373] [basler.pylon.ros2.pylon_ros2_gige_ace2_camera]: Startup user profile set to "UserSet3"
[INFO] [1738586112.210065024] [basler.pylon.ros2.pylon_ros2_gige_ace2_camera]: UserSet3 loaded
[INFO] [1738586112.477361361] [basler.pylon.ros2.pylon_ros2_camera_node]: CameraInfoURL needed for rectification! ROS2-Param: '//camera_info_url' = '' is invalid!
[DEBUG] [1738586112.477408762] [basler.pylon.ros2.pylon_ros2_camera_node]: CameraInfoURL should have following style: 'file:///full/path/to/local/file.yaml' or 'package://<package_name>/relative/path/to/file.yaml'
[WARN] [1738586112.477418594] [basler.pylon.ros2.pylon_ros2_camera_node]: Will only provide distorted /image_raw images!
[WARN] [1738586112.477430013] [basler.pylon.ros2.pylon_ros2_camera_base]: Camera does not support binning (X). Will keep the current settings.
[INFO] [1738586112.477544708] [basler.pylon.ros2.pylon_ros2_camera_node]: Setting horizontal binning_x to 1
[WARN] [1738586112.477557656] [basler.pylon.ros2.pylon_ros2_camera_base]: Camera does not support binning (Y). Will keep the current settings.
[INFO] [1738586112.477635291] [basler.pylon.ros2.pylon_ros2_camera_node]: Setting vertical binning_y to 1
[INFO] [1738586112.486854453] [basler.pylon.ros2.pylon_ros2_camera_node]: Attempted to set exposure to 10000, reached: 10000
[INFO] [1738586112.492703423] [basler.pylon.ros2.pylon_ros2_camera_node]: Attempted to set gain to: 0, reached: 0
[INFO] [1738586112.504546509] [basler.pylon.ros2.pylon_ros2_camera_node]: Attempted to set gamma to 1, reached: 1
[INFO] [1738586112.509418444] [basler.pylon.ros2.pylon_ros2_camera_node]: Startup settings: encoding = 'bayer_rggb8', binning = [1, 1], exposure = 10000, gain = 0, gamma = 1, shutter mode = global
[INFO] [1738586112.512961981] [basler.pylon.ros2.pylon_ros2_camera_node]: Desired framerate 30.00 is higher than max possible. Will limit framerate to: 30.00 Hz
[INFO] [1738586112.514502974] [basler.pylon.ros2.pylon_ros2_camera_node]: Start image grabbing if node connects to topic with a spinning rate of: 29.9994 Hz
[INFO] [1738586112.548128207] [basler.pylon.ros2.pylon_ros2_camera_node]: Camera not calibrated
[ERROR] [1738586959.635602687] [basler.pylon.ros2.pylon_ros2_camera_base]: An image grabbing exception occurred: Grab timed out. Possible reasons are: The image transport from the camera device is not working properly, e.g., all GigE network packets for streaming are dropped; The camera uses explicit triggering (see TriggerSelector for more information) and has not been triggered; Single frame acquisition mode is used and one frame has already been acquired; The acquisition has not been started or has been stopped.
[ERROR] [1738586959.635730926] [basler.pylon.ros2.pylon_ros2_camera_base]: Error: Grab was not successful

Is your camera operational with the Basler pylon Viewer on your platform?

Yes

@FrancoisPicardDTI
Copy link
Collaborator

Hello @leiwanrobotics

I don't manage to reproduce your issue. Did you try to indeed increase the inter-packet delay? Alternatively, can you describe what you want to achieve? How many cameras are we talking about here?

Same here when you're writing:

how can I capture image with 20 / 30 Hz starting from interger seconds, like 0s, 1s and so on.

Can you give here more information please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants