DBViewer/Matcher tool: Fixed crash when python feature/matcher is used

This commit is contained in:
matlabbe
2024-04-28 17:40:37 -07:00
parent 36304b2cd1
commit 9505a21a7e
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -28,6 +28,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QApplication>
#include "rtabmap/gui/DatabaseViewer.h"
#include "rtabmap/utilite/ULogger.h"
#ifdef RTABMAP_PYTHON
#include <rtabmap/core/PythonInterface.h>
#endif
#include <vtkObject.h>
#include <vtkVersionMacros.h>
@@ -50,6 +53,10 @@ int main(int argc, char * argv[])
QSurfaceFormat::setDefaultFormat(QVTKRenderWidget::defaultFormat());
#endif
#ifdef RTABMAP_PYTHON
rtabmap::PythonInterface pythonInterface;
#endif
QApplication * app = new QApplication(argc, argv);
rtabmap::DatabaseViewer * mainWindow = new rtabmap::DatabaseViewer();
+7
View File
@@ -42,6 +42,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <rtabmap/utilite/UFile.h>
#include <rtabmap/utilite/UStl.h>
#include <rtabmap/utilite/UTimer.h>
#ifdef RTABMAP_PYTHON
#include <rtabmap/core/PythonInterface.h>
#endif
#include <fstream>
#include <string>
#include <QApplication>
@@ -169,6 +172,10 @@ int main(int argc, char * argv[])
printf(" --from_depth = \"%s\"\n", fromDepthPath.c_str());
printf(" --to_depth = \"%s\"\n", toDepthPath.c_str());
#ifdef RTABMAP_PYTHON
rtabmap::PythonInterface pythonInterface;
#endif
ParametersMap parameters = Parameters::parseArguments(argc, argv);
parameters.insert(ParametersPair(Parameters::kRegRepeatOnce(), "false"));