spinnaker_sdk_camera_driver: Startup camera sync via initializing/deinitializing cycle does not work with GigE camera

I use the spinnaker_sdk_camera_driver and I experience an issue of which I don’t know what the core of the issue might be.

Your ROS driver detects the camera and the flushing also seems to work (see log of roslaunch below) However, the camera seems to not start with frame ID 0.

The camera is a new Blackfly S with standard factory firmware. It is connected via GigE with Power-over-Ethernet network cable. The camera also works fine in spinview.

The test was done in VirtualBox on a fully updated Lubuntu 16.04.

What can I do, to have the camera start with a certain frame number? Console output is as follows:

[ INFO] [1539259721.897108867]: [ OK ] USB memory: 1000 MB
20181011[ INFO] [1539259721.897183646]: *** PARAMETER SETTINGS ***
[ INFO] [1539259721.897203254]: ** Date = 20181011
[ INFO] [1539259721.897739443]:   Save path set via parameter to: /home/pw
[ INFO] [1539259721.897782787]:   Camera IDs:
[ INFO] [1539259721.898293787]:     <serial no>
[ INFO] [1539259721.898791570]:   Camera Aliases:
[ INFO] [1539259721.898814759]:     <serial no> >> cam0
[ INFO] [1539259721.899740583]:   Unique time stamps for each camera: 0
[ INFO] [1539259721.900238189]:   color set to: 0
[ INFO] [1539259721.900932690]:   Exporting images to ROS: 1
[ INFO] [1539259721.901459004]:   Showing live images setting: 0
[ INFO] [1539259721.901925390]:   Showing grid-style live images setting: 0
[ INFO] [1539259721.902395142]:   Max Rate Save Mode: 0
[ INFO] [1539259721.902891314]:   Displaying timing details: 0
[ INFO] [1539259721.904583561]:   No. of images to skip set to: 20
[ INFO] [1539259721.906793675]:   Init sleep delays set to : 20 sec
[ WARN] [1539259721.907340806]:   'fps' Parameter not set, using default behavior: fps=20.00
[ INFO] [1539259721.907794313]:   'exp'=0, Setting autoexposure
[ INFO] [1539259721.908270332]:   Binning set to: 2
[ INFO] [1539259721.908731872]:   Using Software rate control, rate set to: 20
[ INFO] [1539259721.909187848]:   Saving images set to: 0
[ INFO] [1539259721.910053749]:   Camera coeffs not provided correctly, camera info messges will not be published.
[ INFO] [1539259721.910122159]: Creating system instance...
[ INFO] [1539259721.910468338]: Retreiving list of cameras...
[ INFO] [1539259723.542994586]: Numer of cameras found: 1
[ INFO] [1539259723.543034197]:  Cameras connected: 1
[ INFO] [1539259723.543082408]:   -<serial no>
[ INFO] [1539259723.545509510]: *** FLUSH SEQUENCE ***
[ INFO] [1539259723.545538521]: Initializing cameras...
[ INFO] [1539259724.172084859]: Deinitializing cameras...
[ INFO] [1539259725.952781566]: All cameras deinitialized.
[ INFO] [1539259725.952871993]: Initializing cameras...
[ INFO] [1539259726.425770815]: *** ACQUISITION ***
[FATAL] [1539259726.495451653]: ASSERTION FAILED
    file = /home/pw/ros/ws/spinnaker_ws/src/spinnaker_camera_driver/src/camera.cpp
    line = 59
    cond = frameID_ == 0
    message = [FATAL] [1539259726.495545610]: First frame ID was not zero! Might cause sync issues later...
[FATAL] [1539259726.495617142]: 

You suggested in private conversation:

We dont have any GigE versions at our lab, so haven’t tested with them. The assertion for the frame number is because when using multiple camera we want to make sure they are synced. If you are only using a single camera, you should be able to safely comment out the assertion at: Link to source

Your suggestion above is not possible for us, as we want to use a stereo camera pair and want to have synced cameras.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 34 (4 by maintainers)

Most upvoted comments

In the meantime we found the following regarding the errors with:

Image incomplete with image status 9!

The two cameras are flooding the IP connection with packets. To have more than one camera coexist in peace one has to divide the GigE bandwith between the cameras. This is done via the PacketDelay parameter which may also be called GevSCPD (Gigevision Stream Channel Packet Delay) or the corresponding parameter DeviceLinkThroughputLimit (which is easier to understand and set a meaningful value). You can set the DeviceLinkThroughputLimit to 61644209 (equals PacketDelay of 73760 for FLIR camera tick frequency) and this equals half of GigE bandwidth. Or you may use 40841495 (PacketDelay 147880) which is a third of GigE bandwidth to have some space. Please note that limiting device bandwidth of course reduces the frame rate such that the necessary data transfer does not exceed the limit.

Hi @shahvi looks like the Event Data Spinnaker error was solved by increasing UDP buffer size to 25MB by ‘sudo sysctl -w net.core.rmem_max=26214400’ and ‘sudo sysctl -w net.core.rmem_default=26214400’. I found this on a different forum. Sorry about the back and forth. I figured since the camera worked fine with Spinview that it would work fine with the ROS node.