28 #ifndef RTABMAP_DATABASEVIEWER_H_ 29 #define RTABMAP_DATABASEVIEWER_H_ 33 #include <QMainWindow> 34 #include <QtCore/QByteArray> 35 #include <QtCore/QMap> 36 #include <QtCore/QSet> 37 #include <QtGui/QImage> 38 #include <opencv2/core/core.hpp> 39 #include <opencv2/features2d/features2d.hpp> 42 #include <pcl/point_cloud.h> 43 #include <pcl/point_types.h> 48 class Ui_DatabaseViewer;
61 class ExportCloudsDialog;
70 DatabaseViewer(
const QString & ini = QString(), QWidget * parent = 0);
74 void showCloseButton(
bool visible =
true);
77 virtual void showEvent(QShowEvent* anEvent);
78 virtual void moveEvent(QMoveEvent* anEvent);
79 virtual void resizeEvent(QResizeEvent* anEvent);
80 virtual void keyPressEvent(QKeyEvent *event);
81 virtual void closeEvent(QCloseEvent* event);
82 virtual bool eventFilter(QObject *obj, QEvent *event);
86 void restoreDefaultSettings();
87 void configModified();
90 void recoverDatabase();
92 void updateStatistics();
93 void selectObstacleColor();
94 void selectGroundColor();
95 void selectEmptyColor();
96 void editDepthImage();
98 void editSaved2DMap();
99 void exportSaved2DMap();
101 void regenerateSavedMap();
102 void viewOptimizedMesh();
103 void exportOptimizedMesh();
104 void updateOptimizedMesh();
105 void exportDatabase();
106 void extractImages();
107 void exportPosesRaw();
108 void exportPosesRGBDSLAMMotionCapture();
109 void exportPosesRGBDSLAM();
110 void exportPosesRGBDSLAMID();
111 void exportPosesKITTI();
112 void exportPosesTORO();
113 void exportPosesG2O();
114 void exportPosesKML();
115 void exportGPS_TXT();
116 void exportGPS_KML();
117 void generateLocalGraph();
118 void regenerateLocalMaps();
119 void regenerateCurrentLocalMaps();
121 void generate3DMap();
122 void detectMoreLoopClosures();
123 void updateAllNeighborCovariances();
124 void updateAllLoopClosureCovariances();
125 void updateAllLandmarkCovariances();
126 void refineAllNeighborLinks();
127 void refineAllLoopClosureLinks();
128 void resetAllChanges();
129 void sliderAValueChanged(
int);
130 void sliderBValueChanged(
int);
131 void sliderAMoved(
int);
132 void sliderBMoved(
int);
134 void sliderNeighborValueChanged(
int);
135 void sliderLoopValueChanged(
int);
136 void sliderIterationsValueChanged(
int);
137 void editConstraint();
139 void updateOctomapView();
140 void updateGraphView();
141 void refineConstraint();
142 void addConstraint();
143 void resetConstraint();
144 void rejectConstraint();
145 void updateConstraintView();
146 void updateLoggerLevel();
148 void notifyParametersChanged(
const QStringList &);
149 void setupMainLayout(
bool vertical);
150 void updateConstraintButtons();
153 QString getIniFilePath()
const;
157 void update(
int value,
159 QLabel * labelParents,
160 QLabel * labelChildren,
168 QLabel * labelOptPose,
169 QLabel * labelVelocity,
172 QLabel * labelGravity,
176 QLabel * labelSensors,
177 bool updateConstraintView);
179 void updateWordsMatching(
const std::vector<int> & inliers = std::vector<int>());
180 void updateConstraintView(
182 bool updateImageSliders =
true,
185 Link findActiveLink(
int from,
int to);
187 std::multimap<int, Link> & links,
190 std::multimap<int, rtabmap::Link> updateLinksWithModifications(
191 const std::multimap<int, rtabmap::Link> & edgeConstraints);
192 void updateLoopClosuresSlider(
int from = 0,
int to = 0);
193 void updateAllCovariances(
const QList<Link> & links);
194 void refineAllLinks(
const QList<Link> & links);
195 void refineConstraint(
int from,
int to,
bool silent);
196 bool addConstraint(
int from,
int to,
bool silent);
218 std::list<std::map<int, rtabmap::Transform> >
graphes_;
224 std::multimap<int, rtabmap::Link>
links_;
228 std::map<int, std::pair<std::pair<cv::Mat, cv::Mat>, cv::Mat> >
localMaps_;
bool isSavedMaximized() const
std::vector< double > odomMaxInf_
std::map< int, std::pair< float, cv::Point3f > > generatedLocalMapsInfo_
std::map< int, rtabmap::Transform > gpsPoses_
bool RTABMAP_EXP exportGPS(const std::string &filePath, const std::map< int, GPS > &gpsValues, unsigned int rgba=0xFFFFFFFF)
std::list< std::map< int, rtabmap::Transform > > graphes_
CloudViewer * constraintsViewer_
std::multimap< int, rtabmap::Link > linksAdded_
QList< rtabmap::Link > neighborLinks_
std::multimap< int, rtabmap::Link > links_
ExportCloudsDialog * exportDialog_
QMap< int, int > idToIndex_
std::map< int, LaserScan > modifiedLaserScans_
QDialog * editDepthDialog_
std::string databaseFileName_
EditDepthArea * editDepthArea_
std::multimap< int, rtabmap::Link > linksRefined_
std::map< int, int > mapIds_
std::map< int, GPS > gpsValues_
std::multimap< int, rtabmap::Link > graphLinks_
QList< rtabmap::Link > loopLinks_
int lastSliderIndexBrowsed_
std::map< int, std::vector< int > > wmStates_
std::map< int, std::pair< float, cv::Point3f > > localMapsInfo_
std::map< int, int > weights_
std::multimap< int, rtabmap::Link > linksRemoved_
std::map< int, rtabmap::Transform > odomPoses_
std::map< int, rtabmap::Transform > groundTruthPoses_
CloudViewer * stereoViewer_
rtabmap::DBDriver * dbDriver_
std::set< int > lastWmIds_
std::map< int, std::pair< std::pair< cv::Mat, cv::Mat >, cv::Mat > > localMaps_
CloudViewer * cloudViewer_
CloudViewer * occupancyGridViewer_
std::map< int, std::pair< std::pair< cv::Mat, cv::Mat >, cv::Mat > > generatedLocalMaps_
EditMapArea * editMapArea_
static int openDatabase(const char *zFilename, sqlite3 **ppDb, unsigned int flags, const char *zVfs)