0
$\begingroup$

Rosanswers logo

I have an application where I want to use two Basler cameras simultaneously. When I use a single camera, or set the region of interest to be low for both cameras, there is a small time delay associated with sending the image message from the camera node to a listener node (10 ms). When I use both however, there is a significant time delay in the received images (300 ms). I've created a small test node that listens on the image messages for verifying this:

delay_ms = (rospy.Time.now() - msg.header.stamp).to_nsec() / 1e6

Following previous answers, I've tried increasing the buff_size parameter in the subscribers but that doesn't help. I've also tried to increase the TCP window size in linux but that doesn't help either.

I'm wondering where the bottleneck is exactly. Is it in the TCP/IP stack itself or could it be the serialization of the large images that causes latency? How do I check for these?

Additional Info:

  • I'm using the basler_camera package for reading images from the cameras.
  • The computer has 4 cores and 8 GB of RAM

camera 1:

  • 1280x960 RGB
  • 20 MByte/s bw in rostopic

camera 2:

  • 2048x1088 Mono
  • 330 MByte/s bw in rostopic

Originally posted by samlcharreyron on ROS Answers with karma: 36 on 2017-07-20

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

After looking at it further, I realized the problem is not in the TCP/IP stack but rather due to CPU utilization. I noticed that each camera node used 100% of a CPU core and with listeners attached the CPU utilization was maxed out, probably resulting in queuing on the CPU side rather than in the network. Switching to a faster machine solved the problem for me.


Originally posted by samlcharreyron with karma: 36 on 2017-07-24

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Airuno2L on 2017-07-24:
Feel free to accept this as the answer to close out the question

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.