PointCloudLibrary/pcl

Can NOT close PCLVisualizer

Open

#3,959 建立於 2020年4月22日

在 GitHub 查看
 (10 留言) (1 反應) (0 負責人)C++ (4,506 fork)batch import
help wantedkind: bugmodule: visualizationneeds: feedbackskill: vtk

倉庫指標

Star
 (9,023 star)
PR 合併指標
 (平均合併 8天 7小時) (30 天內合併 3 個 PR)

描述

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

貢獻者指南