Added option to show graphs in the 3D map view. (See "General Settings->3D rendering->Show Graphs" default true)

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1943 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-10-30 19:38:58 +00:00
parent 9358234e44
commit f12fc93639
9 changed files with 243 additions and 106 deletions

View File

@@ -130,6 +130,13 @@ public:
void updateCameraPosition(
const Transform & pose);
void addOrUpdateGraph(
const std::string & id,
const pcl::PointCloud<pcl::PointXYZ>::Ptr & graph,
const QColor & color = Qt::gray);
void removeGraph(const std::string & id);
void removeAllGraphs();
void setTrajectoryShown(bool shown);
void setTrajectorySize(int value);
void clearTrajectory();
@@ -182,6 +189,7 @@ private:
QAction * _aShowGrid;
QAction * _aSetBackgroundColor;
QMenu * _menu;
std::map<std::string, pcl::PointCloud<pcl::PointXYZ>::Ptr > _graphes;
pcl::PointCloud<pcl::PointXYZ>::Ptr _trajectory;
unsigned int _maxTrajectorySize;
QMap<std::string, Transform> _addedClouds; // include cloud, scan, meshes

View File

@@ -194,9 +194,9 @@ signals:
private:
void update3DMapVisibility(bool cloudsShown, bool scansShown);
void updateMapCloud(const std::map<int, Transform> & poses, const Transform & pose, const std::multimap<int, Link> & constraints, bool verboseProgress = false);
void createAndAddCloudToMap(int nodeId, const Transform & pose);
void createAndAddScanToMap(int nodeId, const Transform & pose);
void updateMapCloud(const std::map<int, Transform> & poses, const Transform & pose, const std::multimap<int, Link> & constraints, const std::map<int, int> & mapIds, bool verboseProgress = false);
void createAndAddCloudToMap(int nodeId, const Transform & pose, int mapId);
void createAndAddScanToMap(int nodeId, const Transform & pose, int mapId);
void drawKeypoints(const std::multimap<int, cv::KeyPoint> & refWords, const std::multimap<int, cv::KeyPoint> & loopWords);
void setupMainLayout(bool vertical);
void updateSelectSourceImageMenu(int type);
@@ -261,9 +261,9 @@ private:
bool _emptyNewDatabase;
QMap<int, Signature> _cachedSignatures;
QMap<int, int> _mapIds;
std::map<int, Transform> _currentPosesMap;
std::multimap<int, Link> _currentLinksMap;
std::map<int, Transform> _currentPosesMap; // <nodeId, pose>
std::multimap<int, Link> _currentLinksMap; // <nodeFromId, link>
std::map<int, int> _currentMapIds; // <nodeId, mapId>
std::map<int, pcl::PointCloud<pcl::PointXYZRGB>::Ptr > _createdClouds;
std::map<int, pcl::PointCloud<pcl::PointXYZ>::Ptr > _createdScans;
std::map<int, std::pair<cv::Mat, cv::Mat> > _occupancyLocalMaps; // <ground, obstacles>

View File

@@ -121,6 +121,7 @@ public:
int getKeypointsOpacity() const;
int getOdomQualityWarnThr() const;
bool isGraphsShown() const;
bool isCloudMeshing() const;
bool isCloudsShown(int index) const; // 0=map, 1=odom
double getCloudVoxelSize(int index) const; // 0=map, 1=odom