28 #ifndef RTABMAP_GRAPHVIEWER_H_ 29 #define RTABMAP_GRAPHVIEWER_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.0
f,
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;
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);
164 void setEnsureFrameVisible(
bool visible);
167 void configChanged();
168 void mapShownRequested();
171 void restoreDefaults();
174 virtual void wheelEvent ( QWheelEvent * event );
175 virtual void contextMenuEvent(QContextMenuEvent * event);
QGraphicsItem * _gpsGraphRoot
QColor _loopClosureLocalColor
const QColor & getLocalPathColor() const
QColor _loopClosureVirtualColor
QGraphicsItem * _localPathRoot
QColor _neighborMergedColor
const QColor & getIntraSessionLoopColor() const
QGraphicsEllipseItem * _localRadius
QGraphicsItemGroup * _referential
const QColor & getLocalLoopClosureColor() const
const QColor & getCurrentGoalColor() const
bool _intraInterSessionColors
float getMaxLinkLength() const
QGraphicsPixmapItem * _gridMap
QMultiMap< int, LinkItem * > _gpsLinkItems
QGraphicsItem * _graphRoot
const QColor & getGlobalPathColor() const
const QColor & getGPSColor() const
QGraphicsItemGroup * _referentialXY
const QColor & getInterSessionLoopColor() const
float getNodeRadius() const
QColor _loopInterSessionColor
const QColor & getRejectedLoopClosureColor() const
QColor _loopClosureRejectedColor
QColor _loopIntraSessionColor
const QColor & getNodeOdomCacheColor() const
QMultiMap< int, LinkItem * > _globalPathLinkItems
float getLinkWidth() const
QGraphicsItemGroup * _originReferential
const QColor & getUserLoopClosureColor() const
const QColor & getNeighborMergedColor() const
const QColor & getNodeColor() const
QMultiMap< int, LinkItem * > _gtLinkItems
QGraphicsItem * _gtGraphRoot
QColor _nodeOdomCacheColor
const QString & getWorkingDirectory() const
QGraphicsItemGroup * _originReferentialXZ
float _loopClosureOutlierThr
const QColor & getNeighborColor() const
float getWorldMapRotation() const
QMultiMap< int, LinkItem * > _localPathLinkItems
QGraphicsItem * _globalPathRoot
QMap< int, NodeItem * > _gpsNodeItems
QColor _loopClosureUserColor
const QColor & getGlobalLoopClosureColor() const
QString _workingDirectory
QMultiMap< int, LinkItem * > _linkItems
QGraphicsItemGroup * _referentialXZ
bool isIntraInterSessionColorsEnabled() const
QMap< int, NodeItem * > _nodeItems
QMap< int, NodeItem * > _gtNodeItems
const QColor & getVirtualLoopClosureColor() const
QGraphicsItemGroup * _originReferentialYZ
QGraphicsRectItem * _odomCacheOverlay
QGraphicsItemGroup * _originReferentialXY
float getLoopClosureOutlierThr() const
QGraphicsItemGroup * _referentialYZ
const QColor & getGTColor() const