mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
DbViewer: added menu actions to view/update/export optimized mesh saved in database. CloudViewer: cubes can be added for convenience, fixed double-click not always working. util3d: added conversion function from LaserScan to PointCloud2, added conversion functions between polygons format saved in database and PCL polygons format with vertices.
This commit is contained in:
@@ -222,6 +222,19 @@ public:
|
||||
void removeAllSpheres();
|
||||
const std::set<std::string> & getAddedSpheres() const {return _spheres;}
|
||||
|
||||
void addOrUpdateCube(
|
||||
const std::string & id,
|
||||
const Transform & pose, // center of the cube
|
||||
float width, // e.g., along x axis
|
||||
float height, // e.g., along y axis
|
||||
float depth, // e.g., along z axis
|
||||
const QColor & color,
|
||||
bool wireframe = false,
|
||||
bool foreground = false);
|
||||
void removeCube(const std::string & id);
|
||||
void removeAllCubes();
|
||||
const std::set<std::string> & getAddedCubes() const {return _cubes;}
|
||||
|
||||
void addOrUpdateFrustum(
|
||||
const std::string & id,
|
||||
const Transform & transform,
|
||||
@@ -314,7 +327,7 @@ public:
|
||||
float getNormalsScale() const;
|
||||
void setNormalsStep(int step);
|
||||
void setNormalsScale(float scale);
|
||||
void buildLocator(bool enable);
|
||||
void buildPickingLocator(bool enable);
|
||||
const std::map<std::string, vtkSmartPointer<vtkOBBTree> > & getLocators() const {return _locators;}
|
||||
|
||||
public slots:
|
||||
@@ -376,6 +389,7 @@ private:
|
||||
std::set<std::string> _texts;
|
||||
std::set<std::string> _lines;
|
||||
std::set<std::string> _spheres;
|
||||
std::set<std::string> _cubes;
|
||||
QMap<std::string, Transform> _frustums;
|
||||
pcl::PointCloud<pcl::PointXYZ>::Ptr _trajectory;
|
||||
unsigned int _maxTrajectorySize;
|
||||
|
||||
@@ -95,6 +95,9 @@ private slots:
|
||||
void generateGraph();
|
||||
void exportSaved2DMap();
|
||||
void import2DMap();
|
||||
void viewOptimizedMesh();
|
||||
void exportOptimizedMesh();
|
||||
void updateOptimizedMesh();
|
||||
void exportDatabase();
|
||||
void extractImages();
|
||||
void exportPosesRaw();
|
||||
|
||||
@@ -64,6 +64,10 @@ public:
|
||||
void loadSettings(QSettings & settings, const QString & group = "");
|
||||
|
||||
void setDBDriver(const DBDriver * dbDriver) {_dbDriver = dbDriver;}
|
||||
void forceAssembling(bool enabled);
|
||||
void setProgressDialogToMax();
|
||||
void setSaveButton();
|
||||
void setOkButton();
|
||||
|
||||
void exportClouds(
|
||||
const std::map<int, Transform> & poses,
|
||||
@@ -85,6 +89,31 @@ public:
|
||||
const QString & workingDirectory,
|
||||
const ParametersMap & parameters);
|
||||
|
||||
bool getExportedClouds(
|
||||
const std::map<int, Transform> & poses,
|
||||
const std::multimap<int, Link> & links,
|
||||
const std::map<int, int> & mapIds,
|
||||
const QMap<int, Signature> & cachedSignatures,
|
||||
const std::map<int, std::pair<pcl::PointCloud<pcl::PointXYZRGB>::Ptr, pcl::IndicesPtr> > & cachedClouds,
|
||||
const std::map<int, LaserScan> & cachedScans,
|
||||
const QString & workingDirectory,
|
||||
const ParametersMap & parameters,
|
||||
std::map<int, pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr> & clouds,
|
||||
std::map<int, pcl::PolygonMesh::Ptr> & meshes,
|
||||
std::map<int, pcl::TextureMesh::Ptr> & textureMeshes,
|
||||
std::vector<std::map<int, pcl::PointXY> > & textureVertexToPixels);
|
||||
|
||||
int getTextureSize() const;
|
||||
int getMaxTextures() const;
|
||||
bool isGainCompensation() const;
|
||||
double getGainBeta() const;
|
||||
bool isGainRGB() const;
|
||||
bool isBlending() const;
|
||||
int getBlendingDecimation() const;
|
||||
int getTextureBrightnessConstrastRatioLow() const;
|
||||
int getTextureBrightnessConstrastRatioHigh() const;
|
||||
bool isExposeFusion() const;
|
||||
|
||||
static bool removeDirRecursively(const QString & dirName);
|
||||
|
||||
signals:
|
||||
@@ -109,26 +138,10 @@ private:
|
||||
const std::map<int, LaserScan> & cachedScans,
|
||||
const ParametersMap & parameters,
|
||||
bool & has2dScans) const;
|
||||
bool getExportedClouds(
|
||||
const std::map<int, Transform> & poses,
|
||||
const std::multimap<int, Link> & links,
|
||||
const std::map<int, int> & mapIds,
|
||||
const QMap<int, Signature> & cachedSignatures,
|
||||
const std::map<int, std::pair<pcl::PointCloud<pcl::PointXYZRGB>::Ptr, pcl::IndicesPtr> > & cachedClouds,
|
||||
const std::map<int, LaserScan> & cachedScans,
|
||||
const QString & workingDirectory,
|
||||
const ParametersMap & parameters,
|
||||
std::map<int, pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr> & clouds,
|
||||
std::map<int, pcl::PolygonMesh::Ptr> & meshes,
|
||||
std::map<int, pcl::TextureMesh::Ptr> & textureMeshes,
|
||||
std::vector<std::map<int, pcl::PointXY> > & textureVertexToPixels);
|
||||
void saveClouds(const QString & workingDirectory, const std::map<int, Transform> & poses, const std::map<int, pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr> & clouds, bool binaryMode = true);
|
||||
void saveMeshes(const QString & workingDirectory, const std::map<int, Transform> & poses, const std::map<int, pcl::PolygonMesh::Ptr> & meshes, bool binaryMode = true);
|
||||
void saveTextureMeshes(const QString & workingDirectory, const std::map<int, Transform> & poses, std::map<int, pcl::TextureMesh::Ptr> & textureMeshes, const QMap<int, Signature> & cachedSignatures, const std::vector<std::map<int, pcl::PointXY> > & textureVertexToPixels);
|
||||
|
||||
void setSaveButton();
|
||||
void setOkButton();
|
||||
|
||||
private:
|
||||
Ui_ExportCloudsDialog * _ui;
|
||||
ProgressDialog * _progressDialog;
|
||||
|
||||
Reference in New Issue
Block a user