fixed empty database for demo_turtlebot_mapping.launch

This commit is contained in:
Mathieu Labbe
2015-05-26 14:35:51 -04:00
parent 3ab60d82d2
commit 2568ff30c2
2 changed files with 17 additions and 2 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
http://wiki.ros.org/turtlebot_navigation/Tutorials/Autonomously%20navigate%20in%20a%20known%20map
-->
<arg name="database_path" default=""/>
<arg name="database_path" default="rtabmap.db"/>
<arg name="localization" default="false"/>
<arg name="rgbd_odometry" default="false"/>
<arg name="args" default=""/>
+16 -1
View File
@@ -174,6 +174,14 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
configPath_ = uReplaceChar(configPath_, '~', UDirectory::homeDir());
databasePath_ = uReplaceChar(databasePath_, '~', UDirectory::homeDir());
if(configPath_.size() && configPath_.at(0) != '/')
{
configPath_ = UDirectory::currentDir(true) + configPath_;
}
if(databasePath_.size() && databasePath_.at(0) != '/')
{
databasePath_ = UDirectory::currentDir(true) + databasePath_;
}
// load parameters
parameters_ = loadParameters(configPath_);
@@ -316,7 +324,14 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
}
}
ROS_INFO("rtabmap: Using database from \"%s\".", databasePath_.c_str());
if(databasePath_.size())
{
ROS_INFO("rtabmap: Using database from \"%s\".", databasePath_.c_str());
}
else
{
ROS_INFO("rtabmap: database_path parameter not set, the map will not be saved.");
}
// Init RTAB-Map
rtabmap_.init(parameters_, databasePath_);