title: Real time point cloud processing and latency
body: <p><strong>Our project is to integrate Lidar system into virtual reality (unity).</strong>
  I could achieve that integration with ROS-bridge.
  Next step is to process the point cloud data before we send it to unity system. </p>
  
  <ul>
  <li>Lidar sensor velodyne VLP-16</li>
  <li>Ubuntu 18.4</li>
  <li>IDE: Pycharm (python)</li>
  <li>Point cloud processing: python point cloud library with ROS</li>
  <li>ros-bridge with unity system</li>
  </ul>
  
  <p><strong>Problem</strong>
  Without processing, there is only 1 second latency from sensor to unity visualization. But processing point-cloud data in ROS(pycharm) causes significant latency (around 5 seconds). </p>
  
  <ul>
  <li>I am using velodyne drives to convert raw data into pointcloud2 format. In the code for the processing, I subscribe this pointcloud2 message and convert it into PointXYZRGB format to apply pcl libraries. </li>
  <li>I first tested this sequence of data-type conversion without applying PCL. </li>
  </ul>
  
  <p><strong>raw data -> publish pointcloud2 message ->subscribe pointcloud2- > pointXYZRGB -> (processing) -> 
    pointcloud2 message -> publish it.</strong></p>
  
  <ul>
  <li>Without processing, I get over 5 seconds latency. </li>
  </ul>
  
  <p>I understand that it would be better to receive raw data from sensor without converting into pointcloud2 messages.
  But it is very challenging for me to do it in python. 
  I found one grabber example in c++. 
  <a href="https://medium.com/@yohei.kajiwara/vlp16-c-quick-example-35b9ceea2059" rel="nofollow noreferrer">https://medium.com/@yohei.kajiwara/vlp16-c-quick-example-35b9ceea2059</a>  </p>
  
  <p>But I am not sure what is the most reliable way. 
  Please give me an advice on this issue.</p>
  
  <p>Best regards</p>
  
  <p>Seongsu Byeon</p>