28 #ifndef RTABMAP_GRAPHVIEWER_H_
29 #define RTABMAP_GRAPHVIEWER_H_
31 #include "rtabmap/gui/rtabmap_gui_export.h"
33 #include <QGraphicsView>
34 #include <QtCore/QMap>
35 #include <QtCore/QSettings>
38 #include <opencv2/opencv.hpp>
44 class QGraphicsPixmapItem;
45 class QGraphicsItemGroup;
63 void setWorldMapRotation(
const float & theta);
66 void updateGraph(
const std::map<int, Transform> & poses,
67 const std::multimap<int, Link> & constraints,
68 const std::map<int, int> & mapIds,
69 const std::map<int, int> & weights = std::map<int, int>(),
70 const std::set<int> & odomCacheIds = std::set<int>());
71 void updateGTGraph(
const std::map<int, Transform> & poses);
73 const std::map<int, Transform> & gpsMapPoses,
74 const std::map<int, GPS> & gpsValues);
75 void updateReferentialPosition(
const Transform & t);
76 void updateMap(
const cv::Mat & map8U,
float resolution,
float xMin,
float yMin);
77 void updatePosterior(
const std::map<int, float> & posterior,
float fixedMax = 0.0f,
int zValueOffset = 0);
78 void updateLocalPath(
const std::vector<int> & localPath);
79 void setGlobalPath(
const std::vector<std::pair<int, Transform> > & globalPath);
81 void setLocalRadius(
float radius);
84 void clearPosterior();
87 void saveSettings(QSettings & settings,
const QString & group =
"")
const;
88 void loadSettings(QSettings & settings,
const QString & group =
"");
111 bool isGridMapVisible()
const;
112 bool isOriginVisible()
const;
113 bool isReferentialVisible()
const;
114 bool isLocalRadiusVisible()
const;
117 bool isGraphVisible()
const;
118 bool isGlobalPathVisible()
const;
119 bool isLocalPathVisible()
const;
120 bool isGtGraphVisible()
const;
121 bool isGPSGraphVisible()
const;
122 bool isOdomCacheOverlayVisible()
const;
123 bool isOrientationENU()
const;
124 ViewPlane getViewPlane()
const;
125 bool isEnsureFrameVisible()
const;
128 void setWorkingDirectory(
const QString & path);
129 void setNodeVisible(
bool visible);
130 void setNodeRadius(
float radius);
131 void setLinkWidth(
float width);
132 void setNodeColor(
const QColor & color);
133 void setNodeOdomCacheColor(
const QColor & color);
134 void setCurrentGoalColor(
const QColor & color);
135 void setNeighborColor(
const QColor & color);
136 void setGlobalLoopClosureColor(
const QColor & color);
137 void setLocalLoopClosureColor(
const QColor & color);
138 void setUserLoopClosureColor(
const QColor & color);
139 void setVirtualLoopClosureColor(
const QColor & color);
140 void setNeighborMergedColor(
const QColor & color);
141 void setLandmarkColor(
const QColor & color);
142 void setRejectedLoopClosureColor(
const QColor & color);
143 void setLocalPathColor(
const QColor & color);
144 void setGlobalPathColor(
const QColor & color);
145 void setGTColor(
const QColor & color);
146 void setGPSColor(
const QColor & color);
147 void setIntraSessionLoopColor(
const QColor & color);
148 void setInterSessionLoopColor(
const QColor & color);
149 void setIntraInterSessionColorsEnabled(
bool enabled);
150 void setGridMapVisible(
bool visible);
151 void setOriginVisible(
bool visible);
152 void setReferentialVisible(
bool visible);
153 void setLocalRadiusVisible(
bool visible);
154 void setLoopClosureOutlierThr(
float value);
155 void setMaxLinkLength(
float value);
156 void setGraphVisible(
bool visible);
157 void setGlobalPathVisible(
bool visible);
158 void setLocalPathVisible(
bool visible);
159 void setGtGraphVisible(
bool visible);
160 void setGPSGraphVisible(
bool visible);
161 void setOdomCacheOverlayVisible(
bool visible);
162 void setOrientationENU(
bool enabled);
163 void setViewPlane(ViewPlane plane);
164 void setEnsureFrameVisible(
bool visible);
167 void configChanged();
168 void mapShownRequested();
169 void nodeSelected(
int);
170 void linkSelected(
int,
int);
173 void restoreDefaults();
176 virtual void wheelEvent ( QWheelEvent * event );
177 virtual void mouseMoveEvent(QMouseEvent * event);
178 virtual void mouseDoubleClickEvent(QMouseEvent * event);
179 virtual void contextMenuEvent(QContextMenuEvent * event);