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> 43 class QGraphicsPixmapItem;
44 class QGraphicsItemGroup;
59 void updateGraph(
const std::map<int, Transform> & poses,
60 const std::multimap<int, Link> & constraints,
61 const std::map<int, int> & mapIds);
62 void updateGTGraph(
const std::map<int, Transform> & poses);
64 const std::map<int, Transform> & gpsMapPoses,
65 const std::map<int, GPS> & gpsValues);
66 void updateReferentialPosition(
const Transform & t);
67 void updateMap(
const cv::Mat & map8U,
float resolution,
float xMin,
float yMin);
68 void updatePosterior(
const std::map<int, float> & posterior,
float fixedMax = 0.0
f);
69 void updateLocalPath(
const std::vector<int> & localPath);
70 void setGlobalPath(
const std::vector<std::pair<int, Transform> > & globalPath);
72 void setLocalRadius(
float radius);
75 void clearPosterior();
78 void saveSettings(QSettings & settings,
const QString & group =
"")
const;
79 void loadSettings(QSettings & settings,
const QString & group =
"");
101 bool isGridMapVisible()
const;
102 bool isOriginVisible()
const;
103 bool isReferentialVisible()
const;
104 bool isLocalRadiusVisible()
const;
107 bool isGraphVisible()
const;
108 bool isGlobalPathVisible()
const;
109 bool isLocalPathVisible()
const;
110 bool isGtGraphVisible()
const;
111 bool isGPSGraphVisible()
const;
112 bool isOrientationENU()
const;
115 void setWorkingDirectory(
const QString & path);
116 void setNodeVisible(
bool visible);
117 void setNodeRadius(
float radius);
118 void setLinkWidth(
float width);
119 void setNodeColor(
const QColor & color);
120 void setCurrentGoalColor(
const QColor & color);
121 void setNeighborColor(
const QColor & color);
122 void setGlobalLoopClosureColor(
const QColor & color);
123 void setLocalLoopClosureColor(
const QColor & color);
124 void setUserLoopClosureColor(
const QColor & color);
125 void setVirtualLoopClosureColor(
const QColor & color);
126 void setNeighborMergedColor(
const QColor & color);
127 void setRejectedLoopClosureColor(
const QColor & color);
128 void setLocalPathColor(
const QColor & color);
129 void setGlobalPathColor(
const QColor & color);
130 void setGTColor(
const QColor & color);
131 void setGPSColor(
const QColor & color);
132 void setIntraSessionLoopColor(
const QColor & color);
133 void setInterSessionLoopColor(
const QColor & color);
134 void setIntraInterSessionColorsEnabled(
bool enabled);
135 void setGridMapVisible(
bool visible);
136 void setOriginVisible(
bool visible);
137 void setReferentialVisible(
bool visible);
138 void setLocalRadiusVisible(
bool visible);
139 void setLoopClosureOutlierThr(
float value);
140 void setMaxLinkLength(
float value);
141 void setGraphVisible(
bool visible);
142 void setGlobalPathVisible(
bool visible);
143 void setLocalPathVisible(
bool visible);
144 void setGtGraphVisible(
bool visible);
145 void setGPSGraphVisible(
bool visible);
146 void setOrientationENU(
bool enabled);
149 void configChanged();
150 void mapShownRequested();
153 void restoreDefaults();
156 virtual void wheelEvent ( QWheelEvent * event );
157 virtual void contextMenuEvent(QContextMenuEvent * event);
QGraphicsItem * _gpsGraphRoot
QColor _loopClosureLocalColor
QColor _loopClosureVirtualColor
const QColor & getVirtualLoopClosureColor() const
float getLinkWidth() const
QGraphicsItem * _localPathRoot
const QColor & getInterSessionLoopColor() const
QColor _neighborMergedColor
QGraphicsEllipseItem * _localRadius
QGraphicsItemGroup * _referential
const QString & getWorkingDirectory() const
const QColor & getGPSColor() const
const QColor & getRejectedLoopClosureColor() const
float getNodeRadius() const
bool _intraInterSessionColors
QGraphicsPixmapItem * _gridMap
QMultiMap< int, LinkItem * > _gpsLinkItems
QGraphicsItem * _graphRoot
const QColor & getGlobalLoopClosureColor() const
QColor _loopInterSessionColor
const QColor & getGlobalPathColor() const
const QColor & getLocalPathColor() const
QColor _loopClosureRejectedColor
float getLoopClosureOutlierThr() const
QColor _loopIntraSessionColor
QMultiMap< int, LinkItem * > _globalPathLinkItems
QGraphicsItemGroup * _originReferential
const QColor & getNodeColor() const
float getMaxLinkLength() const
QMultiMap< int, LinkItem * > _gtLinkItems
const QColor & getIntraSessionLoopColor() const
QGraphicsItem * _gtGraphRoot
float _loopClosureOutlierThr
const QColor & getLocalLoopClosureColor() const
const QColor & getCurrentGoalColor() const
QMultiMap< int, LinkItem * > _localPathLinkItems
bool isIntraInterSessionColorsEnabled() const
QGraphicsItem * _globalPathRoot
QMap< int, NodeItem * > _gpsNodeItems
QColor _loopClosureUserColor
const QColor & getUserLoopClosureColor() const
QString _workingDirectory
QMultiMap< int, LinkItem * > _linkItems
const QColor & getNeighborMergedColor() const
const QColor & getGTColor() const
QMap< int, NodeItem * > _nodeItems
QMap< int, NodeItem * > _gtNodeItems
const QColor & getNeighborColor() const