mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
ros-pkg: added publish_map service to rtabmap node. Updated demo_find_object.launch with higher icp2d constraints
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/ros-pkg@1645 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
+14
-1
@@ -295,6 +295,13 @@ void GuiWrapper::processRequestedMap(const rtabmap::MapData & map)
|
||||
std::map<int, Transform> localTransforms;
|
||||
std::map<int, Transform> poses;
|
||||
std::multimap<int, Link> constraints;
|
||||
std::map<int, int> mapIds;
|
||||
|
||||
if(map.mapIDs.size() != map.maps.size())
|
||||
{
|
||||
ROS_WARN("rtabmapviz: receiving map... maps and IDs are not the same size (%d vs %d)!",
|
||||
(int)map.maps.size(), (int)map.mapIDs.size());
|
||||
}
|
||||
|
||||
if(map.imageIDs.size() != map.images.size())
|
||||
{
|
||||
@@ -349,6 +356,11 @@ void GuiWrapper::processRequestedMap(const rtabmap::MapData & map)
|
||||
(int)map.constraints.size(), (int)map.constraintFromIDs.size(), (int)map.constraintToIDs.size(), (int)map.constraintTypes.size());
|
||||
}
|
||||
|
||||
for(unsigned int i=0; i<map.mapIDs.size() && i < map.maps.size(); ++i)
|
||||
{
|
||||
mapIds.insert(std::make_pair(map.mapIDs[i], map.maps[i]));
|
||||
}
|
||||
|
||||
for(unsigned int i=0; i<map.imageIDs.size() && i < map.images.size(); ++i)
|
||||
{
|
||||
images.insert(std::make_pair(map.imageIDs[i], map.images[i].bytes));
|
||||
@@ -409,7 +421,8 @@ void GuiWrapper::processRequestedMap(const rtabmap::MapData & map)
|
||||
depthCys,
|
||||
localTransforms,
|
||||
poses,
|
||||
constraints));
|
||||
constraints,
|
||||
mapIds));
|
||||
}
|
||||
|
||||
void GuiWrapper::handleEvent(UEvent * anEvent)
|
||||
|
||||
Reference in New Issue
Block a user