38 #include <QtCore/QMetaType> 39 #include <QMessageBox> 40 #include <QtGui/QCloseEvent> 42 #include <QVBoxLayout> 51 label_(new QLabel(this)),
52 processingImages_(
false),
56 qRegisterMetaType<cv::Mat>(
"cv::Mat");
60 QVBoxLayout * layout =
new QVBoxLayout(
this);
64 layout->setStretch(0,1);
65 this->setLayout(layout);
73 customParameters.insert(
ParametersPair(Parameters::kMemRehearsalSimilarity(),
"1.0"));
74 customParameters.insert(
ParametersPair(Parameters::kKpMaxFeatures(),
"-1"));
75 customParameters.insert(
ParametersPair(Parameters::kMemBinDataKept(),
"true"));
76 customParameters.insert(
ParametersPair(Parameters::kMemMapLabelsAdded(),
"false"));
77 customParameters.insert(
ParametersPair(Parameters::kMemBadSignaturesIgnored(),
"true"));
78 customParameters.insert(
ParametersPair(Parameters::kMemIntermediateNodeDataKept(),
"true"));
81 customParameters.insert(
ParametersPair(Parameters::kDbSqlite3InMemory(),
"false"));
84 if(!
memory_->
init(path.toStdString(),
true, customParameters))
88 UERROR(
"Error initializing the memory.");
96 UERROR(
"Already initialized, close it first.");
108 UINFO(
"Data recorded to \"%s\".", this->
path().toStdString().c_str());
114 if(this->isVisible())
116 QMessageBox::information(
this, tr(
"Data recorder"), tr(
"Data recorded to \"%1\".").arg(this->
path()));
134 customParameters.insert(
ParametersPair(Parameters::kMemGenerateIds(),
"false"));
191 QMetaObject::invokeMethod(
this,
"showImage",
bool handleEvent(UEvent *event)
const QString & path() const
DataRecorder(QWidget *parent=0)
const LaserScan & laserScanCompressed() const
void showImage(const cv::Mat &image, const cv::Mat &depth)
const std::set< int > & getStMem() const
virtual void closeEvent(QCloseEvent *event)
const Signature * getLastWorkingSignature() const
std::pair< std::string, std::string > ParametersPair
void addData(const rtabmap::SensorData &data, const Transform &pose=Transform(), const cv::Mat &infMatrix=cv::Mat::eye(6, 6, CV_64FC1))
const cv::Mat & depthOrRightRaw() const
QImage uCvMat2QImage(const cv::Mat &image, bool isBgr=true, uCvQtDepthColorMap colorMap=uCvQtDepthWhiteToBlack, float depthMin=0, float depthMax=0)
const cv::Mat & data() const
std::map< std::string, std::string > ParametersMap
void setImage(const QImage &image)
bool init(const std::string &dbUrl, bool dbOverwritten=false, const ParametersMap ¶meters=ParametersMap(), bool postInitClosingEvents=false)
virtual std::string getClassName() const =0
void setImageDepth(const cv::Mat &imageDepth)
bool update(const SensorData &data, Statistics *stats=0)
const cv::Mat & imageRaw() const
const cv::Mat & depthOrRightCompressed() const
virtual void parseParameters(const ParametersMap ¶meters)
SensorData & sensorData()
ULogger class and convenient macros.
const CameraInfo & info() const
bool init(const QString &path, bool recordInRAM=true)
void unregisterFromEventsManager()
const cv::Mat & imageCompressed() const
const SensorData & data() const
void setImageDepthShown(bool shown)