mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 16:57:46 +08:00
added Rtabmap/StatisticLoggedHeaders to avoid headers in log files
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1869 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -143,6 +143,7 @@ class RTABMAP_EXP Parameters
|
|||||||
RTABMAP_PARAM(Rtabmap, MaxRetrieved, unsigned int, 2, "Maximum locations retrieved at the same time from LTM.");
|
RTABMAP_PARAM(Rtabmap, MaxRetrieved, unsigned int, 2, "Maximum locations retrieved at the same time from LTM.");
|
||||||
RTABMAP_PARAM(Rtabmap, StatisticLogsBufferedInRAM, bool, true, "Statistic logs buffered in RAM instead of written to hard drive after each iteration.");
|
RTABMAP_PARAM(Rtabmap, StatisticLogsBufferedInRAM, bool, true, "Statistic logs buffered in RAM instead of written to hard drive after each iteration.");
|
||||||
RTABMAP_PARAM(Rtabmap, StatisticLogged, bool, false, "Logging enabled.");
|
RTABMAP_PARAM(Rtabmap, StatisticLogged, bool, false, "Logging enabled.");
|
||||||
|
RTABMAP_PARAM(Rtabmap, StatisticLoggedHeaders, bool, true, "Add column header description to log files.");
|
||||||
RTABMAP_PARAM(Rtabmap, StartNewMapOnLoopClosure, bool, false, "Start a new map only if there is a global loop closure with a previous map.")
|
RTABMAP_PARAM(Rtabmap, StartNewMapOnLoopClosure, bool, false, "Start a new map only if there is a global loop closure with a previous map.")
|
||||||
|
|
||||||
// Hypotheses selection
|
// Hypotheses selection
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ private:
|
|||||||
unsigned int _maxRetrieved;
|
unsigned int _maxRetrieved;
|
||||||
bool _statisticLogsBufferedInRAM;
|
bool _statisticLogsBufferedInRAM;
|
||||||
bool _statisticLogged;
|
bool _statisticLogged;
|
||||||
|
bool _statisticLoggedHeaders;
|
||||||
bool _rgbdSlamMode;
|
bool _rgbdSlamMode;
|
||||||
float _rgbdLinearUpdate;
|
float _rgbdLinearUpdate;
|
||||||
float _rgbdAngularUpdate;
|
float _rgbdAngularUpdate;
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ Rtabmap::Rtabmap() :
|
|||||||
_maxRetrieved(Parameters::defaultRtabmapMaxRetrieved()),
|
_maxRetrieved(Parameters::defaultRtabmapMaxRetrieved()),
|
||||||
_statisticLogsBufferedInRAM(Parameters::defaultRtabmapStatisticLogsBufferedInRAM()),
|
_statisticLogsBufferedInRAM(Parameters::defaultRtabmapStatisticLogsBufferedInRAM()),
|
||||||
_statisticLogged(Parameters::defaultRtabmapStatisticLogged()),
|
_statisticLogged(Parameters::defaultRtabmapStatisticLogged()),
|
||||||
|
_statisticLoggedHeaders(Parameters::defaultRtabmapStatisticLoggedHeaders()),
|
||||||
_rgbdSlamMode(Parameters::defaultRGBDEnabled()),
|
_rgbdSlamMode(Parameters::defaultRGBDEnabled()),
|
||||||
_rgbdLinearUpdate(Parameters::defaultRGBDLinearUpdate()),
|
_rgbdLinearUpdate(Parameters::defaultRGBDLinearUpdate()),
|
||||||
_rgbdAngularUpdate(Parameters::defaultRGBDAngularUpdate()),
|
_rgbdAngularUpdate(Parameters::defaultRGBDAngularUpdate()),
|
||||||
@@ -169,7 +170,7 @@ void Rtabmap::setupLogFiles(bool overwrite)
|
|||||||
_foutInt = fopen((_wDir+LOG_I).c_str(), attributes.c_str());
|
_foutInt = fopen((_wDir+LOG_I).c_str(), attributes.c_str());
|
||||||
#endif
|
#endif
|
||||||
// add header (column identification)
|
// add header (column identification)
|
||||||
if(addLogFHeader && _foutFloat)
|
if(_statisticLoggedHeaders && addLogFHeader && _foutFloat)
|
||||||
{
|
{
|
||||||
fprintf(_foutFloat, "Column headers:\n");
|
fprintf(_foutFloat, "Column headers:\n");
|
||||||
fprintf(_foutFloat, " 1-Total iteration time (s)\n");
|
fprintf(_foutFloat, " 1-Total iteration time (s)\n");
|
||||||
@@ -193,7 +194,7 @@ void Rtabmap::setupLogFiles(bool overwrite)
|
|||||||
fprintf(_foutFloat, " 19-Retrieval database access time (s)\n");
|
fprintf(_foutFloat, " 19-Retrieval database access time (s)\n");
|
||||||
fprintf(_foutFloat, " 20-Add loop closure link time (s)\n");
|
fprintf(_foutFloat, " 20-Add loop closure link time (s)\n");
|
||||||
}
|
}
|
||||||
if(addLogIHeader && _foutInt)
|
if(_statisticLoggedHeaders && addLogIHeader && _foutInt)
|
||||||
{
|
{
|
||||||
fprintf(_foutInt, "Column headers:\n");
|
fprintf(_foutInt, "Column headers:\n");
|
||||||
fprintf(_foutInt, " 1-Loop closure ID\n");
|
fprintf(_foutInt, " 1-Loop closure ID\n");
|
||||||
@@ -260,10 +261,8 @@ void Rtabmap::init(const ParametersMap & parameters, bool deleteMemory)
|
|||||||
{
|
{
|
||||||
this->setDatabasePath(iter->second.c_str());
|
this->setDatabasePath(iter->second.c_str());
|
||||||
}
|
}
|
||||||
if((iter=parameters.find(Parameters::kRtabmapStatisticLogged())) != parameters.end())
|
Parameters::parse(parameters, Parameters::kRtabmapStatisticLogged(), _statisticLogged);
|
||||||
{
|
Parameters::parse(parameters, Parameters::kRtabmapStatisticLoggedHeaders(), _statisticLoggedHeaders);
|
||||||
_statisticLogged = uStr2Bool(iter->second.c_str());
|
|
||||||
}
|
|
||||||
this->resetMemory(true);
|
this->resetMemory(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,6 +341,7 @@ void Rtabmap::parseParameters(const ParametersMap & parameters)
|
|||||||
Parameters::parse(parameters, Parameters::kRtabmapMaxRetrieved(), _maxRetrieved);
|
Parameters::parse(parameters, Parameters::kRtabmapMaxRetrieved(), _maxRetrieved);
|
||||||
Parameters::parse(parameters, Parameters::kRtabmapStatisticLogsBufferedInRAM(), _statisticLogsBufferedInRAM);
|
Parameters::parse(parameters, Parameters::kRtabmapStatisticLogsBufferedInRAM(), _statisticLogsBufferedInRAM);
|
||||||
Parameters::parse(parameters, Parameters::kRtabmapStatisticLogged(), _statisticLogged);
|
Parameters::parse(parameters, Parameters::kRtabmapStatisticLogged(), _statisticLogged);
|
||||||
|
Parameters::parse(parameters, Parameters::kRtabmapStatisticLoggedHeaders(), _statisticLoggedHeaders);
|
||||||
Parameters::parse(parameters, Parameters::kRGBDEnabled(), _rgbdSlamMode);
|
Parameters::parse(parameters, Parameters::kRGBDEnabled(), _rgbdSlamMode);
|
||||||
Parameters::parse(parameters, Parameters::kRGBDLinearUpdate(), _rgbdLinearUpdate);
|
Parameters::parse(parameters, Parameters::kRGBDLinearUpdate(), _rgbdLinearUpdate);
|
||||||
Parameters::parse(parameters, Parameters::kRGBDAngularUpdate(), _rgbdAngularUpdate);
|
Parameters::parse(parameters, Parameters::kRGBDAngularUpdate(), _rgbdAngularUpdate);
|
||||||
|
|||||||
Reference in New Issue
Block a user