title: ROS image topic framerate is extremely low
body: <p>I'm trying to get VREP vision sensor output processed with opencv via ROS api. I did manage to set up scene and get scripts running, but the problem is that I get somewhat like 4-5 fps even without actual processing (currently I just push images directly to output). </p>
  
  <p>This issue does not seem to depend on image resolution, since both 1024*512 and 128*128 captures result in exactly the same fps. </p>
  
  <p>This also is not a matter of blocking calls, although I'm posting single-theaded code, I do have quite complex multithreaded processing pipeline which performs rather well with actual cameras (~50 fps). </p>
  
  <p>Lua scripts on VREP's side do not seem to be a problem also, since I've  tried to play with video retranslation examples provided by vrep, and they seem to achieve rather satisfying fps. </p>
  
  <p>So it seems like image streaming is a bottleneck. </p>
  
  <p>Here's my sample script:</p>
  
  <pre><code># coding=utf-8
  
  import rclpy
  import rclpy.node as node
  import cv2
  import numpy as np
  import sensor_msgs.msg as msg
  
  import third_party.ros.ros as ros
  
  class TestDisplayNode(node.Node):
      def __init__(self):
          super().__init__('IProc_TestDisplayNode')
          self.__window_name = "img"
          self.sub = self.create_subscription(msg.Image, 'Vision_sensor', self.msg_callback)
  
      def msg_callback(self, m : msg.Image):
          np_img = np.reshape(m.data, (m.height, m.width, 3)).astype(np.uint8)
          self.display(np_img)
  
      def display(self, img : np.ndarray):
          cv2.imshow(self.__window_name, cv2.cvtColor(img, cv2.COLOR_RGB2BGR))
          cv2.waitKey(1)
  
  def main():
      ros_core = Ros2CoreWrapper()
  
      node = TestDisplayNode()
  
      rclpy.spin(node)
  
      node.destroy_node()
      rclpy.shutdown()
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>I also have to mention that I run it with ros bridge, since I need processing done with python3, which is supported by ROS2 only, and VREP seems to work only with ROS1 (although I'm just starting to work with these systems, so I'm not confident in that case). </p>