39 #include <QApplication> 47 "dataRecorder [options] config.ini output.db\n" 49 " A config file contains all camera parameters and driver used. That\n" 50 " file can be generated by RTAB-Map->Preferences->Save Settings(*.ini)\n" 51 " after modifying Source settings.\n" 53 " -debug Show debug log.\n" 54 " -hide Don't display the current cloud recorded.\n");
59 QApplication *
app = 0;
63 printf(
"\nSignal %d caught...\n", sig);
70 QMetaObject::invokeMethod(
app,
"quit");
82 std::string configFile;
88 for(
int i=1; i<argc-2; ++i)
90 if(strcmp(argv[i],
"-debug") == 0)
95 if(strcmp(argv[i],
"-hide") == 0)
100 printf(
"Unrecognized option : %s\n", argv[i]);
103 configFile = argv[argc-2];
105 fileName = argv[argc-1];
110 printf(
"Database names must end with .db extension\n");
114 UINFO(
"Output = %s", fileName.c_str());
115 UINFO(
"Show = %s", show?
"true":
"false");
116 UINFO(
"Config = %s", configFile.c_str());
118 app =
new QApplication(argc, argv);
124 if(paramTmp.find(Parameters::kRtabmapWorkingDirectory()) == paramTmp.end())
130 dialog.
init(configFile.c_str());
179 if(recorder.
init(fileName.c_str()))
184 recorder.setWindowTitle(
"Data recorder");
185 recorder.setMinimumWidth(500);
186 recorder.setMinimumHeight(300);
187 recorder.showNormal();
188 app->processEvents();
203 UERROR(
"Cannot initialize the camera!");
208 UERROR(
"Cannot initialize the recorder! Maybe the path is wrong: \"%s\"", fileName.c_str());
static std::string homeDir()
rtabmap::CameraThread * cam
Camera * createCamera(bool useRawImages=false, bool useColor=true)
double getBilateralSigmaR() const
void setStereoExposureCompensation(bool enabled)
bool isDepthFilteringAvailable() const
rtabmap::ParametersMap getAllParameters() const
virtual QString getDefaultWorkingDirectory() const
int getSourceScanDownsampleStep() const
std::pair< std::string, std::string > ParametersPair
double getGeneralInputRate() const
void enableBilateralFiltering(float sigmaS, float sigmaR)
bool isSourceMirroring() const
std::map< std::string, std::string > ParametersMap
static void writeINI(const std::string &configFile, const ParametersMap ¶meters)
Some conversion functions.
int main(int argc, char *argv[])
std::string getExtension()
static void setLevel(ULogger::Level level)
int getIMUFilteringStrategy() const
bool getIMUFilteringBaseFrameConversion() const
virtual bool init(const std::string &calibrationFolder=".", const std::string &cameraName="")=0
void setColorOnly(bool colorOnly)
double getSourceScanVoxelSize() const
void setScanParameters(bool fromDepth, int downsampleStep=1, float rangeMin=0.0f, float rangeMax=0.0f, float voxelSize=0.0f, int normalsK=0, int normalsRadius=0.0f, float groundNormalsUp=0.0f)
void enableIMUFiltering(int filteringStrategy=1, const ParametersMap ¶meters=ParametersMap(), bool baseFrameConversion=false)
int getSourceImageDecimation() const
static void setType(Type type, const std::string &fileName=kDefaultLogFileName, bool append=true)
void init(const QString &iniFilePath="")
std::string UTILITE_EXP uReplaceChar(const std::string &str, char before, char after)
bool isSourceRGBDColorOnly() const
void setDistortionModel(const std::string &path)
void setMirroringEnabled(bool enabled)
void setImageDecimation(int decimation)
int getSourceScanNormalsK() const
void registerToEventsManager()
bool isSourceStereoDepthGenerated() const
void setStereoToDepth(bool enabled)
QString getSourceDistortionModel() const
bool isSourceScanFromDepth() const
PreferencesDialog::Src getSourceDriver() const
double getSourceScanForceGroundNormalsUp() const
ULogger class and convenient macros.
double getSourceScanNormalsRadius() const
double getSourceScanRangeMin() const
static void readINI(const std::string &configFile, ParametersMap ¶meters, bool modifiedOnly=false)
double getBilateralSigmaS() const
bool init(const QString &path, bool recordInRAM=true)
void join(bool killFirst=false)
bool isBilateralFiltering() const
double getSourceScanRangeMax() const
bool isSourceStereoExposureCompensation() const