neufieldrobotics / spinnaker_sdk_camera_driver

Point Grey (FLIR) Spinnaker based camera driver (Blackfly S etc.)
MIT License
126 stars 91 forks source link

Failed waiting for EventData on NEW_BUFFER_DATA event [-1011] #44

Open liuxiangdi opened 5 years ago

liuxiangdi commented 5 years ago

Hi, I use two camera (BFS-U3-16S2C-CS), and I connect this two camera to my laptop's two different USB3 port. Then I follow your document rewrite the "test.yaml" ` cam_ids:

ghost commented 5 years ago

Yes, for multicam this package has to be setup as Master-slave, otherwise there is no way to guarantee the sync between cameras.

samanfahandej commented 5 years ago

Asked about this error from FLIR support team, and this is their answer: error: Spinnaker: Failed waiting for EventData on NEW_BUFFER_DATA event [-1011] "This error occurs when trying to retrieve an image from the buffer(RAM) while the buffer is empty."

liuxiangdi commented 5 years ago

Asked about this error from FLIR support team, and this is their answer: error: Spinnaker: Failed waiting for EventData on NEW_BUFFER_DATA event [-1011] "This error occurs when trying to retrieve an image from the buffer(RAM) while the buffer is empty."

thanks a lot

liuxiangdi commented 5 years ago

Yes, for multicam this package has to be setup as Master-slave, otherwise there is no way to guarantee the sync between cameras.

thanks for your reply. I try to use spinview for this two cameras at the same time, but I failed. If I do not use this package, writting code with official SDK, Is using Master-slave mode still the only way for stereo camera?

ghost commented 5 years ago

This code uses a software trigger for the cameras, so technically if you wanted you could modify this driver to do a software trigger on both your cameras. You'd have you dive in a bit to see whatall might to be changed. A couple lines to help might be:

https://github.com/neufieldrobotics/spinnaker_sdk_camera_driver/blob/15803f032859341b2d1740dbce5300726b2ac8b8/src/capture.cpp#L894

and

https://github.com/neufieldrobotics/spinnaker_sdk_camera_driver/blob/15803f032859341b2d1740dbce5300726b2ac8b8/src/capture.cpp#L648

liuxiangdi commented 5 years ago

I tried another package https://github.com/ros-drivers/flir_camera_driver and got two videostream at same time (with out adapter). Thanks again for giving me suggestion and that help a lot :)

alankwok97 commented 5 years ago

@liuxiangdi I am new to ROS language. How did you install the flir_camera_driver because I can't seem to find the instructions in the README file.

Many thanks.

atyshka commented 5 years ago

@shahvi I know you do not have a GigE camera to test with, but could we at least add a try-catch for this? Spinview gracefully catches incomplete frames and ignores them and we should expect the same behavior here.

ghost commented 5 years ago

@atyshka could you please submit a PR.

atyshka commented 5 years ago

So... Tried adding a try-catch to this but there's another problem: after this error occurs, video cuts out for about a second. This isn't a good fix then and we'll have to get to the root of the problem. Spinview does not have this issue.

harsco-jfernandez commented 4 years ago

This worked for me.

if ( cam_img->GetImageStatus() == IMAGE_NO_ERROR )

orange2xiaoyu commented 3 years ago

Hi, I use one camera (BFS-PGE-31S4C-C), the same error occurred.

System Description Camera Name and Model: BFS-PGE-31S4C-C Operating System: Ubuntu 18.04 Spinnaker Version: 2.2.0.48 ROS Version: Melodic

Computer details Nvidia Jetson Xavier Development Kit Processor: ARM 64 bit (v8.2) RAM: 32 GB

Do the cameras work with SpinView? Yes

Describe the bug when I run roslaunch spinnaker_sdk_camera_driver acquisition.launch binning:=2 using root shell, log file as follows:

`... logging to /root/.ros/log/bd1bdf3c-da39-11eb-a182-48b02d3c8d77/roslaunch-nvidia-desktop-4901.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://nvidia-desktop:44361/

SUMMARY

PARAMETERS

NODES / acquisition_node (nodelet/nodelet) vision_nodelet_manager (nodelet/nodelet)

auto-starting new master process[master]: started with pid [4911] ROS_MASTER_URI=http://nvidia-desktop:11311

setting /run_id to bd1bdf3c-da39-11eb-a182-48b02d3c8d77 process[rosout-1]: started with pid [4922] started core service [/rosout] process[vision_nodelet_manager-2]: started with pid [4929] process[acquisition_node-3]: started with pid [4930] [ INFO] [1625122711.067981120]: Initializing nodelet with 4 worker threads. [ INFO] [1625122711.134906496]: Initializing nodelet [ INFO] [1625122711.137024864]: [ OK ] USB memory: 1000 MB [ INFO] [1625122711.137232608]: PARAMETER SETTINGS [ INFO] [1625122711.137304576]: ** Date = 20210701 [ INFO] [1625122711.139081312]: Save path set via parameter to: /root [ INFO] [1625122711.139236576]: Camera IDs:

[ INFO] [1625122711.142943424]: Camera Aliases: [ INFO] [1625122711.143155616]: 17165439 >> cam0 [ INFO] [1625122711.144454272]: External trigger: false [ INFO] [1625122711.146219328]: Unique time stamps for each camera: false [ INFO] [1625122711.147259840]: color set to: false [ INFO] [1625122711.148341536]: 17165439 flip_horizontal 0 [ INFO] [1625122711.149190528]: 17165439 flip_vertical 0 [ INFO] [1625122711.150210592]: Exporting images to ROS: true [ INFO] [1625122711.151243040]: Showing live images setting: false [ INFO] [1625122711.152605536]: Showing grid-style live images setting: false [ INFO] [1625122711.153399808]: Max Rate Save Mode: false [ INFO] [1625122711.154134208]: Displaying timing details: false [ INFO] [1625122711.155326688]: No. of images to skip set to: 20 [ INFO] [1625122711.156234208]: Init sleep delays set to : 1.00 sec [ INFO] [1625122711.157176960]: 'exposure_time'=0, Setting autoexposure [ INFO] [1625122711.157940960]: 'gain' Parameter was zero or negative, using Auto gain based on target grey value [ INFO] [1625122711.158781568]: 'target_grey_value'=0, Setting AutoExposureTargetGreyValueAuto to Continuous/ auto [ INFO] [1625122711.159862304]: Binning set to: 2 [ INFO] [1625122711.160730176]: Using Software rate control, rate set to: 30 [ INFO] [1625122711.161528896]: Saving images set to: 0 [ INFO] [1625122711.163566048]: tf_prefix set to: [ INFO] [1625122711.166620064]: Region of Interest set to width: 0 height: 0 offset_x: 0 offset_y: 0 [ INFO] [1625122711.167569792]: Camera Intrinsic Paramters: [ INFO] [1625122711.168330240]: 1886.923214 0.000000 604.721488 0.000000 1886.666877 493.477267 0.000000 0.000000 1.000000 [ INFO] [1625122711.169203616]: Camera Distortion Paramters: [ INFO] [1625122711.169353536]: -0.021142 -0.373387 2.385983 3.282457 [ INFO] [1625122711.170154304]: Camera Rectification Paramters: [ INFO] [1625122711.170344544]: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 [ INFO] [1625122711.171308320]: Camera Projection Paramters: [ INFO] [1625122711.171520352]: 913.700317 0.000000 953.448302 0.000000 0.000000 1063.296631 777.871993 0.000000 0.000000 0.000000 1.000000 0.000000 [ INFO] [1625122711.171616448]: Camera coeffs provided, camera info messges will be published. [ INFO] [1625122711.171781216]: SYSTEM INFORMATION [ INFO] [1625122711.171833536]: Creating system instance... [ INFO] [1625122711.171880032]: spinnaker_sdk_camera_driver package version: 1.1.1 [ INFO] [1625122712.298124000]: Spinnaker library version: 2.2.0.48 [ INFO] [1625122712.298404000]: Retreiving list of cameras... [ INFO] [1625122712.306488192]: Numer of cameras found: 1 [ INFO] [1625122712.306723328]: Cameras connected: 1 [ INFO] [1625122712.308719712]: -17165439 Blackfly S BFS-PGE-31S4C 1703.0.19.0 [ INFO] [1625122712.335369152]: Dynamic Reconfigure: Level : 4294967295 [ INFO] [1625122712.338294432]: FLUSH SEQUENCE [ INFO] [1625122712.338661344]: Initializing cameras... [ INFO] [1625122713.756703552]: Deinitializing cameras... [ INFO] [1625122713.967691296]: All cameras deinitialized. [ INFO] [1625122715.968141024]: Initializing cameras... [ INFO] [1625122717.278410432]: onInit Initialized [ INFO] [1625122717.278672640]: ACQUISITION [ WARN] [1625122717.352401024]: Looks like your calibration is not done at full Sensor Resolution for cam_id = 17165439 , Sensor_Width = 2048 given cameraInfo params:width = 1440 [ WARN] [1625122717.352571776]: Looks like your calibration is not done at full Sensor Resolution for cam_id = 17165439 , Sensor_Height= 1536 given cameraInfo params:height = 1080 [ WARN] [1625122718.708555136]: Image incomplete with image status 3! [ WARN] [1625122718.742197856]: Image incomplete with image status 3! [ WARN] [1625122718.782643776]: Frames are being skipped! [ WARN] [1625122725.305636864]: Image incomplete with image status 3! [ WARN] [1625122725.352558720]: Frames are being skipped! [ WARN] [1625122729.982655232]: Image incomplete with image status 3! [ WARN] [1625122730.016548160]: Frames are being skipped! [ WARN] [1625122731.239272608]: Image incomplete with image status 3! [ WARN] [1625122731.281747616]: Frames are being skipped! [ WARN] [1625122733.739670720]: Image incomplete with image status 3! [ WARN] [1625122733.781980384]: Frames are being skipped! [ WARN] [1625122735.541918240]: Image incomplete with image status 3! [ WARN] [1625122735.573182560]: Image incomplete with image status 3! [ WARN] [1625122735.615300672]: Frames are being skipped! [ WARN] [1625122736.570218208]: Image incomplete with image status 3! [ WARN] [1625122736.615274848]: Frames are being skipped! [ WARN] [1625122738.442516416]: Image incomplete with image status 3! [ WARN] [1625122738.484362464]: Frames are being skipped! [FATAL] [1625122750.521860640]: Spinnaker: Failed waiting for EventData on NEW_BUFFER_DATA event. [-1011] Likely reason is that slaves are not triggered. Check GPIO cables

[vision_nodelet_manager-2] process has died [pid 4929, exit code -11, cmd /opt/ros/melodic/lib/nodelet/nodelet manager name:=vision_nodelet_manager log:=/root/.ros/log/bd1bdf3c-da39-11eb-a182-48b02d3c8d77/vision_nodelet_manager-2.log]. log file: /root/.ros/log/bd1bdf3c-da39-11eb-a182-48b02d3c8d77/vision_nodelet_manager-2.log [acquisition_node-3] process has finished cleanly log file: /root/.ros/log/bd1bdf3c-da39-11eb-a182-48b02d3c8d77/acquisition_node-3.log

`

supertoto29 commented 3 years ago

@atyshka We had the same issue with a setup for 2 cameras. Both cameras were initialized but after a second, the node would crash.

We have made the following modifications in this pull request : https://github.com/sonia-auv/provider_vision/pull/22 This fixed the issue.

Note : we are running an older version (April 2020) of this driver.

diwamanic commented 2 years ago

Yes, for multicam this package has to be setup as Master-slave, otherwise there is no way to guarantee the sync between cameras.

@shahvi: Yes, I am also using two cameras, one RGB and IR. But, I am using this package only for RGB. I am running IR from an another package. Yet, I am getting the same error as this post. Any suggestions?

ana-lan commented 1 year ago

Asked about this error from FLIR support team, and this is their answer: error: Spinnaker: Failed waiting for EventData on NEW_BUFFER_DATA event [-1011] "This error occurs when trying to retrieve an image from the buffer(RAM) while the buffer is empty."

How to solve this issue? I am new to Ros and couldn't find a solution for this anywhere.

Harsh188 commented 1 month ago

Yes, for multicam this package has to be setup as Master-slave, otherwise there is no way to guarantee the sync between cameras.

@shahvi: Yes, I am also using two cameras, one RGB and IR. But, I am using this package only for RGB. I am running IR from an another package. Yet, I am getting the same error as this post. Any suggestions?

Hi,

I've used a hardware trigger by connecting the sync wires between my IR and RGB camera. I'm trying to retrieve images from both cameras using a modified version of the Trigger.py example. However, my code runs into an error when trying to GetNextImage().

When this error is produced, is it usually associated with buffer overflow or could it be something else?