mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
Added mapIds to rtabmap::get3DMap()
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1644 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -115,6 +115,7 @@ public:
|
|||||||
std::map<int, Transform> & localTransforms,
|
std::map<int, Transform> & localTransforms,
|
||||||
std::map<int, Transform> & poses,
|
std::map<int, Transform> & poses,
|
||||||
std::multimap<int, Link> & constraints,
|
std::multimap<int, Link> & constraints,
|
||||||
|
std::map<int, int> & mapIds,
|
||||||
bool optimized,
|
bool optimized,
|
||||||
bool global) const;
|
bool global) const;
|
||||||
void getGraph(std::map<int, Transform> & poses,
|
void getGraph(std::map<int, Transform> & poses,
|
||||||
|
|||||||
@@ -161,7 +161,8 @@ public:
|
|||||||
const std::map<int, float> & depthCys,
|
const std::map<int, float> & depthCys,
|
||||||
const std::map<int, Transform> & localTransforms,
|
const std::map<int, Transform> & localTransforms,
|
||||||
const std::map<int, Transform> & poses,
|
const std::map<int, Transform> & poses,
|
||||||
const std::multimap<int, Link> & constraints) :
|
const std::multimap<int, Link> & constraints,
|
||||||
|
const std::map<int, int> & mapIds) :
|
||||||
UEvent(0),
|
UEvent(0),
|
||||||
_images(images),
|
_images(images),
|
||||||
_depths(depths),
|
_depths(depths),
|
||||||
@@ -172,7 +173,8 @@ public:
|
|||||||
_depthCys(depthCys),
|
_depthCys(depthCys),
|
||||||
_localTransforms(localTransforms),
|
_localTransforms(localTransforms),
|
||||||
_poses(poses),
|
_poses(poses),
|
||||||
_constraints(constraints)
|
_constraints(constraints),
|
||||||
|
_mapIds(mapIds)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~RtabmapEvent3DMap() {}
|
virtual ~RtabmapEvent3DMap() {}
|
||||||
@@ -187,6 +189,7 @@ public:
|
|||||||
const std::map<int, Transform> & getLocalTransforms() const {return _localTransforms;}
|
const std::map<int, Transform> & getLocalTransforms() const {return _localTransforms;}
|
||||||
const std::map<int, Transform> & getPoses() const {return _poses;}
|
const std::map<int, Transform> & getPoses() const {return _poses;}
|
||||||
const std::multimap<int, Link> & getConstraints() const {return _constraints;}
|
const std::multimap<int, Link> & getConstraints() const {return _constraints;}
|
||||||
|
const std::map<int, int> & getMapIds() const {return _mapIds;}
|
||||||
|
|
||||||
virtual std::string getClassName() const {return std::string("RtabmapEvent3DMap");}
|
virtual std::string getClassName() const {return std::string("RtabmapEvent3DMap");}
|
||||||
|
|
||||||
@@ -201,6 +204,7 @@ private:
|
|||||||
std::map<int, Transform> _localTransforms;
|
std::map<int, Transform> _localTransforms;
|
||||||
std::map<int, Transform> _poses;
|
std::map<int, Transform> _poses;
|
||||||
std::multimap<int, Link> _constraints;
|
std::multimap<int, Link> _constraints;
|
||||||
|
std::map<int, int> _mapIds;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace rtabmap
|
} // namespace rtabmap
|
||||||
|
|||||||
@@ -2177,6 +2177,7 @@ void Rtabmap::get3DMap(std::map<int, std::vector<unsigned char> > & images,
|
|||||||
std::map<int, Transform> & localTransforms,
|
std::map<int, Transform> & localTransforms,
|
||||||
std::map<int, Transform> & poses,
|
std::map<int, Transform> & poses,
|
||||||
std::multimap<int, Link> & constraints,
|
std::multimap<int, Link> & constraints,
|
||||||
|
std::map<int, int> & mapIds,
|
||||||
bool optimized,
|
bool optimized,
|
||||||
bool global) const
|
bool global) const
|
||||||
{
|
{
|
||||||
@@ -2229,6 +2230,8 @@ void Rtabmap::get3DMap(std::map<int, std::vector<unsigned char> > & images,
|
|||||||
{
|
{
|
||||||
localTransforms.insert(std::make_pair(*iter, localTransform));
|
localTransforms.insert(std::make_pair(*iter, localTransform));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mapIds.insert(std::make_pair(*iter, _memory->getMapId(*iter)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ void RtabmapThread::publishMap(bool optimized, bool full) const
|
|||||||
std::map<int, Transform> localTransforms;
|
std::map<int, Transform> localTransforms;
|
||||||
std::map<int, Transform> poses;
|
std::map<int, Transform> poses;
|
||||||
std::multimap<int, Link> constraints;
|
std::multimap<int, Link> constraints;
|
||||||
|
std::map<int, int> mapIds;
|
||||||
|
|
||||||
_rtabmap->get3DMap(images,
|
_rtabmap->get3DMap(images,
|
||||||
depths,
|
depths,
|
||||||
@@ -121,6 +122,7 @@ void RtabmapThread::publishMap(bool optimized, bool full) const
|
|||||||
localTransforms,
|
localTransforms,
|
||||||
poses,
|
poses,
|
||||||
constraints,
|
constraints,
|
||||||
|
mapIds,
|
||||||
optimized,
|
optimized,
|
||||||
full);
|
full);
|
||||||
|
|
||||||
@@ -133,7 +135,8 @@ void RtabmapThread::publishMap(bool optimized, bool full) const
|
|||||||
depthCys,
|
depthCys,
|
||||||
localTransforms,
|
localTransforms,
|
||||||
poses,
|
poses,
|
||||||
constraints));
|
constraints,
|
||||||
|
mapIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RtabmapThread::publishTOROGraph(bool optimized, bool full) const
|
void RtabmapThread::publishTOROGraph(bool optimized, bool full) const
|
||||||
@@ -148,6 +151,7 @@ void RtabmapThread::publishTOROGraph(bool optimized, bool full) const
|
|||||||
std::map<int, Transform> localTransforms;
|
std::map<int, Transform> localTransforms;
|
||||||
std::map<int, Transform> poses;
|
std::map<int, Transform> poses;
|
||||||
std::multimap<int, Link> constraints;
|
std::multimap<int, Link> constraints;
|
||||||
|
std::map<int, int> mapIds;
|
||||||
|
|
||||||
_rtabmap->getGraph(poses,
|
_rtabmap->getGraph(poses,
|
||||||
constraints,
|
constraints,
|
||||||
@@ -163,7 +167,8 @@ void RtabmapThread::publishTOROGraph(bool optimized, bool full) const
|
|||||||
depthCys,
|
depthCys,
|
||||||
localTransforms,
|
localTransforms,
|
||||||
poses,
|
poses,
|
||||||
constraints));
|
constraints,
|
||||||
|
mapIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user