-changed rtabmap service names publish_full_map_data -> publish_global_map_data and publish_current_map_data -> publish_local_map_data
-added demo_multi-session_mapping.launch 


git-svn-id: http://rtabmap.googlecode.com/svn/trunk/ros-pkg@1118 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-02-17 22:00:11 +00:00
parent 14e02c79af
commit 760d4e8545
6 changed files with 82 additions and 20 deletions
+8 -8
View File
@@ -158,7 +158,7 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
}
if(paused_)
{
UWARN("Node paused... dont' forget to call service \"pause_rtabmap\" to start rtabmap.");
UWARN("Node paused... dont' forget to call service \"resume\" to start rtabmap.");
}
// Init RTAB-Map
@@ -172,8 +172,8 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
pauseSrv_ = nh.advertiseService("pause", &CoreWrapper::pauseRtabmapCallback, this);
resumeSrv_ = nh.advertiseService("resume", &CoreWrapper::resumeRtabmapCallback, this);
triggerNewMapSrv_ = nh.advertiseService("trigger_new_map", &CoreWrapper::triggerNewMapCallback, this);
publishFullMapDataSrv_ = nh.advertiseService("publish_full_map_data", &CoreWrapper::publishFullMapDataCallback, this);
publishCurrentMapDataSrv_ = nh.advertiseService("publish_current_map_data", &CoreWrapper::publishCurrentMapDataCallback, this);
publishGlobalMapDataSrv_ = nh.advertiseService("publish_global_map_data", &CoreWrapper::publishGlobalMapDataCallback, this);
publishLocalMapDataSrv_ = nh.advertiseService("publish_local_map_data", &CoreWrapper::publishLocalMapDataCallback, this);
setupCallbacks(subscribeDepth, subscribeLaserScan, queueSize);
@@ -604,21 +604,21 @@ bool CoreWrapper::triggerNewMapCallback(std_srvs::Empty::Request&, std_srvs::Emp
return true;
}
bool CoreWrapper::publishFullMapDataCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&)
bool CoreWrapper::publishGlobalMapDataCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&)
{
publishMapData(true);
return true;
}
bool CoreWrapper::publishCurrentMapDataCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&)
bool CoreWrapper::publishLocalMapDataCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&)
{
publishMapData(false);
return true;
}
void CoreWrapper::publishMapData(bool full)
void CoreWrapper::publishMapData(bool global)
{
ROS_INFO("rtabmap: Publishing map data (full=%s)...", full?"true":"false");
ROS_INFO("rtabmap: Publishing map data (global=%s)...", global?"true":"false");
std::map<int, std::vector<unsigned char> > images;
std::map<int, std::vector<unsigned char> > depths;
std::map<int, std::vector<unsigned char> > depths2d;
@@ -640,7 +640,7 @@ void CoreWrapper::publishMapData(bool full)
poses,
constraints,
true,
full);
global);
int i=0;
+5 -5
View File
@@ -74,10 +74,10 @@ private:
bool pauseRtabmapCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
bool resumeRtabmapCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
bool triggerNewMapCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
bool publishFullMapDataCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
bool publishCurrentMapDataCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
bool publishGlobalMapDataCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
bool publishLocalMapDataCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&);
void publishMapData(bool full);
void publishMapData(bool global);
rtabmap::ParametersMap loadParameters(const std::string & configFile);
void saveParameters(const std::string & configFile);
@@ -138,8 +138,8 @@ private:
ros::ServiceServer pauseSrv_;
ros::ServiceServer resumeSrv_;
ros::ServiceServer triggerNewMapSrv_;
ros::ServiceServer publishFullMapDataSrv_;
ros::ServiceServer publishCurrentMapDataSrv_;
ros::ServiceServer publishGlobalMapDataSrv_;
ros::ServiceServer publishLocalMapDataSrv_;
boost::thread* transformThread_;
+1 -1
View File
@@ -39,7 +39,7 @@ class DataRecorderWrapper
{
public:
DataRecorderWrapper() :
fileName_(""),
fileName_("output.db"),
frameId_("base_link"),
depthScanSync_(0),
depthSync_(0),
+4 -4
View File
@@ -419,9 +419,9 @@ void GuiWrapper::handleEvent(UEvent * anEvent)
{
if(mapDataTopic_.getNumPublishers())
{
if(!ros::service::call("publish_current_map_data", srv))
if(!ros::service::call("publish_local_map_data", srv))
{
ROS_WARN("Can't call \"publish_current_map_data\" service");
ROS_WARN("Can't call \"publish_local_map_data\" service");
this->post(new RtabmapEvent3DMap(1)); // service error
}
}
@@ -435,9 +435,9 @@ void GuiWrapper::handleEvent(UEvent * anEvent)
{
if(mapDataTopic_.getNumPublishers())
{
if(!ros::service::call("publish_full_map_data", srv))
if(!ros::service::call("publish_global_map_data", srv))
{
ROS_WARN("Can't call \"publish_full_map_data\" service");
ROS_WARN("Can't call \"publish_global_map_data\" service");
this->post(new RtabmapEvent3DMap(1)); // service error
}
}