pcl::visualization::PCLVisualizer interactivity

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

pcl::visualization::PCLVisualizer interactivity

Zoid
Hello,

I need to visualize two clouds and I am using the following function:

void showCloudsRightRGB(const pcl::PointCloud<pcl::PointXYZRGB>::Ptr
cloud_target, const pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_origin)
{
  p->removePointCloud ("origin");
  p->removePointCloud ("target");

  pcl::visualization::PointCloudColorHandlerRGBField<pcl::PointXYZRGB> tgt_h
(cloud_target);
  pcl::visualization::PointCloudColorHandlerRGBField<pcl::PointXYZRGB> org_h
(cloud_origin);
  p->addPointCloud<pcl::PointXYZRGB> (cloud_target, tgt_h, "target");
 
p->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE,
1, "target");
  p->addPointCloud<pcl::PointXYZRGB> (cloud_origin, org_h, "origin");
 
p->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE,
1, "origin");

  p->spinOnce(100);
}

However, if I call the function only once (not inside an update loop), I
have no means of interaction with the presented point cloud in the viewer
(cannot rotate, translate, or zoom in/out). Is there a way to  rotate,
translate, or zoom in/out of the presented point cloud even if I call this
function  in irregular intervals?

Thank you in advance!



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