mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 16:57:46 +08:00
fixed '~' character handling in database_path parameter
This commit is contained in:
+3
-2
@@ -130,6 +130,7 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
|
|||||||
mapGraph_ = nh.advertise<rtabmap_ros::Graph>("graph", 1);
|
mapGraph_ = nh.advertise<rtabmap_ros::Graph>("graph", 1);
|
||||||
|
|
||||||
configPath_ = uReplaceChar(configPath_, '~', UDirectory::homeDir());
|
configPath_ = uReplaceChar(configPath_, '~', UDirectory::homeDir());
|
||||||
|
databasePath_ = uReplaceChar(databasePath_, '~', UDirectory::homeDir());
|
||||||
|
|
||||||
// load parameters
|
// load parameters
|
||||||
ParametersMap parameters = loadParameters(configPath_);
|
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
|
// Init RTAB-Map
|
||||||
rtabmap_.init(parameters, databasePath_);
|
rtabmap_.init(parameters, databasePath_);
|
||||||
|
|
||||||
ROS_INFO("rtabmap: Using database from \"%s\".", databasePath_.c_str());
|
|
||||||
|
|
||||||
// setup services
|
// setup services
|
||||||
updateSrv_ = nh.advertiseService("update_parameters", &CoreWrapper::updateRtabmapCallback, this);
|
updateSrv_ = nh.advertiseService("update_parameters", &CoreWrapper::updateRtabmapCallback, this);
|
||||||
resetSrv_ = nh.advertiseService("reset", &CoreWrapper::resetRtabmapCallback, this);
|
resetSrv_ = nh.advertiseService("reset", &CoreWrapper::resetRtabmapCallback, this);
|
||||||
|
|||||||
Reference in New Issue
Block a user