fixed '~' character handling in database_path parameter

This commit is contained in:
Mathieu Labbe
2015-01-27 13:34:53 -05:00
parent f64557a755
commit 78307669b3
+3 -2
View File
@@ -130,6 +130,7 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
mapGraph_ = nh.advertise<rtabmap_ros::Graph>("graph", 1);
configPath_ = uReplaceChar(configPath_, '~', UDirectory::homeDir());
databasePath_ = uReplaceChar(databasePath_, '~', UDirectory::homeDir());
// load parameters
ParametersMap parameters = loadParameters(configPath_);
@@ -251,11 +252,11 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
}
}
ROS_INFO("rtabmap: Using database from \"%s\".", databasePath_.c_str());
// Init RTAB-Map
rtabmap_.init(parameters, databasePath_);
ROS_INFO("rtabmap: Using database from \"%s\".", databasePath_.c_str());
// setup services
updateSrv_ = nh.advertiseService("update_parameters", &CoreWrapper::updateRtabmapCallback, this);
resetSrv_ = nh.advertiseService("reset", &CoreWrapper::resetRtabmapCallback, this);