DBViewer: added feature/line color menu option. CameraImages/DBReader: added maxFrames parameter

This commit is contained in:
matlabbe
2019-04-26 19:20:35 -04:00
parent cd2c261e2b
commit 195f6147ad
12 changed files with 373 additions and 129 deletions

View File

@@ -51,14 +51,16 @@ public:
bool ignoreGoalDelay = false,
bool goalsIgnored = false,
int startIndex = 0,
int cameraIndex = -1);
int cameraIndex = -1,
int maxFrames = 0);
DBReader(const std::list<std::string> & databasePaths,
float frameRate = 0.0f, // -1 = use Database stamps, 0 = inf
bool odometryIgnored = false,
bool ignoreGoalDelay = false,
bool goalsIgnored = false,
int startIndex = 0,
int cameraIndex = -1);
int cameraIndex = -1,
int maxFrames = 0);
virtual ~DBReader();
virtual bool init(
@@ -81,6 +83,7 @@ private:
bool _ignoreGoalDelay;
bool _goalsIgnored;
int _startIndex;
int _maxFrames;
int _cameraIndex;
DBDriver * _dbDriver;
@@ -92,6 +95,7 @@ private:
double _previousStamp;
int _previousMapID;
bool _calibrated;
int _framesPublished;
};
} /* namespace rtabmap */

View File

@@ -62,6 +62,7 @@ public:
void setPath(const std::string & dir) {_path=dir;}
virtual void setStartIndex(int index) {_startAt = index;} // negative means last
virtual void setMaxFrames(int value) {_maxFrames = value;}
void setDirRefreshed(bool enabled) {_refreshDir = enabled;}
void setImagesRectified(bool enabled) {_rectifyImages = enabled;}
void setBayerMode(int mode) {_bayerMode = mode;} // -1=disabled (default) 0=BayerBG, 1=BayerGB, 2=BayerRG, 3=BayerGR
@@ -125,6 +126,7 @@ protected:
private:
std::string _path;
int _startAt;
int _maxFrames;
// If the list of files in the directory is refreshed
// on each call of takeImage()
bool _refreshDir;
@@ -133,6 +135,7 @@ private:
bool _isDepth;
float _depthScaleFactor;
int _count;
int _framesPublished;
UDirectory * _dir;
std::string _lastFileName;

View File

@@ -52,6 +52,7 @@ public:
virtual std::string getSerial() const;
virtual void setStartIndex(int index) {CameraImages::setStartIndex(index);cameraDepth_.setStartIndex(index);} // negative means last
virtual void setMaxFrames(int value) {CameraImages::setMaxFrames(value);cameraDepth_.setMaxFrames(value);}
protected:
virtual SensorData captureImage(CameraInfo * info = 0);

View File

@@ -62,6 +62,7 @@ public:
virtual std::string getSerial() const;
virtual void setStartIndex(int index) {CameraImages::setStartIndex(index);camera2_->setStartIndex(index);} // negative means last
virtual void setMaxFrames(int value) {CameraImages::setMaxFrames(value);camera2_->setMaxFrames(value);}
protected:
virtual SensorData captureImage(CameraInfo * info = 0);