mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Features2D: set GFTT/ORB by default if GFTT/BRIEF is not available. RealSense2: fixed T265 local pose frame (when using realsense vio)
This commit is contained in:
@@ -422,11 +422,11 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
|
|||||||
if(type == Feature2D::kFeatureSurf || type == Feature2D::kFeatureSift)
|
if(type == Feature2D::kFeatureSurf || type == Feature2D::kFeatureSift)
|
||||||
{
|
{
|
||||||
#if CV_MAJOR_VERSION < 3
|
#if CV_MAJOR_VERSION < 3
|
||||||
UWARN("SURF and SIFT features cannot be used because OpenCV was not built with nonfree module. ORB is used instead.");
|
UWARN("SURF and SIFT features cannot be used because OpenCV was not built with nonfree module. GFTT/ORB is used instead.");
|
||||||
#else
|
#else
|
||||||
UWARN("SURF and SIFT features cannot be used because OpenCV was not built with xfeatures2d module. ORB is used instead.");
|
UWARN("SURF and SIFT features cannot be used because OpenCV was not built with xfeatures2d module. GFTT/ORB is used instead.");
|
||||||
#endif
|
#endif
|
||||||
type = Feature2D::kFeatureOrb;
|
type = Feature2D::kFeatureGfttOrb;
|
||||||
}
|
}
|
||||||
#if CV_MAJOR_VERSION == 3
|
#if CV_MAJOR_VERSION == 3
|
||||||
if(type == Feature2D::kFeatureFastBrief ||
|
if(type == Feature2D::kFeatureFastBrief ||
|
||||||
@@ -434,8 +434,8 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
|
|||||||
type == Feature2D::kFeatureGfttBrief ||
|
type == Feature2D::kFeatureGfttBrief ||
|
||||||
type == Feature2D::kFeatureGfttFreak)
|
type == Feature2D::kFeatureGfttFreak)
|
||||||
{
|
{
|
||||||
UWARN("BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. ORB is used instead.");
|
UWARN("BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. GFTT/ORB is used instead.");
|
||||||
type = Feature2D::kFeatureOrb;
|
type = Feature2D::kFeatureGfttOrb;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -447,8 +447,8 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
|
|||||||
UWARN("KAZE detector/descriptor can be used only with OpenCV3. SURF is used instead.");
|
UWARN("KAZE detector/descriptor can be used only with OpenCV3. SURF is used instead.");
|
||||||
type = Feature2D::kFeatureSurf;
|
type = Feature2D::kFeatureSurf;
|
||||||
#else
|
#else
|
||||||
UWARN("KAZE detector/descriptor can be used only with OpenCV3. ORB is used instead.");
|
UWARN("KAZE detector/descriptor can be used only with OpenCV3. GFTT/ORB is used instead.");
|
||||||
type = Feature2D::kFeatureOrb;
|
type = Feature2D::kFeatureGfttOrb;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -456,8 +456,8 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
|
|||||||
#ifndef RTABMAP_ORB_OCTREE
|
#ifndef RTABMAP_ORB_OCTREE
|
||||||
if(type == Feature2D::kFeatureOrbOctree)
|
if(type == Feature2D::kFeatureOrbOctree)
|
||||||
{
|
{
|
||||||
UWARN("ORB OcTree feature cannot be used as RTAB-Map is not built with the option enabled. ORB is used instead.");
|
UWARN("ORB OcTree feature cannot be used as RTAB-Map is not built with the option enabled. GFTT/ORB is used instead.");
|
||||||
type = Feature2D::kFeatureOrb;
|
type = Feature2D::kFeatureGfttOrb;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -931,8 +931,8 @@ bool CameraRealSense2::init(const std::string & calibrationFolder, const std::st
|
|||||||
UINFO("poseToIMU = %s", poseToIMUT.prettyPrint().c_str());
|
UINFO("poseToIMU = %s", poseToIMUT.prettyPrint().c_str());
|
||||||
|
|
||||||
UINFO("Set base to pose");
|
UINFO("Set base to pose");
|
||||||
this->setLocalTransform(this->getLocalTransform()*poseToLeftT.inverse());
|
Transform opticalTransform(0, 0, 1, 0, -1, 0, 0, 0, 0, -1, 0, 0);
|
||||||
|
this->setLocalTransform(this->getLocalTransform() * opticalTransform.inverse());
|
||||||
stereoModel_.setLocalTransform(this->getLocalTransform()*poseToLeftT);
|
stereoModel_.setLocalTransform(this->getLocalTransform()*poseToLeftT);
|
||||||
imuLocalTransform_ = this->getLocalTransform()* poseToIMUT;
|
imuLocalTransform_ = this->getLocalTransform()* poseToIMUT;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user