mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-09 03:27:45 +08:00
Removed parameter Vis/ForwardEstOnly. Added odometry statistics (matches,inliers,inliersRatio) per camera. Added OdometryInfo::statistics() function for convenience.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
||||
Copyright (c) 2010-2025, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
@@ -40,64 +40,9 @@ namespace rtabmap {
|
||||
class OdometryInfo
|
||||
{
|
||||
public:
|
||||
OdometryInfo() :
|
||||
lost(true),
|
||||
features(0),
|
||||
localMapSize(0),
|
||||
localScanMapSize(0),
|
||||
localKeyFrames(0),
|
||||
localBundleOutliers(0),
|
||||
localBundleConstraints(0),
|
||||
localBundleTime(0),
|
||||
localBundleAvgInlierDistance(0.0f),
|
||||
localBundleMaxKeyFramesForInlier(0),
|
||||
keyFrameAdded(false),
|
||||
timeDeskewing(0.0f),
|
||||
timeEstimation(0.0f),
|
||||
timeParticleFiltering(0.0f),
|
||||
stamp(0),
|
||||
interval(0),
|
||||
distanceTravelled(0.0f),
|
||||
memoryUsage(0),
|
||||
gravityRollError(0.0),
|
||||
gravityPitchError(0.0),
|
||||
type(0)
|
||||
{}
|
||||
|
||||
OdometryInfo copyWithoutData() const
|
||||
{
|
||||
OdometryInfo output;
|
||||
output.lost = lost;
|
||||
output.reg = reg.copyWithoutData();
|
||||
output.features = features;
|
||||
output.localMapSize = localMapSize;
|
||||
output.localScanMapSize = localScanMapSize;
|
||||
output.localKeyFrames = localKeyFrames;
|
||||
output.localBundleOutliers = localBundleOutliers;
|
||||
output.localBundleConstraints = localBundleConstraints;
|
||||
output.localBundleTime = localBundleTime;
|
||||
output.localBundlePoses = localBundlePoses;
|
||||
output.localBundleModels = localBundleModels;
|
||||
output.localBundleAvgInlierDistance = localBundleAvgInlierDistance;
|
||||
output.localBundleMaxKeyFramesForInlier = localBundleMaxKeyFramesForInlier;
|
||||
output.keyFrameAdded = keyFrameAdded;
|
||||
output.timeDeskewing = timeDeskewing;
|
||||
output.timeEstimation = timeEstimation;
|
||||
output.timeParticleFiltering = timeParticleFiltering;
|
||||
output.stamp = stamp;
|
||||
output.interval = interval;
|
||||
output.transform = transform;
|
||||
output.transformFiltered = transformFiltered;
|
||||
output.transformGroundTruth = transformGroundTruth;
|
||||
output.guessVelocity = guessVelocity;
|
||||
output.guess = guess;
|
||||
output.distanceTravelled = distanceTravelled;
|
||||
output.memoryUsage = memoryUsage;
|
||||
output.gravityRollError = gravityRollError;
|
||||
output.gravityPitchError = gravityPitchError;
|
||||
output.type = type;
|
||||
return output;
|
||||
}
|
||||
OdometryInfo();
|
||||
OdometryInfo copyWithoutData() const;
|
||||
std::map<std::string, float> statistics(const Transform & pose = Transform());
|
||||
|
||||
bool lost;
|
||||
RegistrationInfo reg;
|
||||
@@ -112,6 +57,7 @@ public:
|
||||
std::map<int, std::vector<CameraModel> > localBundleModels;
|
||||
float localBundleAvgInlierDistance;
|
||||
int localBundleMaxKeyFramesForInlier;
|
||||
std::vector<int> localBundleOutliersPerCam;
|
||||
bool keyFrameAdded;
|
||||
float timeDeskewing;
|
||||
float timeEstimation;
|
||||
|
||||
@@ -678,7 +678,6 @@ class RTABMAP_CORE_EXPORT Parameters
|
||||
|
||||
// Visual registration parameters
|
||||
RTABMAP_PARAM(Vis, EstimationType, int, 1, "Motion estimation approach: 0:3D->3D, 1:3D->2D (PnP), 2:2D->2D (Epipolar Geometry)");
|
||||
RTABMAP_PARAM(Vis, ForwardEstOnly, bool, true, "Forward estimation only (A->B). If false, a transformation is also computed in backward direction (B->A), then the two resulting transforms are merged (middle interpolation between the transforms).");
|
||||
RTABMAP_PARAM(Vis, InlierDistance, float, 0.1, uFormat("[%s = 0] Maximum distance for feature correspondences. Used by 3D->3D estimation approach.", kVisEstimationType().c_str()));
|
||||
RTABMAP_PARAM(Vis, RefineIterations, int, 5, uFormat("[%s = 0] Number of iterations used to refine the transformation found by RANSAC. 0 means that the transformation is not refined.", kVisEstimationType().c_str()));
|
||||
RTABMAP_PARAM(Vis, PnPReprojError, float, 2, uFormat("[%s = 1] PnP reprojection error.", kVisEstimationType().c_str()));
|
||||
|
||||
@@ -59,9 +59,11 @@ public:
|
||||
output.covariance = covariance.clone();
|
||||
output.rejectedMsg = rejectedMsg;
|
||||
output.inliers = inliers;
|
||||
output.inliersPerCam = inliersPerCam;
|
||||
output.inliersMeanDistance = inliersMeanDistance;
|
||||
output.inliersDistribution = inliersDistribution;
|
||||
output.matches = matches;
|
||||
output.matchesPerCam = matchesPerCam;
|
||||
output.icpInliersRatio = icpInliersRatio;
|
||||
output.icpTranslation = icpTranslation;
|
||||
output.icpRotation = icpRotation;
|
||||
@@ -85,6 +87,8 @@ public:
|
||||
int matches;
|
||||
std::vector<int> matchesIDs;
|
||||
std::vector<int> projectedIDs; // "From" IDs
|
||||
std::vector<int> inliersPerCam;
|
||||
std::vector<int> matchesPerCam;
|
||||
|
||||
// RegistrationIcp
|
||||
float icpInliersRatio;
|
||||
|
||||
@@ -78,7 +78,6 @@ private:
|
||||
int _refineIterations;
|
||||
float _epipolarGeometryVar;
|
||||
int _estimationType;
|
||||
bool _forwardEstimateOnly;
|
||||
float _PnPReprojError;
|
||||
int _PnPFlags;
|
||||
int _PnPRefineIterations;
|
||||
|
||||
@@ -76,6 +76,25 @@ Transform RTABMAP_CORE_EXPORT estimateMotion3DTo2D(
|
||||
std::vector<int> * inliersOut = 0,
|
||||
bool splitLinearCovarianceComponents = false);
|
||||
|
||||
Transform estimateMotion3DTo2D(
|
||||
const std::map<int, cv::Point3f> & words3A,
|
||||
const std::map<int, cv::KeyPoint> & words2B,
|
||||
const std::vector<CameraModel> & cameraModels,
|
||||
unsigned int samplingPolicy,
|
||||
int minInliers,
|
||||
int iterations,
|
||||
double reprojError,
|
||||
int flagsPnP,
|
||||
int refineIterations,
|
||||
int varianceMedianRatio,
|
||||
float maxVariance,
|
||||
const Transform & guess,
|
||||
const std::map<int, cv::Point3f> & words3B,
|
||||
cv::Mat * covariance,
|
||||
std::vector<std::vector<int> > * matchesOut,
|
||||
std::vector<std::vector<int> > * inliersOut,
|
||||
bool splitLinearCovarianceComponents);
|
||||
|
||||
Transform RTABMAP_CORE_EXPORT estimateMotion3DTo3D(
|
||||
const std::map<int, cv::Point3f> & words3A,
|
||||
const std::map<int, cv::Point3f> & words3B,
|
||||
|
||||
Reference in New Issue
Block a user