|
RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
|
Directed constraint between two nodes in RTAB-Map's pose graph. More...
#include <Link.h>
Public Types | |
| enum | Type { kNeighbor , kGlobalClosure , kLocalSpaceClosure , kLocalTimeClosure , kUserClosure , kVirtualClosure , kNeighborMerged , kPosePrior , kLandmark , kGravity , kEnd , kSelfRefLink = 97 , kAllWithLandmarks = 98 , kAllWithoutLandmarks = 99 , kUndef = 99 } |
| Link category and filter sentinels. More... | |
Public Member Functions | |
| Link () | |
| Default constructor; creates an invalid link (kUndef). | |
| 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. | |
| bool | isValid () const |
| int | from () const |
| int | to () const |
| const Transform & | transform () const |
| Type | type () const |
| std::string | typeName () const |
| const cv::Mat & | infMatrix () const |
| double | rotVariance (bool minimum=true) const |
| Rotation variance derived from the information matrix diagonal (roll, pitch, yaw). | |
| double | transVariance (bool minimum=true) const |
| Translation variance derived from the information matrix diagonal (x, y, z). | |
| void | setFrom (int from) |
| void | setTo (int to) |
| void | setTransform (const Transform &transform) |
| void | setType (Type type) |
| void | setInfMatrix (const cv::Mat &infMatrix) |
Sets the 6x6 information matrix (CV_64FC1); diagonal entries must be positive and finite. | |
| const cv::Mat & | userDataRaw () const |
| const cv::Mat & | userDataCompressed () const |
| void | uncompressUserData () |
| Decompresses user data into userDataRaw() if compressed data is stored. | |
| cv::Mat | uncompressUserDataConst () const |
| Link | merge (const Link &link, Type outputType) const |
Chains this link (from → to) with link (to → link.to). | |
| Link | inverse () const |
Static Public Member Functions | |
| static std::string | typeName (Type type) |
Directed constraint between two nodes in RTAB-Map's pose graph.
A link connects signature from() to signature to() with a relative Transform and an information matrix (inverse covariance) used by graph optimization. Links are stored on Signature objects and persisted in the database; they define odometry chains, loop closures, landmarks, and priors.
The transform is expressed from the from node frame to the to node frame (i.e. pose of to relative to from), unless type() indicates a special semantics (e.g. kPosePrior, kLandmark).
| enum rtabmap::Link::Type |
Link category and filter sentinels.
Values kSelfRefLink, kAllWithLandmarks, kAllWithoutLandmarks and kUndef are also used as query filters when retrieving links from memory or the database (they are not stored as link types on signatures).
| Enumerator | |
|---|---|
| kNeighbor | Sequential odometry link between consecutive nodes. |
| kGlobalClosure | Global loop closure added by global loop closure detection (i.e., using bags-of-words to find loop closures with other nodes in WM without using current estimated pose). |
| kLocalSpaceClosure | Local loop closure added by proximity detection by space (i.e. using current estimated pose to find loop closures with nearby nodes in WM). |
| kLocalTimeClosure | Local loop closure added by proximity detection by time (i.e. between nodes in STM). |
| kUserClosure | User-defined loop closure constraint. |
| kVirtualClosure | Virtual link added to keep the path linked to local map. |
| kNeighborMerged | Merged neighbor link after graph reduction. |
| kPosePrior | Absolute pose prior in the world frame ( |
| kLandmark | Observation of a landmark: |
| kGravity | Gravity direction constraint on the base frame ( |
| kEnd | Sentinel: number of link types that can be stored. |
| kSelfRefLink | Filter: links where |
| kAllWithLandmarks | Filter: all link types including kLandmark. |
| kAllWithoutLandmarks | Filter: all link types except kLandmark. |
| kUndef | Undefined type or invalid link. |
| rtabmap::Link::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.
|
static |
type (e.g. "Neighbor", "GlobalClosure").
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| double rtabmap::Link::rotVariance | ( | bool | minimum = true | ) | const |
Rotation variance derived from the information matrix diagonal (roll, pitch, yaw).
| minimum | If true, returns the largest diagonal entry (most uncertain axis); if false, returns the smallest non-zero entry. |
| double rtabmap::Link::transVariance | ( | bool | minimum = true | ) | const |
Translation variance derived from the information matrix diagonal (x, y, z).
| minimum | If true, returns the largest diagonal entry; if false, the smallest non-zero entry. |
|
inline |
|
inline |
|
inline |
| cv::Mat rtabmap::Link::uncompressUserDataConst | ( | ) | const |
Chains this link (from → to) with link (to → link.to).
| link | Second link; must satisfy this->to() == link.from(). |
| outputType | Type of the merged link. |
link.to() with transform (T_{ac} = T_{ab} T_{bc}) (or null if either input transform is null). Information matrix handling depends on outputType: link unless (\Omega_{ab}(0,0) < \Omega_{bc}(0,0)) (i.e. the smaller x information entry).