mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
New classes: Link and GraphViewer (TORO graph visualization and laser scans occupancy grid)
New parameter: RGBD/ToroIterations=100 Rtabmap: added getGraph() method to get TORO poses/link constraints Fixed ICP correspondences ratio over 1 CloudViewer: added frustum culling and camera view up z lock in render(), moving camera using arrow keys, Menu options: Camera far plane clipping, background color DatabaseViewer: added 3D Map view and Graph view MainWindow: Moved main widget (loop closure image status) to a dock widget, added Graph view. git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1075 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -11,12 +11,16 @@
|
||||
#include "rtabmap/gui/RtabmapGuiExp.h" // DLL export/import defines
|
||||
|
||||
#include <QVTKWidget.h>
|
||||
#include <pcl/pcl_base.h>
|
||||
#include <pcl/point_types.h>
|
||||
#include <pcl/point_cloud.h>
|
||||
#include <pcl/PolygonMesh.h>
|
||||
#include "rtabmap/core/Transform.h"
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/qnamespace.h>
|
||||
|
||||
#include <pcl/visualization/mouse_event.h>
|
||||
#include <pcl/PCLPointCloud2.h>
|
||||
|
||||
namespace pcl {
|
||||
@@ -110,12 +114,17 @@ public slots:
|
||||
void setCloudPointSize(const std::string & id, int size);
|
||||
|
||||
protected:
|
||||
virtual void keyReleaseEvent(QKeyEvent * event);
|
||||
virtual void keyPressEvent(QKeyEvent * event);
|
||||
virtual void contextMenuEvent(QContextMenuEvent * event);
|
||||
virtual void handleAction(QAction * event);
|
||||
QMenu * menu() {return _menu;}
|
||||
|
||||
private:
|
||||
void createMenu();
|
||||
bool frustumCulling(const pcl::PointXYZ & cloud);
|
||||
pcl::IndicesPtr frustumCulling(const pcl::PointCloud<pcl::PointXYZ>::Ptr & cloud);
|
||||
void mouseEventOccurred (const pcl::visualization::MouseEvent &event, void* viewer_void);
|
||||
|
||||
private:
|
||||
pcl::visualization::PCLVisualizer * _visualizer;
|
||||
@@ -127,12 +136,16 @@ private:
|
||||
QAction * _aSetTrajectorySize;
|
||||
QAction * _aClearTrajectory;
|
||||
QAction * _aShowGrid;
|
||||
QAction * _aSetBackgroundColor;
|
||||
QAction * _setFarPlaneDistance;
|
||||
QMenu * _menu;
|
||||
pcl::PointCloud<pcl::PointXYZ>::Ptr _trajectory;
|
||||
unsigned int _maxTrajectorySize;
|
||||
QMap<std::string, Transform> _addedClouds; // include meshes
|
||||
Transform _lastPose;
|
||||
std::list<std::string> _gridLines;
|
||||
float _farPlaneDistance;
|
||||
QSet<Qt::Key> _keysPressed;
|
||||
};
|
||||
|
||||
} /* namespace rtabmap */
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
#include <opencv2/features2d/features2d.hpp>
|
||||
#include <set>
|
||||
|
||||
#include <rtabmap/core/Link.h>
|
||||
|
||||
class Ui_DatabaseViewer;
|
||||
class QGraphicsScene;
|
||||
class QGraphicsView;
|
||||
@@ -55,12 +57,18 @@ private slots:
|
||||
void openDatabase();
|
||||
void generateGraph();
|
||||
void exportDatabase();
|
||||
void extractImages();
|
||||
void generateLocalGraph();
|
||||
void view3DMap();
|
||||
void generate3DMap();
|
||||
void sliderAValueChanged(int);
|
||||
void sliderBValueChanged(int);
|
||||
void sliderAMoved(int);
|
||||
void sliderBMoved(int);
|
||||
void sliderNeighborValueChanged(int);
|
||||
void sliderLoopValueChanged(int);
|
||||
void sliderIterationsValueChanged(int);
|
||||
void updateGraphView();
|
||||
|
||||
private:
|
||||
void updateIds();
|
||||
@@ -71,12 +79,20 @@ private:
|
||||
QLabel * labelChildren,
|
||||
rtabmap::ImageView * view,
|
||||
QLabel * labelId);
|
||||
void updateConstraintView(const rtabmap::Link & link);
|
||||
|
||||
private:
|
||||
Ui_DatabaseViewer * ui_;
|
||||
QList<int> ids_;
|
||||
QMap<int, int> idToIndex_;
|
||||
QList<rtabmap::Link> neighborLinks_;
|
||||
QList<rtabmap::Link> loopLinks_;
|
||||
rtabmap::Memory * memory_;
|
||||
QString pathDatabase_;
|
||||
std::list<std::map<int, rtabmap::Transform> > graphes_;
|
||||
std::map<int, rtabmap::Transform> poses_;
|
||||
std::multimap<int, rtabmap::Link> links_;
|
||||
std::map<int, std::vector<unsigned char> > scans_;
|
||||
};
|
||||
|
||||
#endif /* DATABASEVIEWER_H_ */
|
||||
|
||||
@@ -116,11 +116,13 @@ private slots:
|
||||
void dumpTheMemory();
|
||||
void dumpThePrediction();
|
||||
void downloadAllClouds();
|
||||
void downloadPoseGraph();
|
||||
void clearTheCache();
|
||||
void saveFigures();
|
||||
void loadFigures();
|
||||
void openPreferences();
|
||||
void selectScreenCaptureFormat(bool checked);
|
||||
void takeScreenshot();
|
||||
void updateElapsedTime();
|
||||
void processOdometry(const rtabmap::Image & data);
|
||||
void applyAllPrefSettings();
|
||||
@@ -214,7 +216,7 @@ private:
|
||||
|
||||
QMap<int, std::vector<unsigned char> > _imagesMap;
|
||||
QMap<int, std::vector<unsigned char> > _depthsMap;
|
||||
QMap<int, std::vector<unsigned char> > _depths2DMap;
|
||||
std::map<int, std::vector<unsigned char> > _depths2DMap;
|
||||
QMap<int, float> _depthConstantsMap;
|
||||
QMap<int, Transform> _localTransformsMap;
|
||||
std::map<int, Transform> _currentPosesMap;
|
||||
@@ -234,7 +236,7 @@ private:
|
||||
|
||||
QString _graphSavingFileName;
|
||||
QString _toroSavingFileName;
|
||||
QString _autoScreenCaptureFormat;
|
||||
bool _autoScreenCaptureOdomSync;
|
||||
|
||||
QVector<int> _refIds;
|
||||
QVector<int> _loopClosureIds;
|
||||
|
||||
Reference in New Issue
Block a user