mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 08:47:45 +08:00
Refactoring: Split Odometry classes in multiple headers. Added Odometry::create(type) for convenience, working with "Odom/Strategy" parameter. Renamed OdometryBOW to OdometryLocalMap (more descriptive name).
This commit is contained in:
@@ -33,22 +33,25 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/core/Transform.h>
|
#include <rtabmap/core/Transform.h>
|
||||||
#include <rtabmap/core/SensorData.h>
|
#include <rtabmap/core/SensorData.h>
|
||||||
#include <rtabmap/core/Parameters.h>
|
#include <rtabmap/core/Parameters.h>
|
||||||
#include <rtabmap/core/Signature.h>
|
|
||||||
#include <rtabmap/core/RegistrationVis.h>
|
|
||||||
#include <pcl/point_types.h>
|
|
||||||
#include <pcl/point_cloud.h>
|
|
||||||
|
|
||||||
class UTimer;
|
|
||||||
|
|
||||||
namespace rtabmap {
|
namespace rtabmap {
|
||||||
|
|
||||||
class Feature2D;
|
|
||||||
class OdometryInfo;
|
class OdometryInfo;
|
||||||
class ParticleFilter;
|
class ParticleFilter;
|
||||||
class Stereo;
|
|
||||||
|
|
||||||
class RTABMAP_EXP Odometry
|
class RTABMAP_EXP Odometry
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
enum Type {
|
||||||
|
kTypeUndef = -1,
|
||||||
|
kTypeLocalMap = 0,
|
||||||
|
kTypeF2F = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
static Odometry * create(const ParametersMap & parameters);
|
||||||
|
static Odometry * create(Type & type, const ParametersMap & parameters);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~Odometry();
|
virtual ~Odometry();
|
||||||
Transform process(const SensorData & data, OdometryInfo * info = 0);
|
Transform process(const SensorData & data, OdometryInfo * info = 0);
|
||||||
@@ -116,116 +119,5 @@ protected:
|
|||||||
Odometry(const rtabmap::ParametersMap & parameters);
|
Odometry(const rtabmap::ParametersMap & parameters);
|
||||||
};
|
};
|
||||||
|
|
||||||
class Memory;
|
|
||||||
|
|
||||||
class RTABMAP_EXP OdometryBOW : public Odometry
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
OdometryBOW(const rtabmap::ParametersMap & parameters = rtabmap::ParametersMap());
|
|
||||||
virtual ~OdometryBOW();
|
|
||||||
|
|
||||||
virtual void reset(const Transform & initialPose = Transform::getIdentity());
|
|
||||||
const std::map<int, cv::Point3f> & getLocalMap() const {return localMap_;}
|
|
||||||
const Memory * getMemory() const {return _memory;}
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual Transform computeTransform(const SensorData & image, OdometryInfo * info = 0);
|
|
||||||
|
|
||||||
private:
|
|
||||||
//Parameters
|
|
||||||
int _localHistoryMaxSize;
|
|
||||||
std::string _fixedLocalMapPath;
|
|
||||||
|
|
||||||
Memory * _memory;
|
|
||||||
std::map<int, cv::Point3f> localMap_;
|
|
||||||
};
|
|
||||||
|
|
||||||
class RTABMAP_EXP OdometryF2F : public Odometry
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
OdometryF2F(const rtabmap::ParametersMap & parameters = rtabmap::ParametersMap());
|
|
||||||
virtual ~OdometryF2F();
|
|
||||||
|
|
||||||
virtual void reset(const Transform & initialPose = Transform::getIdentity());
|
|
||||||
|
|
||||||
const Signature & getRefFrame() const {return refFrame_;}
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual Transform computeTransform(const SensorData & image, OdometryInfo * info = 0);
|
|
||||||
|
|
||||||
private:
|
|
||||||
//Parameters:
|
|
||||||
int keyFrameThr_;
|
|
||||||
bool guessFromMotion_;
|
|
||||||
|
|
||||||
RegistrationVis registration_;
|
|
||||||
Signature refFrame_;
|
|
||||||
Transform motionSinceLastKeyFrame_;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class RTABMAP_EXP OdometryMono : public Odometry
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
OdometryMono(const rtabmap::ParametersMap & parameters = rtabmap::ParametersMap());
|
|
||||||
virtual ~OdometryMono();
|
|
||||||
virtual void reset(const Transform & initialPose);
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual Transform computeTransform(const SensorData & data, OdometryInfo * info = 0);
|
|
||||||
private:
|
|
||||||
//Parameters:
|
|
||||||
int flowWinSize_;
|
|
||||||
int flowIterations_;
|
|
||||||
double flowEps_;
|
|
||||||
int flowMaxLevel_;
|
|
||||||
|
|
||||||
Stereo * stereo_;
|
|
||||||
|
|
||||||
Memory * memory_;
|
|
||||||
int localHistoryMaxSize_;
|
|
||||||
float initMinFlow_;
|
|
||||||
float initMinTranslation_;
|
|
||||||
float minTranslation_;
|
|
||||||
float fundMatrixReprojError_;
|
|
||||||
float fundMatrixConfidence_;
|
|
||||||
|
|
||||||
cv::Mat refDepthOrRight_;
|
|
||||||
std::map<int, cv::Point2f> cornersMap_;
|
|
||||||
std::map<int, cv::Point3f> localMap_;
|
|
||||||
std::map<int, std::map<int, cv::Point3f> > keyFrameWords3D_;
|
|
||||||
std::map<int, Transform> keyFramePoses_;
|
|
||||||
float maxVariance_;
|
|
||||||
};
|
|
||||||
|
|
||||||
class RTABMAP_EXP OdometryICP : public Odometry
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
OdometryICP(int decimation = 4,
|
|
||||||
float voxelSize = 0.005f,
|
|
||||||
int samples = 0,
|
|
||||||
float maxCorrespondenceDistance = 0.05f,
|
|
||||||
int maxIterations = 30,
|
|
||||||
float correspondenceRatio = 0.7f,
|
|
||||||
bool pointToPlane = true,
|
|
||||||
const ParametersMap & odometryParameter = rtabmap::ParametersMap());
|
|
||||||
virtual void reset(const Transform & initialPose = Transform::getIdentity());
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual Transform computeTransform(const SensorData & image, OdometryInfo * info = 0);
|
|
||||||
|
|
||||||
private:
|
|
||||||
int _decimation;
|
|
||||||
float _voxelSize;
|
|
||||||
float _samples;
|
|
||||||
float _maxCorrespondenceDistance;
|
|
||||||
int _maxIterations;
|
|
||||||
float _correspondenceRatio;
|
|
||||||
bool _pointToPlane;
|
|
||||||
|
|
||||||
pcl::PointCloud<pcl::PointNormal>::Ptr _previousCloudNormal; // for point ot plane
|
|
||||||
pcl::PointCloud<pcl::PointXYZ>::Ptr _previousCloud; // for point to point
|
|
||||||
};
|
|
||||||
|
|
||||||
} /* namespace rtabmap */
|
} /* namespace rtabmap */
|
||||||
#endif /* ODOMETRY_H_ */
|
#endif /* ODOMETRY_H_ */
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2010-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the Universite de Sherbrooke nor the
|
||||||
|
names of its contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ODOMETRYF2F_H_
|
||||||
|
#define ODOMETRYF2F_H_
|
||||||
|
|
||||||
|
#include <rtabmap/core/Odometry.h>
|
||||||
|
#include <rtabmap/core/RegistrationVis.h>
|
||||||
|
|
||||||
|
namespace rtabmap {
|
||||||
|
|
||||||
|
class RTABMAP_EXP OdometryF2F : public Odometry
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OdometryF2F(const rtabmap::ParametersMap & parameters = rtabmap::ParametersMap());
|
||||||
|
virtual ~OdometryF2F();
|
||||||
|
|
||||||
|
virtual void reset(const Transform & initialPose = Transform::getIdentity());
|
||||||
|
|
||||||
|
const Signature & getRefFrame() const {return refFrame_;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual Transform computeTransform(const SensorData & image, OdometryInfo * info = 0);
|
||||||
|
|
||||||
|
private:
|
||||||
|
//Parameters:
|
||||||
|
int keyFrameThr_;
|
||||||
|
bool guessFromMotion_;
|
||||||
|
|
||||||
|
RegistrationVis registration_;
|
||||||
|
Signature refFrame_;
|
||||||
|
Transform motionSinceLastKeyFrame_;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* ODOMETRYF2F_H_ */
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2010-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the Universite de Sherbrooke nor the
|
||||||
|
names of its contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ODOMETRYICP_H_
|
||||||
|
#define ODOMETRYICP_H_
|
||||||
|
|
||||||
|
#include <rtabmap/core/Odometry.h>
|
||||||
|
#include <pcl/point_cloud.h>
|
||||||
|
#include <pcl/point_types.h>
|
||||||
|
|
||||||
|
namespace rtabmap {
|
||||||
|
|
||||||
|
class RTABMAP_EXP OdometryICP : public Odometry
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OdometryICP(int decimation = 4,
|
||||||
|
float voxelSize = 0.005f,
|
||||||
|
int samples = 0,
|
||||||
|
float maxCorrespondenceDistance = 0.05f,
|
||||||
|
int maxIterations = 30,
|
||||||
|
float correspondenceRatio = 0.7f,
|
||||||
|
bool pointToPlane = true,
|
||||||
|
const ParametersMap & odometryParameter = rtabmap::ParametersMap());
|
||||||
|
virtual void reset(const Transform & initialPose = Transform::getIdentity());
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual Transform computeTransform(const SensorData & image, OdometryInfo * info = 0);
|
||||||
|
|
||||||
|
private:
|
||||||
|
int _decimation;
|
||||||
|
float _voxelSize;
|
||||||
|
float _samples;
|
||||||
|
float _maxCorrespondenceDistance;
|
||||||
|
int _maxIterations;
|
||||||
|
float _correspondenceRatio;
|
||||||
|
bool _pointToPlane;
|
||||||
|
|
||||||
|
pcl::PointCloud<pcl::PointNormal>::Ptr _previousCloudNormal; // for point ot plane
|
||||||
|
pcl::PointCloud<pcl::PointXYZ>::Ptr _previousCloud; // for point to point
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* ODOMETRYICP_H_ */
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2010-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the Universite de Sherbrooke nor the
|
||||||
|
names of its contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ODOMETRYLOCALMAP_H_
|
||||||
|
#define ODOMETRYLOCALMAP_H_
|
||||||
|
|
||||||
|
#include <rtabmap/core/Odometry.h>
|
||||||
|
|
||||||
|
namespace rtabmap {
|
||||||
|
|
||||||
|
class Memory;
|
||||||
|
|
||||||
|
class RTABMAP_EXP OdometryLocalMap : public Odometry
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OdometryLocalMap(const rtabmap::ParametersMap & parameters = rtabmap::ParametersMap());
|
||||||
|
virtual ~OdometryLocalMap();
|
||||||
|
|
||||||
|
virtual void reset(const Transform & initialPose = Transform::getIdentity());
|
||||||
|
const std::map<int, cv::Point3f> & getLocalMap() const {return localMap_;}
|
||||||
|
const Memory * getMemory() const {return _memory;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual Transform computeTransform(const SensorData & image, OdometryInfo * info = 0);
|
||||||
|
|
||||||
|
private:
|
||||||
|
//Parameters
|
||||||
|
int _localHistoryMaxSize;
|
||||||
|
std::string _fixedLocalMapPath;
|
||||||
|
|
||||||
|
Memory * _memory;
|
||||||
|
std::map<int, cv::Point3f> localMap_;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* ODOMETRYLOCALMAP_H_ */
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2010-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the Universite de Sherbrooke nor the
|
||||||
|
names of its contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ODOMETRYMONO_H_
|
||||||
|
#define ODOMETRYMONO_H_
|
||||||
|
|
||||||
|
#include <rtabmap/core/Odometry.h>
|
||||||
|
|
||||||
|
namespace rtabmap {
|
||||||
|
|
||||||
|
class Memory;
|
||||||
|
class Stereo;
|
||||||
|
|
||||||
|
class RTABMAP_EXP OdometryMono : public Odometry
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OdometryMono(const rtabmap::ParametersMap & parameters = rtabmap::ParametersMap());
|
||||||
|
virtual ~OdometryMono();
|
||||||
|
virtual void reset(const Transform & initialPose);
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual Transform computeTransform(const SensorData & data, OdometryInfo * info = 0);
|
||||||
|
private:
|
||||||
|
//Parameters:
|
||||||
|
int flowWinSize_;
|
||||||
|
int flowIterations_;
|
||||||
|
double flowEps_;
|
||||||
|
int flowMaxLevel_;
|
||||||
|
|
||||||
|
Stereo * stereo_;
|
||||||
|
|
||||||
|
Memory * memory_;
|
||||||
|
int localHistoryMaxSize_;
|
||||||
|
float initMinFlow_;
|
||||||
|
float initMinTranslation_;
|
||||||
|
float minTranslation_;
|
||||||
|
float fundMatrixReprojError_;
|
||||||
|
float fundMatrixConfidence_;
|
||||||
|
|
||||||
|
cv::Mat refDepthOrRight_;
|
||||||
|
std::map<int, cv::Point2f> cornersMap_;
|
||||||
|
std::map<int, cv::Point3f> localMap_;
|
||||||
|
std::map<int, std::map<int, cv::Point3f> > keyFrameWords3D_;
|
||||||
|
std::map<int, Transform> keyFramePoses_;
|
||||||
|
float maxVariance_;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* ODOMETRYMONO_H_ */
|
||||||
@@ -331,7 +331,7 @@ class RTABMAP_EXP Parameters
|
|||||||
RTABMAP_PARAM(Optimizer, Robust, bool, true, "Robust graph optimization using Vertigo (only work for g2o and GTSAM optimization strategies).");
|
RTABMAP_PARAM(Optimizer, Robust, bool, true, "Robust graph optimization using Vertigo (only work for g2o and GTSAM optimization strategies).");
|
||||||
|
|
||||||
// Odometry
|
// Odometry
|
||||||
RTABMAP_PARAM(Odom, Strategy, int, 0, "0=Features Map 1=Frame-to-Frame");
|
RTABMAP_PARAM(Odom, Strategy, int, 0, "0=Local Map 1=Frame-to-Frame");
|
||||||
RTABMAP_PARAM(Odom, ResetCountdown, int, 0, "Automatically reset odometry after X consecutive images on which odometry cannot be computed (value=0 disables auto-reset).");
|
RTABMAP_PARAM(Odom, ResetCountdown, int, 0, "Automatically reset odometry after X consecutive images on which odometry cannot be computed (value=0 disables auto-reset).");
|
||||||
RTABMAP_PARAM(Odom, Holonomic, bool, true, "If the robot is holonomic (strafing commands can be issued). If not, y value will be estimated from x and yaw values (y=x*tan(yaw)).");
|
RTABMAP_PARAM(Odom, Holonomic, bool, true, "If the robot is holonomic (strafing commands can be issued). If not, y value will be estimated from x and yaw values (y=x*tan(yaw)).");
|
||||||
RTABMAP_PARAM(Odom, FillInfoData, bool, true, "Fill info with data (inliers/outliers features).");
|
RTABMAP_PARAM(Odom, FillInfoData, bool, true, "Fill info with data (inliers/outliers features).");
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ SET(SRC_FILES
|
|||||||
|
|
||||||
Odometry.cpp
|
Odometry.cpp
|
||||||
OdometryThread.cpp
|
OdometryThread.cpp
|
||||||
OdometryBOW.cpp
|
OdometryLocalMap.cpp
|
||||||
OdometryMono.cpp
|
OdometryMono.cpp
|
||||||
OdometryICP.cpp
|
OdometryICP.cpp
|
||||||
OdometryF2F.cpp
|
OdometryF2F.cpp
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtabmap/core/Odometry.h"
|
#include "rtabmap/core/Odometry.h"
|
||||||
|
#include "rtabmap/core/OdometryF2F.h"
|
||||||
|
#include "rtabmap/core/OdometryLocalMap.h"
|
||||||
#include "rtabmap/core/OdometryInfo.h"
|
#include "rtabmap/core/OdometryInfo.h"
|
||||||
#include "rtabmap/utilite/ULogger.h"
|
#include "rtabmap/utilite/ULogger.h"
|
||||||
#include "rtabmap/utilite/UTimer.h"
|
#include "rtabmap/utilite/UTimer.h"
|
||||||
@@ -34,6 +36,31 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
namespace rtabmap {
|
namespace rtabmap {
|
||||||
|
|
||||||
|
Odometry * Odometry::create(const ParametersMap & parameters)
|
||||||
|
{
|
||||||
|
int odomTypeInt = Parameters::defaultOdomStrategy();
|
||||||
|
Parameters::parse(parameters, Parameters::kOdomStrategy(), odomTypeInt);
|
||||||
|
Odometry::Type type = (Odometry::Type)odomTypeInt;
|
||||||
|
return create(type, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
Odometry * Odometry::create(Odometry::Type & type, const ParametersMap & parameters)
|
||||||
|
{
|
||||||
|
UDEBUG("type=%d", (int)type);
|
||||||
|
Odometry * odometry = 0;
|
||||||
|
switch(type)
|
||||||
|
{
|
||||||
|
case Odometry::kTypeF2F:
|
||||||
|
odometry = new OdometryF2F(parameters);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
odometry = new OdometryLocalMap(parameters);
|
||||||
|
type = Odometry::kTypeLocalMap;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return odometry;
|
||||||
|
}
|
||||||
|
|
||||||
Odometry::Odometry(const rtabmap::ParametersMap & parameters) :
|
Odometry::Odometry(const rtabmap::ParametersMap & parameters) :
|
||||||
_roiRatios(Parameters::defaultVisRoiRatios()),
|
_roiRatios(Parameters::defaultVisRoiRatios()),
|
||||||
_minInliers(Parameters::defaultVisMinInliers()),
|
_minInliers(Parameters::defaultVisMinInliers()),
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtabmap/core/Odometry.h"
|
#include "rtabmap/core/OdometryF2F.h"
|
||||||
#include "rtabmap/core/OdometryInfo.h"
|
#include "rtabmap/core/OdometryInfo.h"
|
||||||
#include "rtabmap/core/EpipolarGeometry.h"
|
#include "rtabmap/core/EpipolarGeometry.h"
|
||||||
#include "rtabmap/utilite/ULogger.h"
|
#include "rtabmap/utilite/ULogger.h"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtabmap/core/Odometry.h"
|
#include "rtabmap/core/OdometryICP.h"
|
||||||
#include "rtabmap/core/util3d_registration.h"
|
#include "rtabmap/core/util3d_registration.h"
|
||||||
#include "rtabmap/core/util3d_filtering.h"
|
#include "rtabmap/core/util3d_filtering.h"
|
||||||
#include "rtabmap/core/util3d_surface.h"
|
#include "rtabmap/core/util3d_surface.h"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtabmap/core/Odometry.h"
|
#include "rtabmap/core/OdometryLocalMap.h"
|
||||||
#include "rtabmap/core/OdometryInfo.h"
|
#include "rtabmap/core/OdometryInfo.h"
|
||||||
#include "rtabmap/core/Memory.h"
|
#include "rtabmap/core/Memory.h"
|
||||||
#include "rtabmap/core/Signature.h"
|
#include "rtabmap/core/Signature.h"
|
||||||
@@ -49,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
namespace rtabmap {
|
namespace rtabmap {
|
||||||
|
|
||||||
OdometryBOW::OdometryBOW(const ParametersMap & parameters) :
|
OdometryLocalMap::OdometryLocalMap(const ParametersMap & parameters) :
|
||||||
Odometry(parameters),
|
Odometry(parameters),
|
||||||
_localHistoryMaxSize(Parameters::defaultOdomBowLocalHistorySize()),
|
_localHistoryMaxSize(Parameters::defaultOdomBowLocalHistorySize()),
|
||||||
_fixedLocalMapPath(Parameters::defaultOdomBowFixedLocalMapPath()),
|
_fixedLocalMapPath(Parameters::defaultOdomBowFixedLocalMapPath()),
|
||||||
@@ -172,14 +172,14 @@ OdometryBOW::OdometryBOW(const ParametersMap & parameters) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OdometryBOW::~OdometryBOW()
|
OdometryLocalMap::~OdometryLocalMap()
|
||||||
{
|
{
|
||||||
delete _memory;
|
delete _memory;
|
||||||
UDEBUG("");
|
UDEBUG("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OdometryBOW::reset(const Transform & initialPose)
|
void OdometryLocalMap::reset(const Transform & initialPose)
|
||||||
{
|
{
|
||||||
if(_fixedLocalMapPath.empty())
|
if(_fixedLocalMapPath.empty())
|
||||||
{
|
{
|
||||||
@@ -194,7 +194,7 @@ void OdometryBOW::reset(const Transform & initialPose)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// return not null transform if odometry is correctly computed
|
// return not null transform if odometry is correctly computed
|
||||||
Transform OdometryBOW::computeTransform(
|
Transform OdometryLocalMap::computeTransform(
|
||||||
const SensorData & data,
|
const SensorData & data,
|
||||||
OdometryInfo * info)
|
OdometryInfo * info)
|
||||||
{
|
{
|
||||||
@@ -25,7 +25,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtabmap/core/Odometry.h"
|
#include "rtabmap/core/OdometryMono.h"
|
||||||
#include "rtabmap/core/OdometryInfo.h"
|
#include "rtabmap/core/OdometryInfo.h"
|
||||||
#include "rtabmap/core/Memory.h"
|
#include "rtabmap/core/Memory.h"
|
||||||
#include "rtabmap/core/Signature.h"
|
#include "rtabmap/core/Signature.h"
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#include "rtabmap/core/OdometryThread.h"
|
#include "rtabmap/core/OdometryThread.h"
|
||||||
#include "rtabmap/core/Odometry.h"
|
#include "rtabmap/core/Odometry.h"
|
||||||
|
#include "rtabmap/core/OdometryMono.h"
|
||||||
|
#include "rtabmap/core/OdometryLocalMap.h"
|
||||||
#include "rtabmap/core/OdometryInfo.h"
|
#include "rtabmap/core/OdometryInfo.h"
|
||||||
#include "rtabmap/core/CameraEvent.h"
|
#include "rtabmap/core/CameraEvent.h"
|
||||||
#include "rtabmap/core/OdometryEvent.h"
|
#include "rtabmap/core/OdometryEvent.h"
|
||||||
@@ -101,7 +103,7 @@ void OdometryThread::mainLoop()
|
|||||||
|
|
||||||
void OdometryThread::addData(const SensorData & data)
|
void OdometryThread::addData(const SensorData & data)
|
||||||
{
|
{
|
||||||
if(dynamic_cast<OdometryMono*>(_odometry) == 0 && dynamic_cast<OdometryBOW*>(_odometry) == 0)
|
if(dynamic_cast<OdometryMono*>(_odometry) == 0 && dynamic_cast<OdometryLocalMap*>(_odometry) == 0)
|
||||||
{
|
{
|
||||||
if(data.imageRaw().empty() || data.depthOrRightRaw().empty() || (data.cameraModels().size()==0 && !data.stereoCameraModel().isValid()))
|
if(data.imageRaw().empty() || data.depthOrRightRaw().empty() || (data.cameraModels().size()==0 && !data.stereoCameraModel().isValid()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,7 +67,11 @@ Optimizer * Optimizer::create(const ParametersMap & parameters)
|
|||||||
int optimizerTypeInt = Parameters::defaultOptimizerStrategy();
|
int optimizerTypeInt = Parameters::defaultOptimizerStrategy();
|
||||||
Parameters::parse(parameters, Parameters::kOptimizerStrategy(), optimizerTypeInt);
|
Parameters::parse(parameters, Parameters::kOptimizerStrategy(), optimizerTypeInt);
|
||||||
Optimizer::Type type = (Optimizer::Type)optimizerTypeInt;
|
Optimizer::Type type = (Optimizer::Type)optimizerTypeInt;
|
||||||
|
return create(type, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
Optimizer * Optimizer::create(Optimizer::Type & type, const ParametersMap & parameters)
|
||||||
|
{
|
||||||
if(!OptimizerG2O::available() && type == Optimizer::kTypeG2O)
|
if(!OptimizerG2O::available() && type == Optimizer::kTypeG2O)
|
||||||
{
|
{
|
||||||
UWARN("g2o optimizer not available. TORO will be used instead.");
|
UWARN("g2o optimizer not available. TORO will be used instead.");
|
||||||
@@ -104,37 +108,6 @@ Optimizer * Optimizer::create(const ParametersMap & parameters)
|
|||||||
return optimizer;
|
return optimizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
Optimizer * Optimizer::create(Optimizer::Type & type, const ParametersMap & parameters)
|
|
||||||
{
|
|
||||||
if(!OptimizerG2O::available() && type == Optimizer::kTypeG2O)
|
|
||||||
{
|
|
||||||
UWARN("g2o optimizer not available. TORO will be used instead.");
|
|
||||||
type = Optimizer::kTypeTORO;
|
|
||||||
}
|
|
||||||
if(!OptimizerGTSAM::available() && type == Optimizer::kTypeGTSAM)
|
|
||||||
{
|
|
||||||
UWARN("GTSAM optimizer not available. TORO will be used instead.");
|
|
||||||
type = Optimizer::kTypeTORO;
|
|
||||||
}
|
|
||||||
Optimizer * optimizer = 0;
|
|
||||||
switch(type)
|
|
||||||
{
|
|
||||||
case Optimizer::kTypeGTSAM:
|
|
||||||
optimizer = new OptimizerGTSAM(parameters);
|
|
||||||
break;
|
|
||||||
case Optimizer::kTypeG2O:
|
|
||||||
optimizer = new OptimizerG2O(parameters);
|
|
||||||
break;
|
|
||||||
case Optimizer::kTypeTORO:
|
|
||||||
default:
|
|
||||||
optimizer = new OptimizerTORO(parameters);
|
|
||||||
type = Optimizer::kTypeTORO;
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
return optimizer;
|
|
||||||
}
|
|
||||||
|
|
||||||
Optimizer::Optimizer(int iterations, bool slam2d, bool covarianceIgnored, double epsilon, bool robust) :
|
Optimizer::Optimizer(int iterations, bool slam2d, bool covarianceIgnored, double epsilon, bool robust) :
|
||||||
iterations_(iterations),
|
iterations_(iterations),
|
||||||
slam2d_(slam2d),
|
slam2d_(slam2d),
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#include <rtabmap/core/Rtabmap.h>
|
#include <rtabmap/core/Rtabmap.h>
|
||||||
#include <rtabmap/core/CameraStereo.h>
|
#include <rtabmap/core/CameraStereo.h>
|
||||||
#include <rtabmap/core/Odometry.h>
|
#include <rtabmap/core/OdometryLocalMap.h>
|
||||||
#include <rtabmap/utilite/UThread.h>
|
#include <rtabmap/utilite/UThread.h>
|
||||||
#include "MapBuilder.h"
|
#include "MapBuilder.h"
|
||||||
#include <pcl/visualization/cloud_viewer.h>
|
#include <pcl/visualization/cloud_viewer.h>
|
||||||
@@ -103,7 +103,7 @@ int main(int argc, char * argv[])
|
|||||||
|
|
||||||
if(camera.init(calibrationDir, calibrationName))
|
if(camera.init(calibrationDir, calibrationName))
|
||||||
{
|
{
|
||||||
OdometryBOW odom;
|
OdometryLocalMap odom;
|
||||||
Rtabmap rtabmap;
|
Rtabmap rtabmap;
|
||||||
rtabmap.init();
|
rtabmap.init();
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "rtabmap/core/RtabmapThread.h"
|
#include "rtabmap/core/RtabmapThread.h"
|
||||||
#include "rtabmap/core/CameraRGBD.h"
|
#include "rtabmap/core/CameraRGBD.h"
|
||||||
#include "rtabmap/core/CameraThread.h"
|
#include "rtabmap/core/CameraThread.h"
|
||||||
#include "rtabmap/core/Odometry.h"
|
#include "rtabmap/core/OdometryLocalMap.h"
|
||||||
#include "rtabmap/core/OdometryThread.h"
|
#include "rtabmap/core/OdometryThread.h"
|
||||||
#include "rtabmap/utilite/UEventsManager.h"
|
#include "rtabmap/utilite/UEventsManager.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
@@ -128,7 +128,7 @@ int main(int argc, char * argv[])
|
|||||||
MapBuilder mapBuilder(&cameraThread);
|
MapBuilder mapBuilder(&cameraThread);
|
||||||
|
|
||||||
// Create an odometry thread to process camera events, it will send OdometryEvent.
|
// Create an odometry thread to process camera events, it will send OdometryEvent.
|
||||||
OdometryThread odomThread(new OdometryBOW());
|
OdometryThread odomThread(new OdometryLocalMap());
|
||||||
|
|
||||||
|
|
||||||
// Create RTAB-Map to process OdometryEvent
|
// Create RTAB-Map to process OdometryEvent
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "rtabmap/core/RtabmapThread.h"
|
#include "rtabmap/core/RtabmapThread.h"
|
||||||
#include "rtabmap/core/CameraRGBD.h"
|
#include "rtabmap/core/CameraRGBD.h"
|
||||||
#include "rtabmap/core/CameraThread.h"
|
#include "rtabmap/core/CameraThread.h"
|
||||||
#include "rtabmap/core/Odometry.h"
|
#include "rtabmap/core/OdometryLocalMap.h"
|
||||||
#include "rtabmap/core/OdometryThread.h"
|
#include "rtabmap/core/OdometryThread.h"
|
||||||
#include "rtabmap/utilite/UEventsManager.h"
|
#include "rtabmap/utilite/UEventsManager.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
@@ -171,7 +171,7 @@ int main(int argc, char * argv[])
|
|||||||
MapBuilderWifi mapBuilderWifi(&cameraThread);
|
MapBuilderWifi mapBuilderWifi(&cameraThread);
|
||||||
|
|
||||||
// Create an odometry thread to process camera events, it will send OdometryEvent.
|
// Create an odometry thread to process camera events, it will send OdometryEvent.
|
||||||
OdometryThread odomThread(new OdometryBOW());
|
OdometryThread odomThread(new OdometryLocalMap());
|
||||||
|
|
||||||
// Create RTAB-Map to process OdometryEvent
|
// Create RTAB-Map to process OdometryEvent
|
||||||
Rtabmap * rtabmap = new Rtabmap();
|
Rtabmap * rtabmap = new Rtabmap();
|
||||||
|
|||||||
@@ -3044,19 +3044,7 @@ void MainWindow::startDetection()
|
|||||||
delete _odomThread;
|
delete _odomThread;
|
||||||
_odomThread = 0;
|
_odomThread = 0;
|
||||||
}
|
}
|
||||||
Odometry * odom;
|
Odometry * odom = Odometry::create(parameters);
|
||||||
if(_preferencesDialog->getOdomStrategy() == 1)
|
|
||||||
{
|
|
||||||
odom = new OdometryF2F(parameters);
|
|
||||||
}
|
|
||||||
else if(_preferencesDialog->getOdomStrategy() == 2)
|
|
||||||
{
|
|
||||||
odom = new OdometryMono(parameters);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
odom = new OdometryBOW(parameters);
|
|
||||||
}
|
|
||||||
_odomThread = new OdometryThread(odom, _preferencesDialog->getOdomBufferSize());
|
_odomThread = new OdometryThread(odom, _preferencesDialog->getOdomBufferSize());
|
||||||
|
|
||||||
UEventsManager::addHandler(_odomThread);
|
UEventsManager::addHandler(_odomThread);
|
||||||
@@ -3083,19 +3071,7 @@ void MainWindow::startDetection()
|
|||||||
UERROR("OdomThread must be already deleted here?!");
|
UERROR("OdomThread must be already deleted here?!");
|
||||||
delete _odomThread;
|
delete _odomThread;
|
||||||
}
|
}
|
||||||
Odometry * odom;
|
Odometry * odom = Odometry::create(parameters);
|
||||||
if(_preferencesDialog->getOdomStrategy() == 1)
|
|
||||||
{
|
|
||||||
odom = new OdometryF2F(parameters);
|
|
||||||
}
|
|
||||||
else if(_preferencesDialog->getOdomStrategy() == 2)
|
|
||||||
{
|
|
||||||
odom = new OdometryMono(parameters);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
odom = new OdometryBOW(parameters);
|
|
||||||
}
|
|
||||||
_odomThread = new OdometryThread(odom, _preferencesDialog->getOdomBufferSize());
|
_odomThread = new OdometryThread(odom, _preferencesDialog->getOdomBufferSize());
|
||||||
|
|
||||||
UEventsManager::addHandler(_odomThread);
|
UEventsManager::addHandler(_odomThread);
|
||||||
|
|||||||
@@ -4127,19 +4127,7 @@ void PreferencesDialog::testOdometry()
|
|||||||
|
|
||||||
|
|
||||||
ParametersMap parameters = this->getAllParameters();
|
ParametersMap parameters = this->getAllParameters();
|
||||||
Odometry * odometry;
|
Odometry * odometry = Odometry::create(parameters);
|
||||||
if(this->getOdomStrategy() == 1)
|
|
||||||
{
|
|
||||||
odometry = new OdometryF2F(parameters);
|
|
||||||
}
|
|
||||||
else if(this->getOdomStrategy() == 2)
|
|
||||||
{
|
|
||||||
odometry = new OdometryMono(parameters);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
odometry = new OdometryBOW(parameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
OdometryThread odomThread(
|
OdometryThread odomThread(
|
||||||
odometry, // take ownership of odometry
|
odometry, // take ownership of odometry
|
||||||
|
|||||||
@@ -63,9 +63,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>-232</y>
|
||||||
<width>633</width>
|
<width>647</width>
|
||||||
<height>2118</height>
|
<height>2050</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_16">
|
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>11</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="page_22">
|
<widget class="QWidget" name="page_22">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
|
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
|
||||||
@@ -6849,7 +6849,7 @@ see Sqlite3 doc 'PRAGMA temp_store'.</string>
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Features Map</string>
|
<string>Local Map</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -6857,11 +6857,6 @@ see Sqlite3 doc 'PRAGMA temp_store'.</string>
|
|||||||
<string>Frame to Frame</string>
|
<string>Frame to Frame</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Mono</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="7" column="0">
|
||||||
@@ -6951,7 +6946,7 @@ see Sqlite3 doc 'PRAGMA temp_store'.</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_odometryBOW2">
|
<widget class="QGroupBox" name="groupBox_odometryBOW2">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Features Map</string>
|
<string>Local Map</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_54">
|
<layout class="QVBoxLayout" name="verticalLayout_54">
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@@ -29,7 +29,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap/utilite/UEventsManager.h>
|
#include <rtabmap/utilite/UEventsManager.h>
|
||||||
#include <rtabmap/utilite/UFile.h>
|
#include <rtabmap/utilite/UFile.h>
|
||||||
#include <rtabmap/utilite/UConversion.h>
|
#include <rtabmap/utilite/UConversion.h>
|
||||||
#include <rtabmap/core/Odometry.h>
|
#include <rtabmap/core/OdometryICP.h>
|
||||||
|
#include <rtabmap/core/OdometryLocalMap.h>
|
||||||
|
#include <rtabmap/core/OdometryF2F.h>
|
||||||
|
#include <rtabmap/core/OdometryMono.h>
|
||||||
#include <rtabmap/core/OdometryThread.h>
|
#include <rtabmap/core/OdometryThread.h>
|
||||||
#include <rtabmap/gui/OdometryViewer.h>
|
#include <rtabmap/gui/OdometryViewer.h>
|
||||||
#include <rtabmap/core/CameraThread.h>
|
#include <rtabmap/core/CameraThread.h>
|
||||||
@@ -680,7 +683,7 @@ int main (int argc, char * argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
odom = new rtabmap::OdometryBOW(parameters);
|
odom = new rtabmap::OdometryLocalMap(parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user