astuff / avt_vimba_camera

ROS1/2 Driver for AVT cameras using VIMBA SDK.
Other
21 stars 43 forks source link

Multiple ethernet cameras ROS2 lags #125

Closed pablogago11 closed 10 months ago

pablogago11 commented 1 year ago

Hi all,

We use multiple Alvium G1-319 cameras via ethernet using a unique interface of the host PC and a switch. After reducing the image size of all cameras to reduce the BW < 115Mb/s as GigE requires ( < 125Mb/s, we use the 90%) we obtain delayed streaming if we launch multiple ROS2 nodes (1 per camera). However, the streaming is perfect if we launch them using the VimbaViewer application.

Hence, our question: is it a matter of too much ROS2 communications overloading the GigE or the AVT libraries? Shall we use a single ROS2 node that handles all AVT cameras as VimbaViewer does?

Thank you in advance!

icolwell-as commented 11 months ago

Hi @pablogago11, we have typically used 2 cameras that connect to the PC each with their own network interface. Each camera has it's own instance of the ROS driver running. We haven't noticed much issues with this before, but the vast majority of our experience was with the ROS1 version of the driver.

When you say "delayed streaming", how are you measuring the delay? In other words: Are you sure the driver is delaying the camera data? or maybe the thing you are using to view the data is lagging? You might also want to look into ROS2 DDS tuning. What version of ROS2 are you using?

pablogago11 commented 10 months ago

Hi @icolwell-as , thanks for your response. We successfully got them to stream through a unique ethernet interface, launching a ROS node per camera (ROS1-noetic and ROS2-foxy) and visualizing with RViz. Firstly through a 1Gb setting a binning of 4 in both directions and, then, through a 10Gb without any binning.

The main problem was the list of features, which we had to adapt to our particular model; and the fact that some features are set once and stay persistent on the cameras' memory, but then we could not change through ROS, like the binning and the ROI.

Anyway, thanks for your support and the attached links, we'll take a look at them!