image_pipeline icon indicating copy to clipboard operation
image_pipeline copied to clipboard

stereo_image_proc Output-Timing is async

Open TillBeemelmanns opened this issue 5 years ago • 3 comments

I am using stereo image proc to convert the raw output of a stereo camera. Both cameras use a Bayer 8 Bit encoding. As shown in the image, the raw messages arrive approximately at the same time, but the converted color images have a time difference of approx. 10 ms.

stero_image_proc_timing

That is how I run stereo_image_proc: <node name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" ns="sensors/camera/" output="screen"></node>

Has anyone an idea to solve this problem ?

Best Regards

TillBeemelmanns avatar May 09 '19 08:05 TillBeemelmanns

Are you asking why it takes 10ms to convert the images? Can you clarify what you mean by "time difference"? Is this is headers / receipt time of another client of the converted images, etc. There's some CPU time associated with that conversion I imagine

SteveMacenski avatar May 09 '19 13:05 SteveMacenski

With "time difference" I mean the difference between right/image_color msgs and left/image_color msgs. They both should be send at the same time, since the raw msgs arrive at the same time.

TillBeemelmanns avatar May 09 '19 13:05 TillBeemelmanns

Clarifying question: they arrive 10ms apart, but the timestamps are correct, yes? You should always be using the timestamp in the header of the messages for processing data in ros not current time the message is received. You're going to want to look at the output of the processed data in the time-frame in which it captured sections of the world. The delay is annoying, but if you're synchronizing the uses of that disperity image, it shouldn't be a huge problem unless you're trying to do something like VIO, in which-case even the serialization of the data in to ROS is bad and you should be modelling it as a nodelet to plug in directly (or frankly not using ROS). There is no promise that data will be received "fast"* in ROS, the larger the message the more time it may take to come through the pipe into another process.

On the hand-wavy side of things, 10ms seems large, but you also didnt tell me the resolution of that image. If its something an HD or higher image, there may be some delay. Also keep in mind it take some time to do the calculations you're asking the nodelet to accomplish.

  • ei bounded spec for which all messages are promised to be delivered by

SteveMacenski avatar Jul 10 '19 22:07 SteveMacenski

Closing due to lack of response

mikeferguson avatar Jan 19 '24 04:01 mikeferguson