PCLVisualizer point cloud ID
Hi,
first the code, than the question:
while (!viewer.wasStopped()) {
[...get coordinates...]
if (counter = true) {
viewer.removePointCloud("1");
viewer.addPointCloud(point_cloud, "2");
counter = false;
}else {
viewer.removePointCloud("2");
viewer.addPointCloud(point_cloud, "1");
counter = 1;
}
viewer.spinOnce();
Here the question: If I run this programm, I get "[addPointCloud] A PointCloud with id <2> already exists! Please choose a different id and retry". So my question is, if there is any possibility to free the old point cloud ID and write a new point cloud to the previous, now free, ID?
Thanks for the help.