Image streaming delays from vision sensor images acquisition

Typically: "How do I... ", "How can I... " questions
Post Reply
mateo
Posts: 19
Joined: 20 Feb 2013, 16:37

Image streaming delays from vision sensor images acquisition

Post by mateo »

hi, I'm acquiring a video streams from a group of vision sensors (cameras) in V-Rep.
I use to read the frames through some ROS topics and, afterwards, elaborate the images using the OpenCV library.
After some image processing i want to perform some position control on the sensors.
when I was using only 2/3 sensors their movements were correct and fluent.

Now I'm trying to use more sensors (actually 8) and the images are acquired in a discontinuous way: there are some delays in the communication that happen randomically , last randomically and not always for the same sensors.

In fact if i try to display the video streams through a ROS node i see them sometime stopping at a certain frame and starting again after some seconds (visualizing different images because the camera moved in the meantime).


Is there some solution to that.?..i can accept that the acquisition could be not performed in real time but I need it continuous!

Thanks!

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Image streaming delays from vision sensor images acquisi

Post by coppelia »

Hello Mateo,

I suspect that the problem is directly linked to ROS. When setting up a publisher of a vision sensor for instance, using the API function simExtROS_enablePublisher, make sure your queue size is large enough. The same for your subscriber that also needs a queue large enough. Otherwise one image could simply overwrite an older one (which maybe didn't have time to be read).

ROS publishers in V-REP are activated (i.e. data is sent to their topic) at each simulation pass, and there shouldn't be any missing data (unless for some reason or another data data cannot be acquired because a handle is invalid or similar (but in that case the publisher is usually automatically unregistered and will stop publishing in future too))

Cheers

Post Reply