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 setWorldMapRotation(
const float & theta);
62 void updateGraph(
const std::map<int, Transform> & poses,
63 const std::multimap<int, Link> & constraints,
64 const std::map<int, int> & mapIds,
65 const std::map<int, int> & weights = std::map<int, int>());
66 void updateGTGraph(
const std::map<int, Transform> & poses);
68 const std::map<int, Transform> & gpsMapPoses,
69 const std::map<int, GPS> & gpsValues);
70 void updateReferentialPosition(
const Transform & t);
71 void updateMap(
const cv::Mat & map8U,
float resolution,
float xMin,
float yMin);
72 void updatePosterior(
const std::map<int, float> & posterior,
float fixedMax = 0.0
f,
int zValueOffset = 0);
73 void updateLocalPath(
const std::vector<int> & localPath);
74 void setGlobalPath(
const std::vector<std::pair<int, Transform> > & globalPath);
76 void setLocalRadius(
float radius);
79 void clearPosterior();
82 void saveSettings(QSettings & settings,
const QString & group =
"")
const;
83 void loadSettings(QSettings & settings,
const QString & group =
"");
105 bool isGridMapVisible()
const;
106 bool isOriginVisible()
const;
107 bool isReferentialVisible()
const;
108 bool isLocalRadiusVisible()
const;
111 bool isGraphVisible()
const;
112 bool isGlobalPathVisible()
const;
113 bool isLocalPathVisible()
const;
114 bool isGtGraphVisible()
const;
115 bool isGPSGraphVisible()
const;
116 bool isOrientationENU()
const;
119 void setWorkingDirectory(
const QString & path);
120 void setNodeVisible(
bool visible);
121 void setNodeRadius(
float radius);
122 void setLinkWidth(
float width);
123 void setNodeColor(
const QColor & color);
124 void setCurrentGoalColor(
const QColor & color);
125 void setNeighborColor(
const QColor & color);
126 void setGlobalLoopClosureColor(
const QColor & color);
127 void setLocalLoopClosureColor(
const QColor & color);
128 void setUserLoopClosureColor(
const QColor & color);
129 void setVirtualLoopClosureColor(
const QColor & color);
130 void setNeighborMergedColor(
const QColor & color);
131 void setLandmarkColor(
const QColor & color);
132 void setRejectedLoopClosureColor(
const QColor & color);
133 void setLocalPathColor(
const QColor & color);
134 void setGlobalPathColor(
const QColor & color);
135 void setGTColor(
const QColor & color);
136 void setGPSColor(
const QColor & color);
137 void setIntraSessionLoopColor(
const QColor & color);
138 void setInterSessionLoopColor(
const QColor & color);
139 void setIntraInterSessionColorsEnabled(
bool enabled);
140 void setGridMapVisible(
bool visible);
141 void setOriginVisible(
bool visible);
142 void setReferentialVisible(
bool visible);
143 void setLocalRadiusVisible(
bool visible);
144 void setLoopClosureOutlierThr(
float value);
145 void setMaxLinkLength(
float value);
146 void setGraphVisible(
bool visible);
147 void setGlobalPathVisible(
bool visible);
148 void setLocalPathVisible(
bool visible);
149 void setGtGraphVisible(
bool visible);
150 void setGPSGraphVisible(
bool visible);
151 void setOrientationENU(
bool enabled);
154 void configChanged();
155 void mapShownRequested();
158 void restoreDefaults();
161 virtual void wheelEvent ( QWheelEvent * event );
162 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
float getWorldMapRotation() const
const QColor & getGTColor() const
QMap< int, NodeItem * > _nodeItems
QMap< int, NodeItem * > _gtNodeItems
const QColor & getNeighborColor() const