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);
78 RTABMAP_DEPRECATED void updatePosterior(
const std::map<int, float> & posterior,
float fixedMax = 0.0f,
int zValueOffset = 0);
79 void updateNodeColorByValue(
const std::string & valueName,
const std::map<int, float> & values,
float fixedMax = 0.0f,
bool invertedColorScale =
false,
int zValueOffset = 0);
80 void updateLocalPath(
const std::vector<int> & localPath);
81 void setGlobalPath(
const std::vector<std::pair<int, Transform> > & globalPath);
83 void setLocalRadius(
float radius);
84 void highlightNode(
int nodeId,
int highlightIndex);
89 void clearNodeColorByValue();
91 void saveSettings(QSettings & settings,
const QString & group =
"")
const;
92 void loadSettings(QSettings & settings,
const QString & group =
"");
115 bool isGridMapVisible()
const;
116 bool isOriginVisible()
const;
117 bool isReferentialVisible()
const;
118 bool isLocalRadiusVisible()
const;
121 bool isGraphVisible()
const;
122 bool isGlobalPathVisible()
const;
123 bool isLocalPathVisible()
const;
124 bool isGtGraphVisible()
const;
125 bool isGPSGraphVisible()
const;
126 bool isOdomCacheOverlayVisible()
const;
127 bool isOrientationENU()
const;
128 ViewPlane getViewPlane()
const;
129 bool isEnsureFrameVisible()
const;
132 void setWorkingDirectory(
const QString & path);
133 void setNodeVisible(
bool visible);
134 void setNodeRadius(
float radius);
135 void setLinkWidth(
float width);
136 void setNodeColor(
const QColor & color);
137 void setNodeOdomCacheColor(
const QColor & color);
138 void setCurrentGoalColor(
const QColor & color);
139 void setNeighborColor(
const QColor & color);
140 void setGlobalLoopClosureColor(
const QColor & color);
141 void setLocalLoopClosureColor(
const QColor & color);
142 void setUserLoopClosureColor(
const QColor & color);
143 void setVirtualLoopClosureColor(
const QColor & color);
144 void setNeighborMergedColor(
const QColor & color);
145 void setLandmarkColor(
const QColor & color);
146 void setRejectedLoopClosureColor(
const QColor & color);
147 void setLocalPathColor(
const QColor & color);
148 void setGlobalPathColor(
const QColor & color);
149 void setGTColor(
const QColor & color);
150 void setGPSColor(
const QColor & color);
151 void setHighlightColor(
const QColor & color,
int index);
152 void setIntraSessionLoopColor(
const QColor & color);
153 void setInterSessionLoopColor(
const QColor & color);
154 void setIntraInterSessionColorsEnabled(
bool enabled);
155 void setGridMapVisible(
bool visible);
156 void setOriginVisible(
bool visible);
157 void setReferentialVisible(
bool visible);
158 void setLocalRadiusVisible(
bool visible);
159 void setLoopClosureOutlierThr(
float value);
160 void setMaxLinkLength(
float value);
161 void setGraphVisible(
bool visible);
162 void setGlobalPathVisible(
bool visible);
163 void setLocalPathVisible(
bool visible);
164 void setGtGraphVisible(
bool visible);
165 void setGPSGraphVisible(
bool visible);
166 void setOdomCacheOverlayVisible(
bool visible);
167 void setOrientationENU(
bool enabled);
168 void setViewPlane(ViewPlane plane);
169 void setEnsureFrameVisible(
bool visible);
172 void configChanged();
173 void mapShownRequested();
174 void nodeSelected(
int);
175 void linkSelected(
int,
int);
178 void restoreDefaults();
181 virtual void wheelEvent ( QWheelEvent * event );
182 virtual void mouseMoveEvent(QMouseEvent * event);
183 virtual void mousePressEvent(QMouseEvent * event);
184 virtual void contextMenuEvent(QContextMenuEvent * event);