Added Octomap visualization and export options

This commit is contained in:
matlabbe
2016-07-15 17:46:13 -04:00
parent c24079884d
commit b4b7b6f455
13 changed files with 737 additions and 397 deletions

View File

@@ -58,9 +58,12 @@ namespace pcl {
}
class QMenu;
class vtkProp;
namespace rtabmap {
class OctoMap;
class RTABMAPGUI_EXP CloudViewer : public QVTKWidget
{
Q_OBJECT
@@ -136,6 +139,9 @@ public:
const pcl::TextureMesh::Ptr & textureMesh,
const Transform & pose = Transform::getIdentity());
bool addOctomap(const OctoMap * octomap, unsigned int treeDepth = 0, bool showEdges = true, bool lightingOn = false);
void removeOctomap();
bool addOccupancyGridMap(
const cv::Mat & map8U,
float resolution, // cell size
@@ -326,6 +332,7 @@ private:
bool _backfaceCulling;
bool _frontfaceCulling;
double _renderingRate;
vtkProp * _octomapActor;
};
} /* namespace rtabmap */

View File

@@ -69,6 +69,7 @@ class ExportCloudsDialog;
class ExportScansDialog;
class PostProcessingDialog;
class DataRecorder;
class OctoMap;
class RTABMAPGUI_EXP MainWindow : public QMainWindow, public UEventsHandler
{
@@ -137,6 +138,7 @@ private slots:
void exportPosesTORO();
void exportPosesG2O();
void exportImages();
void exportOctomap();
void postProcessing();
void deleteMemory();
void openWorkingDirectory();
@@ -239,7 +241,8 @@ private:
const pcl::PointCloud<pcl::PointXYZRGB>::Ptr & cloud,
const pcl::IndicesPtr & indices,
int nodeId,
const Transform & pose);
const Transform & pose,
bool updateOctomap = false);
void createAndAddScanToMap(int nodeId, const Transform & pose, int mapId);
void createAndAddFeaturesToMap(int nodeId, const Transform & pose, int mapId);
Transform alignPosesToGroundTruth(std::map<int, Transform> & poses, const std::map<int, Transform> & groundTruth);
@@ -297,6 +300,8 @@ private:
std::map<int, std::pair<cv::Mat, cv::Mat> > _projectionLocalMaps; // <ground, obstacles>
std::map<int, std::pair<cv::Mat, cv::Mat> > _gridLocalMaps; // <ground, obstacles>
rtabmap::OctoMap * _octomap;
std::map<int, pcl::PointCloud<pcl::PointXYZRGB>::Ptr> _createdFeatures;
Transform _odometryCorrection;

View File

@@ -152,6 +152,8 @@ public:
double getMapNoiseRadius() const;
int getMapNoiseMinNeighbors() const;
bool isCloudsShown(int index) const; // 0=map, 1=odom
bool isOctomapShown() const;
int getOctomapTreeDepth() const;
int getCloudDecimation(int index) const; // 0=map, 1=odom
double getCloudMaxDepth(int index) const; // 0=map, 1=odom
double getCloudMinDepth(int index) const; // 0=map, 1=odom