mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Added c++ example of RTAB-Map RGB-D version
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1152 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -66,10 +66,13 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
RtabmapThread();
|
||||
// take ownership
|
||||
RtabmapThread(Rtabmap * rtabmap);
|
||||
virtual ~RtabmapThread();
|
||||
|
||||
void clearBufferedData();
|
||||
void setDetectorRate(float rate);
|
||||
void setBufferSize(int bufferSize);
|
||||
|
||||
protected:
|
||||
virtual void handleEvent(UEvent * anEvent);
|
||||
|
||||
@@ -33,14 +33,15 @@
|
||||
|
||||
namespace rtabmap {
|
||||
|
||||
RtabmapThread::RtabmapThread() :
|
||||
RtabmapThread::RtabmapThread(Rtabmap * rtabmap) :
|
||||
_imageBufferMaxSize(Parameters::defaultRtabmapImageBufferSize()),
|
||||
_rate(Parameters::defaultRtabmapDetectionRate()),
|
||||
_frameRateTimer(new UTimer()),
|
||||
_rtabmap(new Rtabmap()),
|
||||
_rtabmap(rtabmap),
|
||||
_paused(false)
|
||||
|
||||
{
|
||||
UASSERT(rtabmap != 0);
|
||||
}
|
||||
|
||||
RtabmapThread::~RtabmapThread()
|
||||
@@ -77,6 +78,18 @@ void RtabmapThread::clearBufferedData()
|
||||
_imageMutex.unlock();
|
||||
}
|
||||
|
||||
void RtabmapThread::setDetectorRate(float rate)
|
||||
{
|
||||
UASSERT(rate >= 0.0f);
|
||||
_rate = rate;
|
||||
}
|
||||
|
||||
void RtabmapThread::setBufferSize(int bufferSize)
|
||||
{
|
||||
UASSERT(bufferSize >= 0);
|
||||
_imageBufferMaxSize = bufferSize;
|
||||
}
|
||||
|
||||
void RtabmapThread::publishMap(bool optimized, bool full) const
|
||||
{
|
||||
std::map<int, std::vector<unsigned char> > images;
|
||||
|
||||
Reference in New Issue
Block a user