mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 08:47:45 +08:00
fixed empty database for demo_turtlebot_mapping.launch
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
http://wiki.ros.org/turtlebot_navigation/Tutorials/Autonomously%20navigate%20in%20a%20known%20map
|
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="localization" default="false"/>
|
||||||
<arg name="rgbd_odometry" default="false"/>
|
<arg name="rgbd_odometry" default="false"/>
|
||||||
<arg name="args" default=""/>
|
<arg name="args" default=""/>
|
||||||
|
|||||||
+16
-1
@@ -174,6 +174,14 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
|
|||||||
|
|
||||||
configPath_ = uReplaceChar(configPath_, '~', UDirectory::homeDir());
|
configPath_ = uReplaceChar(configPath_, '~', UDirectory::homeDir());
|
||||||
databasePath_ = uReplaceChar(databasePath_, '~', 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
|
// load parameters
|
||||||
parameters_ = loadParameters(configPath_);
|
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
|
// Init RTAB-Map
|
||||||
rtabmap_.init(parameters_, databasePath_);
|
rtabmap_.init(parameters_, databasePath_);
|
||||||
|
|||||||
Reference in New Issue
Block a user