31#include "rtabmap/core/rtabmap_core_export.h"
33#include <rtabmap/core/Transform.h>
34#include <opencv2/core/core.hpp>
54class RTABMAP_CORE_EXPORT
Link
77 kAllWithLandmarks = 98,
78 kAllWithoutLandmarks = 99,
100 const cv::Mat & infMatrix = cv::Mat::eye(6,6,CV_64FC1),
101 const cv::Mat & userData = cv::Mat());
104 bool isValid()
const {
return from_ != 0 && to_ != 0 && !transform_.isNull() && type_!=kUndef;}
107 int from()
const {
return from_;}
109 int to()
const {
return to_;}
114 std::string typeName()
const {
return typeName(type_);}
115 const cv::Mat & infMatrix()
const {
return infMatrix_;}
129 void setFrom(
int from) {from_ = from;}
130 void setTo(
int to) {to_ = to;}
131 void setTransform(
const Transform & transform) {transform_ = transform;}
132 void setType(Type type) {type_ = type;}
169 cv::Mat _userDataCompressed;
170 cv::Mat _userDataRaw;
Directed constraint between two nodes in RTAB-Map's pose graph.
double rotVariance(bool minimum=true) const
Rotation variance derived from the information matrix diagonal (roll, pitch, yaw).
static std::string typeName(Type type)
const cv::Mat & userDataRaw() const
Link()
Default constructor; creates an invalid link (kUndef).
void setInfMatrix(const cv::Mat &infMatrix)
Sets the 6x6 information matrix (CV_64FC1); diagonal entries must be positive and finite.
double transVariance(bool minimum=true) const
Translation variance derived from the information matrix diagonal (x, y, z).
const Transform & transform() const
Link(int from, int to, Type type, const Transform &transform, const cv::Mat &infMatrix=cv::Mat::eye(6, 6, CV_64FC1), const cv::Mat &userData=cv::Mat())
Constructs a link between two nodes.
Type
Link category and filter sentinels.
Link merge(const Link &link, Type outputType) const
Chains this link (from → to) with link (to → link.to).
const cv::Mat & userDataCompressed() const
cv::Mat uncompressUserDataConst() const
void uncompressUserData()
Decompresses user data into userDataRaw() if compressed data is stored.