PCLvisualizer time lag

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PCLvisualizer time lag

asif1253
This post has NOT been accepted by the mailing list yet.
Hello everyone,

I am new to PCL so please pardon me if this is a dumb question.

I have trying to visualize the Point Cloud from a Xtion Pro Live and I am having some trouble with "pcl::visualization::PCLVisualizer" class. The problem is that there is a noticeable time lag (around 1-2sec) between the actual activity and the one displayed on the screen. Here is whats happening in the while loop:

pcl::visualization::PCLVisualizer viewer("PCL viewer");    
viewer.setCameraPosition(0,0,-2,0,-1,0,0);

while (!viewer2.wasStopped())
{
viewer.removeAllPointClouds();
viewer.removeAllShapes();
pcl::visualization::PointCloudColorHandlerRGBField<PointT> rgb(fgcloud);
viewer2.addPointCloud<PointT> (fgcloud, rgb, "input_cloud");

viewer2.spinOnce();
}

Am I doing something wrong here which might be causing the time-lag or is it something to do with my PC? Moreover, I am also manually computing the frame-rate in the while loop and its giving me a max of 6.8Hz, without any other processing on the cloud (just the visualization). Is there any way of speeding that up?

P.S. I have tried using pcl::visualization::CloudViewer class as well for visualizing but that never works for me :/


Thanks in Advance!

Reply | Threaded
Open this post in threaded view
|

Re: PCLvisualizer time lag

kwaegel
Administrator
Are you building with optimizations turned on? Debug builds tend to run quite slowly.

Beyond that, 1-2 seconds of latency seems unusually high. I've had my own issues with PCLVisualizer latency (causing me to switch to raw OpenGL), but that was only on the order of ~100ms.
Reply | Threaded
Open this post in threaded view
|

Re: PCLvisualizer time lag

asif1253
Hi,

Thanks for replying. I am using the people detection app (http://pointclouds.org/documentation/tutorials/ground_based_rgbd_people_detection.php) and trying to visualize the results, as implemented in this code. The processing increases the time-lag in visualization quite a bit and the frame-rate drops to 2.5Hz. But even if I remove all the processing and just try to visualize the grabbed point cloud, lag is still around half a second and the frame-rateĀ  is mere 8-9Hz.

I am a bit new to the area so I dont really know how raw OpenGL works and how to switch out of debug mode. Can you elaborate on that please. May be you could point out a tutorial I could look into.

Thanks!


On Sun, Jul 6, 2014 at 2:57 AM, kwaegel <[hidden email]> wrote:
Are you building with optimizations turned on? Debug builds tend to run quite
slowly.

Beyond that, 1-2 seconds of latency seems unusually high. I've had my own
issues with PCLVisualizer latency (causing me to switch to raw OpenGL), but
that was only on the order of ~100ms.



--
View this message in context: http://www.pcl-users.org/PCLvisualizer-time-lag-tp4034686p4034687.html
Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users