PointCloudLibrary / PointCloudLibrary/pcl
Can NOT close PCLVisualizer
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
Can NOT close PCLVisualizer
As a thread on Stackoverflow said,
" I am writing a program to record and store pointclouds. Part of the programs function to observe the recorded clouds, for this I use the PCL visualizer. The problem is that if I close the visualizers window the window just stops, but won't close. I tried calling the close() method, but nothing. I read that this was a problem before VTK 8.0, but I use 8.1 and the problem is still there. I also use PCL 1.9.1 and Ubuntu 18.04. Anyone has a solution for this? Thanks in advance. "
And I am experiencing the very same problem, could someone give some workarounds?
Code to reproduce the problem:
#include <pcl/visualization/pcl_visualizer.h>
#include <iostream>
int main(void) {
pcl::visualization::PCLVisualizer viewer;
while (!viewer.wasStopped()) {
viewer.spinOnce();
}
viewer.close();
std::cout << "closed!" << std::endl;
while (true) {
}
}
OS: Ubuntu 18.04
gcc:(Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
VTK: 8.2.0
pcl: 1.9.1 or 1.10.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal PCLVisualizer example in the issue and inspect the PCLVisualizer header and its close(), wasStopped(), and spinOnce() behavior. Reproduce it on the stated Ubuntu, GCC, VTK, and PCL versions, then compare the window lifecycle with the reported expectations. Done means closing the visualizer exits the loop and the program reaches the “closed!” output without leaving the window open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100