DBReader: publish landmarks by default (also added option to ignore them)

This commit is contained in:
matlabbe
2021-06-29 16:03:21 -04:00
parent 3da4bb9faa
commit 05d45872f3
5 changed files with 155 additions and 106 deletions

View File

@@ -53,7 +53,8 @@ public:
int startId = 0,
int cameraIndex = -1,
int stopId = 0,
bool intermediateNodesIgnored = false);
bool intermediateNodesIgnored = false,
bool landmarksIgnored = false);
DBReader(const std::list<std::string> & databasePaths,
float frameRate = 0.0f, // -1 = use Database stamps, 0 = inf
bool odometryIgnored = false,
@@ -62,7 +63,8 @@ public:
int startId = 0,
int cameraIndex = -1,
int stopId = 0,
bool intermediateNodesIgnored = false);
bool intermediateNodesIgnored = false,
bool landmarksIgnored = false);
virtual ~DBReader();
virtual bool init(
@@ -88,6 +90,7 @@ private:
int _stopId;
int _cameraIndex;
bool _intermediateNodesIgnored;
bool _landmarksIgnored;
DBDriver * _dbDriver;
UTimer _timer;

View File

@@ -59,7 +59,7 @@ public:
UASSERT_MSG(uIsFinite(covariance_.at<double>(4,4)) && covariance_.at<double>(4,4)>0, uFormat("Angular covariance should not be null! Value=%f (set to 9999 if unknown).", covariance_.at<double>(4,4)).c_str());
UASSERT_MSG(uIsFinite(covariance_.at<double>(5,5)) && covariance_.at<double>(5,5)>0, uFormat("Angular covariance should not be null! Value=%f (set to 9999 if unknown).", covariance_.at<double>(5,5)).c_str());
}
RTABMAP_DEPRECATED(Landmark(const int & id, const Transform & pose, const cv::Mat & covariance), "Use constructor with size instead.");
RTABMAP_DEPRECATED(Landmark(const int & id, const Transform & pose, const cv::Mat & covariance), "Use constructor with size=0 instead.");
virtual ~Landmark() {}