RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
OdometryInfo.h
1/*
2Copyright (c) 2010-2025, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of the Universite de Sherbrooke nor the
13 names of its contributors may be used to endorse or promote products
14 derived from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28#ifndef ODOMETRYINFO_H_
29#define ODOMETRYINFO_H_
30
31#include <rtabmap/core/rtabmap_core_export.h>
32#include <map>
33#include "rtabmap/core/Transform.h"
34#include "rtabmap/core/RegistrationInfo.h"
35#include "rtabmap/core/CameraModel.h"
36#include "rtabmap/core/LaserScan.h"
37#if CV_MAJOR_VERSION < 5
38#include <opencv2/features2d/features2d.hpp>
39#else
40#include <opencv2/features.hpp>
41#endif
42
43namespace rtabmap {
44
63class RTABMAP_CORE_EXPORT OdometryInfo
64{
65public:
74 std::map<std::string, float> statistics(const Transform & pose = Transform());
75
76 bool lost;
85 std::map<int, Transform> localBundlePoses;
86 std::map<int, std::vector<CameraModel> > localBundleModels;
89 std::vector<int> localBundleOutliersPerCam;
94 double stamp;
95 double interval;
105
106 int type;
107
108 // F2M
109 std::multimap<int, cv::KeyPoint> words;
110 std::map<int, cv::Point3f> localMap;
112
113 // F2F
114 std::vector<cv::Point2f> refCorners;
115 std::vector<cv::Point2f> newCorners;
116 std::vector<int> cornerInliers;
117};
118
119}
120
121#endif /* ODOMETRYINFO_H_ */
Represents 2D or 3D laser scan data with support for multiple point data formats.
Definition LaserScan.h:46
What one Odometry iteration produced, beyond the pose.
std::vector< cv::Point2f > newCorners
Where those corners were found in the current frame (F2F).
LaserScan localScanMap
Local scan map in the odometry frame (F2M).
RegistrationInfo reg
Registration result: matches, inliers, covariance, ICP indicators and timings.
std::vector< cv::Point2f > refCorners
Corners of the reference frame (F2F).
std::map< int, cv::Point3f > localMap
Local feature map in the odometry frame, by word id (F2M).
double interval
Time since the previous processed frame (s); the divisor for velocities.
std::map< std::string, float > statistics(const Transform &pose=Transform())
Formats the content as the Odometry/... statistics.
int localBundleConstraints
Feature observations kept by the last local bundle adjustment.
int localMapSize
Number of 3D points in the local feature map (F2M).
int localKeyFrames
Number of key frames forming the local map (F2M).
std::vector< int > cornerInliers
Indices in refCorners / newCorners kept as inliers (F2F).
float distanceTravelled
Distance travelled since the odometry was last reset (m).
int features
Number of features extracted in the current frame.
double gravityRollError
Absolute roll difference between the estimated pose and the IMU gravity (rad).
int localBundleMaxKeyFramesForInlier
Highest number of key frames observing a same inlier.
double stamp
Stamp of the processed frame.
Transform guess
Motion guess given to the front-end (from the velocity model, an external pose or an IMU).
float timeEstimation
Time spent estimating the motion (s).
float timeDeskewing
Time spent deskewing the laser scan (s).
double gravityPitchError
Absolute pitch difference between the estimated pose and the IMU gravity (rad).
bool keyFrameAdded
True if this frame became a key frame of the local map.
int localBundleOutliers
Features rejected by the last local bundle adjustment.
bool lost
True when the motion could not be estimated on this frame (transform is then null).
std::map< int, std::vector< CameraModel > > localBundleModels
Camera models of localBundlePoses.
float timeParticleFiltering
Time spent in the particle filter (s), when enabled.
std::vector< int > localBundleOutliersPerCam
Outliers of the last local bundle adjustment, per camera.
Transform transformGroundTruth
Ground truth motion since the previous frame, when the data provides it.
OdometryInfo copyWithoutData() const
A copy without the heavy members (features, local map, scan).
std::multimap< int, cv::KeyPoint > words
Keypoints of the current frame, by word id (F2M).
std::map< int, Transform > localBundlePoses
Key frame poses optimized by the local bundle adjustment.
Transform transformFiltered
transform after Kalman or particle filtering, when enabled.
int localScanMapSize
Number of points in the local scan map (F2M).
float localBundleAvgInlierDistance
Average distance of the bundle adjustment inliers (m).
int type
Odometry strategy that produced this, see Parameters::kOdomStrategy().
Transform transform
Motion since the previous frame, null when lost.
int memoryUsage
Process memory used (MB), only with Parameters::kRtabmapPublishRAMUsage().
float localBundleTime
Time spent in the local bundle adjustment (s).
Statistics and diagnostics returned by Registration.
Represents a 3D rigid body transformation (rotation + translation).
Definition Transform.h:53