mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-10 13:30:20 +08:00
Updated version to 0.3. Now when deleting the memory, RTAB-Map reset the log files at the same time.
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@209 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
+4
-4
@@ -14,7 +14,7 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules")
|
||||
#######################
|
||||
# VERSION
|
||||
#######################
|
||||
SET(PROJECT_VERSION "0.2.7")
|
||||
SET(PROJECT_VERSION "0.3.0")
|
||||
|
||||
STRING(REGEX MATCHALL "[0-9]" PROJECT_VERSION_PARTS "${PROJECT_VERSION}")
|
||||
|
||||
@@ -211,7 +211,7 @@ IF(WIN32)
|
||||
SET(CPACK_GENERATOR "NSIS")
|
||||
SET(CPACK_SOURCE_GENERATOR "ZIP")
|
||||
SET(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||
SET(ICON_PATH "${PROJECT_SOURCE_DIR}/${PROJECT_PREFIX}/src/${PROJECT_NAME}.ico")
|
||||
SET(ICON_PATH "${PROJECT_SOURCE_DIR}/app/src/${PROJECT_NAME}.ico")
|
||||
SET(CPACK_NSIS_MUI_ICON ${ICON_PATH})
|
||||
SET(CPACK_NSIS_MUI_UNIICON ${ICON_PATH})
|
||||
#SET(CPACK_PACKAGE_ICON ${ICON_PATH})
|
||||
@@ -228,7 +228,7 @@ IF(WIN32)
|
||||
SET(CPACK_NSIS_MODIFY_PATH ON)
|
||||
|
||||
ELSEIF(APPLE)
|
||||
# The project is created as a bundle over the main app (see ./${PROJECT_PREFIX}/src).
|
||||
# The project is created as a bundle over the main app (see ./app/src).
|
||||
# Here we package only this bundle. Note that we set
|
||||
# CMAKE_INSTALL_PREFIX to "/" when packaging...
|
||||
IF(BUILD_AS_BUNDLE)
|
||||
@@ -239,7 +239,7 @@ ELSEIF(APPLE)
|
||||
|
||||
SET(CPACK_SOURCE_GENERATOR "TBZ2")
|
||||
|
||||
SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/${PROJECT_PREFIX}/src/${PROJECT_NAME}.icns")
|
||||
SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/app/src/${PROJECT_NAME}.icns")
|
||||
|
||||
ELSE()
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.txt")
|
||||
|
||||
@@ -115,7 +115,7 @@ private:
|
||||
void deleteMemory();
|
||||
void addSMState(SMState * data); // ownership is transferred
|
||||
SMState * getSMState();
|
||||
void setupLogFiles();
|
||||
void setupLogFiles(bool overwrite = false);
|
||||
void releaseAllStrategies();
|
||||
void pushNewState(State newState, const ParametersMap & parameters = ParametersMap());
|
||||
void dumpPrediction() const;
|
||||
|
||||
+15
-6
@@ -110,7 +110,7 @@ std::string Rtabmap::getVersion()
|
||||
return RTABMAP_VERSION;
|
||||
}
|
||||
|
||||
void Rtabmap::setupLogFiles()
|
||||
void Rtabmap::setupLogFiles(bool overwrite)
|
||||
{
|
||||
// Log files
|
||||
if(_foutFloat)
|
||||
@@ -124,12 +124,21 @@ void Rtabmap::setupLogFiles()
|
||||
_foutInt = 0;
|
||||
}
|
||||
|
||||
std::string attributes = "a+"; // append to log files
|
||||
if(overwrite)
|
||||
{
|
||||
// If a file with the same name already exists
|
||||
// its content is erased and the file is treated
|
||||
// as a new empty file.
|
||||
attributes = "w";
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
fopen_s(&_foutFloat, (_wDir+LOG_F).toStdString().c_str(), "a+");
|
||||
fopen_s(&_foutInt, (_wDir+LOG_I).toStdString().c_str(), "a+");
|
||||
fopen_s(&_foutFloat, (_wDir+LOG_F).toStdString().c_str(), attributes.c_str());
|
||||
fopen_s(&_foutInt, (_wDir+LOG_I).toStdString().c_str(), attributes.c_str());
|
||||
#else
|
||||
_foutFloat = fopen((_wDir+LOG_F).c_str(), "a+");
|
||||
_foutInt = fopen((_wDir+LOG_I).c_str(), "a+");
|
||||
_foutFloat = fopen((_wDir+LOG_F).c_str(), attributes.c_str());
|
||||
_foutInt = fopen((_wDir+LOG_I).c_str(), attributes.c_str());
|
||||
#endif
|
||||
|
||||
ULOGGER_DEBUG("Log file (int)=%s", (_wDir+LOG_I).c_str());
|
||||
@@ -522,7 +531,7 @@ void Rtabmap::deleteMemory()
|
||||
_reactivateId = 0;
|
||||
_highestHypothesisValue = 0;
|
||||
_spreadMargin = 0;
|
||||
this->setupLogFiles();
|
||||
this->setupLogFiles(true);
|
||||
}
|
||||
|
||||
void Rtabmap::handleEvent(UEvent* event)
|
||||
|
||||
@@ -1061,7 +1061,7 @@ void MainWindow::deleteMemory()
|
||||
{
|
||||
button = QMessageBox::question(this,
|
||||
tr("Deleting memory..."),
|
||||
tr("The remote database file \"%1\" will be deleted. Are you sure you want to continue? (This cannot be reverted)").arg(dbPath),
|
||||
tr("The remote database file \"%1\" and log files will be deleted. Are you sure you want to continue? (This cannot be reverted)").arg(dbPath),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
}
|
||||
@@ -1069,7 +1069,7 @@ void MainWindow::deleteMemory()
|
||||
{
|
||||
button = QMessageBox::question(this,
|
||||
tr("Deleting memory..."),
|
||||
tr("The database file \"%1\" (%2 MB) will be deleted. Are you sure you want to continue? (This cannot be reverted)").arg(dbPath).arg(UFile::length(dbPath.toStdString())/1000000),
|
||||
tr("The database file \"%1\" (%2 MB) and log files will be deleted. Are you sure you want to continue? (This cannot be reverted)").arg(dbPath).arg(UFile::length(dbPath.toStdString())/1000000),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::No);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>839</width>
|
||||
<height>23</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
@@ -279,17 +279,17 @@
|
||||
<property name="title">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
<addaction name="actionReset_the_memory"/>
|
||||
<addaction name="actionDelete_memory"/>
|
||||
<addaction name="actionApply_settings_to_the_detector"/>
|
||||
<addaction name="actionClear_cache"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionOpen_working_directory"/>
|
||||
<addaction name="actionDelete_memory"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionDump_the_memory"/>
|
||||
<addaction name="actionDump_the_prediction_matrix"/>
|
||||
<addaction name="actionGenerate_map"/>
|
||||
<addaction name="actionReset_the_memory"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionApply_settings_to_the_detector"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionClear_cache"/>
|
||||
<addaction name="actionAuto_screen_capture"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu6">
|
||||
|
||||
Reference in New Issue
Block a user